diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-09-23 15:42:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 15:42:36 -0400 |
commit | 918e8900d9da562c4d7566f80e154498fbdbc97b (patch) | |
tree | a2868f8f991fde1738ba7f64d907b221d6d5460f /asm/NW4R/ut_binaryFileFormat.s | |
parent | 0acf44f0b91fa912101901d292552bae55f2fa93 (diff) | |
parent | 96d9708dcf20c7537773bbc67f171b68b00e36d3 (diff) |
Merge pull request #70 from mparisi20/master
Add patch_strtab tool. Split ut_list, ut_ListList, and ut_binaryFileFormat
Diffstat (limited to 'asm/NW4R/ut_binaryFileFormat.s')
-rw-r--r-- | asm/NW4R/ut_binaryFileFormat.s | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/asm/NW4R/ut_binaryFileFormat.s b/asm/NW4R/ut_binaryFileFormat.s new file mode 100644 index 0000000..092a5cf --- /dev/null +++ b/asm/NW4R/ut_binaryFileFormat.s @@ -0,0 +1,39 @@ +.include "macros.inc"
+
+.section .text, "ax" # 0x80006980 - 0x803E1E60
+
+.global IsValidBinaryFile__Q24nw4r2utFPCQ34nw4r2ut16BinaryFileHeaderUlUsUs
+IsValidBinaryFile__Q24nw4r2utFPCQ34nw4r2ut16BinaryFileHeaderUlUsUs:
+/* 80362CA4 0035E904 80 03 00 00 */ lwz r0, 0(r3)
+/* 80362CA8 0035E908 7C 00 20 40 */ cmplw r0, r4
+/* 80362CAC 0035E90C 41 82 00 0C */ beq lbl_80362CB8
+/* 80362CB0 0035E910 38 60 00 00 */ li r3, 0
+/* 80362CB4 0035E914 4E 80 00 20 */ blr
+lbl_80362CB8:
+/* 80362CB8 0035E918 A0 03 00 04 */ lhz r0, 4(r3)
+/* 80362CBC 0035E91C 28 00 FE FF */ cmplwi r0, 0xfeff
+/* 80362CC0 0035E920 41 82 00 0C */ beq lbl_80362CCC
+/* 80362CC4 0035E924 38 60 00 00 */ li r3, 0
+/* 80362CC8 0035E928 4E 80 00 20 */ blr
+lbl_80362CCC:
+/* 80362CCC 0035E92C A0 03 00 06 */ lhz r0, 6(r3)
+/* 80362CD0 0035E930 7C 00 28 40 */ cmplw r0, r5
+/* 80362CD4 0035E934 41 82 00 0C */ beq lbl_80362CE0
+/* 80362CD8 0035E938 38 60 00 00 */ li r3, 0
+/* 80362CDC 0035E93C 4E 80 00 20 */ blr
+lbl_80362CE0:
+/* 80362CE0 0035E940 54 C4 1B 78 */ rlwinm r4, r6, 3, 0xd, 0x1c
+/* 80362CE4 0035E944 80 A3 00 08 */ lwz r5, 8(r3)
+/* 80362CE8 0035E948 38 04 00 10 */ addi r0, r4, 0x10
+/* 80362CEC 0035E94C 7C 05 00 40 */ cmplw r5, r0
+/* 80362CF0 0035E950 40 80 00 0C */ bge lbl_80362CFC
+/* 80362CF4 0035E954 38 60 00 00 */ li r3, 0
+/* 80362CF8 0035E958 4E 80 00 20 */ blr
+lbl_80362CFC:
+/* 80362CFC 0035E95C A0 63 00 0E */ lhz r3, 0xe(r3)
+/* 80362D00 0035E960 7C 06 18 50 */ subf r0, r6, r3
+/* 80362D04 0035E964 7C 63 33 38 */ orc r3, r3, r6
+/* 80362D08 0035E968 54 00 F8 7E */ srwi r0, r0, 1
+/* 80362D0C 0035E96C 7C 00 18 50 */ subf r0, r0, r3
+/* 80362D10 0035E970 54 03 0F FE */ srwi r3, r0, 0x1f
+/* 80362D14 0035E974 4E 80 00 20 */ blr
|