.include "macros.inc" .section .text, "ax" # 803559e0 /* 80355988 003528C8 48 00 00 59 */ bl __CARDCheckSum /* 8035598C 003528CC 38 7F 00 00 */ addi r3, r31, 0 /* 80355990 003528D0 38 80 20 00 */ li r4, 0x2000 /* 80355994 003528D4 4B FE 5C 49 */ bl DCStoreRange /* 80355998 003528D8 93 BE 00 D8 */ stw r29, 0xd8(r30) /* 8035599C 003528DC 3C 60 80 35 */ lis r3, EraseCallback@ha /* 803559A0 003528E0 38 A3 58 54 */ addi r5, r3, EraseCallback@l /* 803559A4 003528E4 80 1E 00 80 */ lwz r0, 0x80(r30) /* 803559A8 003528E8 7F 83 E3 78 */ mr r3, r28 /* 803559AC 003528EC 80 9E 00 0C */ lwz r4, 0xc(r30) /* 803559B0 003528F0 7C 00 F8 50 */ subf r0, r0, r31 /* 803559B4 003528F4 54 00 9B 7E */ srwi r0, r0, 0xd /* 803559B8 003528F8 7C 84 01 D6 */ mullw r4, r4, r0 /* 803559BC 003528FC 4B FF DF FD */ bl __CARDEraseSector .global lbl_803559C0 lbl_803559C0: /* 803559C0 00352900 80 01 00 2C */ lwz r0, 0x2c(r1) /* 803559C4 00352904 83 E1 00 24 */ lwz r31, 0x24(r1) /* 803559C8 00352908 83 C1 00 20 */ lwz r30, 0x20(r1) /* 803559CC 0035290C 83 A1 00 1C */ lwz r29, 0x1c(r1) /* 803559D0 00352910 83 81 00 18 */ lwz r28, 0x18(r1) /* 803559D4 00352914 38 21 00 28 */ addi r1, r1, 0x28 /* 803559D8 00352918 7C 08 03 A6 */ mtlr r0 /* 803559DC 0035291C 4E 80 00 20 */ blr .global __CARDCheckSum __CARDCheckSum: /* 803559E0 00352920 38 00 00 00 */ li r0, 0 /* 803559E4 00352924 7C 84 0E 70 */ srawi r4, r4, 1 /* 803559E8 00352928 B0 06 00 00 */ sth r0, 0(r6) /* 803559EC 0035292C 7C 84 01 95 */ addze. r4, r4 /* 803559F0 00352930 B0 05 00 00 */ sth r0, 0(r5) /* 803559F4 00352934 40 81 01 70 */ ble lbl_80355B64 /* 803559F8 00352938 54 80 E8 FF */ rlwinm. r0, r4, 0x1d, 3, 0x1f /* 803559FC 0035293C 7C 09 03 A6 */ mtctr r0 /* 80355A00 00352940 41 82 01 34 */ beq lbl_80355B34 lbl_80355A04: /* 80355A04 00352944 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355A08 00352948 A0 03 00 00 */ lhz r0, 0(r3) /* 80355A0C 0035294C 7C 07 02 14 */ add r0, r7, r0 /* 80355A10 00352950 B0 05 00 00 */ sth r0, 0(r5) /* 80355A14 00352954 A0 03 00 00 */ lhz r0, 0(r3) /* 80355A18 00352958 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355A1C 0035295C 7C 00 00 F8 */ nor r0, r0, r0 /* 80355A20 00352960 7C 07 02 14 */ add r0, r7, r0 /* 80355A24 00352964 B0 06 00 00 */ sth r0, 0(r6) /* 80355A28 00352968 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355A2C 0035296C A0 03 00 02 */ lhz r0, 2(r3) /* 80355A30 00352970 7C 07 02 14 */ add r0, r7, r0 /* 80355A34 00352974 B0 05 00 00 */ sth r0, 0(r5) /* 80355A38 00352978 A0 03 00 02 */ lhz r0, 2(r3) /* 80355A3C 0035297C A0 E6 00 00 */ lhz r7, 0(r6) /* 80355A40 00352980 7C 00 00 F8 */ nor r0, r0, r0 /* 80355A44 00352984 7C 07 02 14 */ add r0, r7, r0 /* 80355A48 00352988 B0 06 00 00 */ sth r0, 0(r6) /* 80355A4C 0035298C A0 E5 00 00 */ lhz r7, 0(r5) /* 80355A50 00352990 A0 03 00 04 */ lhz r0, 4(r3) /* 80355A54 00352994 7C 07 02 14 */ add r0, r7, r0 /* 80355A58 00352998 B0 05 00 00 */ sth r0, 0(r5) /* 80355A5C 0035299C A0 03 00 04 */ lhz r0, 4(r3) /* 80355A60 003529A0 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355A64 003529A4 7C 00 00 F8 */ nor r0, r0, r0 /* 80355A68 003529A8 7C 07 02 14 */ add r0, r7, r0 /* 80355A6C 003529AC B0 06 00 00 */ sth r0, 0(r6) /* 80355A70 003529B0 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355A74 003529B4 A0 03 00 06 */ lhz r0, 6(r3) /* 80355A78 003529B8 7C 07 02 14 */ add r0, r7, r0 /* 80355A7C 003529BC B0 05 00 00 */ sth r0, 0(r5) /* 80355A80 003529C0 A0 03 00 06 */ lhz r0, 6(r3) /* 80355A84 003529C4 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355A88 003529C8 7C 00 00 F8 */ nor r0, r0, r0 /* 80355A8C 003529CC 7C 07 02 14 */ add r0, r7, r0 /* 80355A90 003529D0 B0 06 00 00 */ sth r0, 0(r6) /* 80355A94 003529D4 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355A98 003529D8 A0 03 00 08 */ lhz r0, 8(r3) /* 80355A9C 003529DC 7C 07 02 14 */ add r0, r7, r0 /* 80355AA0 003529E0 B0 05 00 00 */ sth r0, 0(r5) /* 80355AA4 003529E4 A0 03 00 08 */ lhz r0, 8(r3) /* 80355AA8 003529E8 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355AAC 003529EC 7C 00 00 F8 */ nor r0, r0, r0 /* 80355AB0 003529F0 7C 07 02 14 */ add r0, r7, r0 /* 80355AB4 003529F4 B0 06 00 00 */ sth r0, 0(r6) /* 80355AB8 003529F8 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355ABC 003529FC A0 03 00 0A */ lhz r0, 0xa(r3) /* 80355AC0 00352A00 7C 07 02 14 */ add r0, r7, r0 /* 80355AC4 00352A04 B0 05 00 00 */ sth r0, 0(r5) /* 80355AC8 00352A08 A0 03 00 0A */ lhz r0, 0xa(r3) /* 80355ACC 00352A0C A0 E6 00 00 */ lhz r7, 0(r6) /* 80355AD0 00352A10 7C 00 00 F8 */ nor r0, r0, r0 /* 80355AD4 00352A14 7C 07 02 14 */ add r0, r7, r0 /* 80355AD8 00352A18 B0 06 00 00 */ sth r0, 0(r6) /* 80355ADC 00352A1C A0 E5 00 00 */ lhz r7, 0(r5) /* 80355AE0 00352A20 A0 03 00 0C */ lhz r0, 0xc(r3) /* 80355AE4 00352A24 7C 07 02 14 */ add r0, r7, r0 /* 80355AE8 00352A28 B0 05 00 00 */ sth r0, 0(r5) /* 80355AEC 00352A2C A0 03 00 0C */ lhz r0, 0xc(r3) /* 80355AF0 00352A30 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355AF4 00352A34 7C 00 00 F8 */ nor r0, r0, r0 /* 80355AF8 00352A38 7C 07 02 14 */ add r0, r7, r0 /* 80355AFC 00352A3C B0 06 00 00 */ sth r0, 0(r6) /* 80355B00 00352A40 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355B04 00352A44 A0 03 00 0E */ lhz r0, 0xe(r3) /* 80355B08 00352A48 7C 07 02 14 */ add r0, r7, r0 /* 80355B0C 00352A4C B0 05 00 00 */ sth r0, 0(r5) /* 80355B10 00352A50 A0 03 00 0E */ lhz r0, 0xe(r3) /* 80355B14 00352A54 38 63 00 10 */ addi r3, r3, 0x10 /* 80355B18 00352A58 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355B1C 00352A5C 7C 00 00 F8 */ nor r0, r0, r0 /* 80355B20 00352A60 7C 07 02 14 */ add r0, r7, r0 /* 80355B24 00352A64 B0 06 00 00 */ sth r0, 0(r6) /* 80355B28 00352A68 42 00 FE DC */ bdnz lbl_80355A04 /* 80355B2C 00352A6C 70 84 00 07 */ andi. r4, r4, 7 /* 80355B30 00352A70 41 82 00 34 */ beq lbl_80355B64 lbl_80355B34: /* 80355B34 00352A74 7C 89 03 A6 */ mtctr r4 lbl_80355B38: /* 80355B38 00352A78 A0 E5 00 00 */ lhz r7, 0(r5) /* 80355B3C 00352A7C A0 03 00 00 */ lhz r0, 0(r3) /* 80355B40 00352A80 7C 07 02 14 */ add r0, r7, r0 /* 80355B44 00352A84 B0 05 00 00 */ sth r0, 0(r5) /* 80355B48 00352A88 A0 03 00 00 */ lhz r0, 0(r3) /* 80355B4C 00352A8C 38 63 00 02 */ addi r3, r3, 2 /* 80355B50 00352A90 A0 E6 00 00 */ lhz r7, 0(r6) /* 80355B54 00352A94 7C 00 00 F8 */ nor r0, r0, r0 /* 80355B58 00352A98 7C 07 02 14 */ add r0, r7, r0 /* 80355B5C 00352A9C B0 06 00 00 */ sth r0, 0(r6) /* 80355B60 00352AA0 42 00 FF D8 */ bdnz lbl_80355B38 lbl_80355B64: /* 80355B64 00352AA4 A0 05 00 00 */ lhz r0, 0(r5) /* 80355B68 00352AA8 28 00 FF FF */ cmplwi r0, 0xffff /* 80355B6C 00352AAC 40 82 00 0C */ bne lbl_80355B78 /* 80355B70 00352AB0 38 00 00 00 */ li r0, 0 /* 80355B74 00352AB4 B0 05 00 00 */ sth r0, 0(r5) lbl_80355B78: /* 80355B78 00352AB8 A0 06 00 00 */ lhz r0, 0(r6) /* 80355B7C 00352ABC 28 00 FF FF */ cmplwi r0, 0xffff /* 80355B80 00352AC0 4C 82 00 20 */ bnelr /* 80355B84 00352AC4 38 00 00 00 */ li r0, 0 /* 80355B88 00352AC8 B0 06 00 00 */ sth r0, 0(r6) /* 80355B8C 00352ACC 4E 80 00 20 */ blr .global VerifyID VerifyID: /* 80355B90 00352AD0 7C 08 02 A6 */ mflr r0 /* 80355B94 00352AD4 90 01 00 04 */ stw r0, 4(r1) /* 80355B98 00352AD8 94 21 FF D0 */ stwu r1, -0x30(r1) /* 80355B9C 00352ADC BF 21 00 14 */ stmw r25, 0x14(r1) /* 80355BA0 00352AE0 7C 7A 1B 78 */ mr r26, r3 /* 80355BA4 00352AE4 80 63 00 80 */ lwz r3, 0x80(r3) /* 80355BA8 00352AE8 A0 03 00 20 */ lhz r0, 0x20(r3) /* 80355BAC 00352AEC 3B 63 00 00 */ addi r27, r3, 0 /* 80355BB0 00352AF0 28 00 00 00 */ cmplwi r0, 0 /* 80355BB4 00352AF4 40 82 00 14 */ bne lbl_80355BC8 /* 80355BB8 00352AF8 A0 7B 00 22 */ lhz r3, 0x22(r27) /* 80355BBC 00352AFC A0 1A 00 08 */ lhz r0, 8(r26) /* 80355BC0 00352B00 7C 03 00 40 */ cmplw r3, r0 /* 80355BC4 00352B04 41 82 00 0C */ beq lbl_80355BD0 lbl_80355BC8: /* 80355BC8 00352B08 38 60 FF FA */ li r3, -6 /* 80355BCC 00352B0C 48 00 02 34 */ b lbl_80355E00 lbl_80355BD0: /* 80355BD0 00352B10 38 00 01 FC */ li r0, 0x1fc /* 80355BD4 00352B14 7C 00 0E 70 */ srawi r0, r0, 1 /* 80355BD8 00352B18 7C 00 01 95 */ addze. r0, r0 /* 80355BDC 00352B1C 38 9B 00 00 */ addi r4, r27, 0 /* 80355BE0 00352B20 38 E0 00 00 */ li r7, 0 /* 80355BE4 00352B24 7C 03 03 78 */ mr r3, r0 /* 80355BE8 00352B28 38 C0 00 00 */ li r6, 0 /* 80355BEC 00352B2C 40 81 00 BC */ ble lbl_80355CA8 /* 80355BF0 00352B30 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f /* 80355BF4 00352B34 7C 09 03 A6 */ mtctr r0 /* 80355BF8 00352B38 41 82 00 94 */ beq lbl_80355C8C lbl_80355BFC: /* 80355BFC 00352B3C A0 A4 00 00 */ lhz r5, 0(r4) /* 80355C00 00352B40 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C04 00352B44 7C C6 2A 14 */ add r6, r6, r5 /* 80355C08 00352B48 A0 A4 00 02 */ lhz r5, 2(r4) /* 80355C0C 00352B4C 7C E7 02 14 */ add r7, r7, r0 /* 80355C10 00352B50 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C14 00352B54 7C C6 2A 14 */ add r6, r6, r5 /* 80355C18 00352B58 A0 A4 00 04 */ lhz r5, 4(r4) /* 80355C1C 00352B5C 7C E7 02 14 */ add r7, r7, r0 /* 80355C20 00352B60 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C24 00352B64 7C C6 2A 14 */ add r6, r6, r5 /* 80355C28 00352B68 A0 A4 00 06 */ lhz r5, 6(r4) /* 80355C2C 00352B6C 7C E7 02 14 */ add r7, r7, r0 /* 80355C30 00352B70 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C34 00352B74 7C C6 2A 14 */ add r6, r6, r5 /* 80355C38 00352B78 A0 A4 00 08 */ lhz r5, 8(r4) /* 80355C3C 00352B7C 7C E7 02 14 */ add r7, r7, r0 /* 80355C40 00352B80 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C44 00352B84 7C C6 2A 14 */ add r6, r6, r5 /* 80355C48 00352B88 A0 A4 00 0A */ lhz r5, 0xa(r4) /* 80355C4C 00352B8C 7C E7 02 14 */ add r7, r7, r0 /* 80355C50 00352B90 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C54 00352B94 7C C6 2A 14 */ add r6, r6, r5 /* 80355C58 00352B98 A0 A4 00 0C */ lhz r5, 0xc(r4) /* 80355C5C 00352B9C 7C E7 02 14 */ add r7, r7, r0 /* 80355C60 00352BA0 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C64 00352BA4 7C C6 2A 14 */ add r6, r6, r5 /* 80355C68 00352BA8 A0 A4 00 0E */ lhz r5, 0xe(r4) /* 80355C6C 00352BAC 7C E7 02 14 */ add r7, r7, r0 /* 80355C70 00352BB0 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C74 00352BB4 7C C6 2A 14 */ add r6, r6, r5 /* 80355C78 00352BB8 7C E7 02 14 */ add r7, r7, r0 /* 80355C7C 00352BBC 38 84 00 10 */ addi r4, r4, 0x10 /* 80355C80 00352BC0 42 00 FF 7C */ bdnz lbl_80355BFC /* 80355C84 00352BC4 70 63 00 07 */ andi. r3, r3, 7 /* 80355C88 00352BC8 41 82 00 20 */ beq lbl_80355CA8 lbl_80355C8C: /* 80355C8C 00352BCC 7C 69 03 A6 */ mtctr r3 lbl_80355C90: /* 80355C90 00352BD0 A0 A4 00 00 */ lhz r5, 0(r4) /* 80355C94 00352BD4 38 84 00 02 */ addi r4, r4, 2 /* 80355C98 00352BD8 7C A0 28 F8 */ nor r0, r5, r5 /* 80355C9C 00352BDC 7C C6 2A 14 */ add r6, r6, r5 /* 80355CA0 00352BE0 7C E7 02 14 */ add r7, r7, r0 /* 80355CA4 00352BE4 42 00 FF EC */ bdnz lbl_80355C90 lbl_80355CA8: /* 80355CA8 00352BE8 54 C0 04 3E */ clrlwi r0, r6, 0x10 /* 80355CAC 00352BEC 28 00 FF FF */ cmplwi r0, 0xffff /* 80355CB0 00352BF0 40 82 00 08 */ bne lbl_80355CB8 /* 80355CB4 00352BF4 38 C0 00 00 */ li r6, 0 lbl_80355CB8: /* 80355CB8 00352BF8 54 E0 04 3E */ clrlwi r0, r7, 0x10 /* 80355CBC 00352BFC 28 00 FF FF */ cmplwi r0, 0xffff /* 80355CC0 00352C00 40 82 00 08 */ bne lbl_80355CC8 /* 80355CC4 00352C04 38 E0 00 00 */ li r7, 0 lbl_80355CC8: /* 80355CC8 00352C08 A0 7B 01 FC */ lhz r3, 0x1fc(r27) /* 80355CCC 00352C0C 54 C0 04 3E */ clrlwi r0, r6, 0x10 /* 80355CD0 00352C10 7C 03 00 40 */ cmplw r3, r0 /* 80355CD4 00352C14 40 82 00 14 */ bne lbl_80355CE8 /* 80355CD8 00352C18 A0 7B 01 FE */ lhz r3, 0x1fe(r27) /* 80355CDC 00352C1C 54 E0 04 3E */ clrlwi r0, r7, 0x10 /* 80355CE0 00352C20 7C 03 00 40 */ cmplw r3, r0 /* 80355CE4 00352C24 41 82 00 0C */ beq lbl_80355CF0 lbl_80355CE8: /* 80355CE8 00352C28 38 60 FF FA */ li r3, -6 /* 80355CEC 00352C2C 48 00 01 14 */ b lbl_80355E00 lbl_80355CF0: /* 80355CF0 00352C30 83 FB 00 0C */ lwz r31, 0xc(r27) /* 80355CF4 00352C34 83 9B 00 10 */ lwz r28, 0x10(r27) /* 80355CF8 00352C38 4B FE A4 A9 */ bl __OSLockSramEx /* 80355CFC 00352C3C 3C 80 80 45 */ lis r4, lbl_8044CBC0@ha /* 80355D00 00352C40 38 04 CB C0 */ addi r0, r4, lbl_8044CBC0@l /* 80355D04 00352C44 3C 80 78 78 */ lis r4, 0x78787879@ha /* 80355D08 00352C48 7C 00 D0 50 */ subf r0, r0, r26 /* 80355D0C 00352C4C 38 84 78 79 */ addi r4, r4, 0x78787879@l /* 80355D10 00352C50 7C 04 00 96 */ mulhw r0, r4, r0 /* 80355D14 00352C54 7C 00 3E 70 */ srawi r0, r0, 7 /* 80355D18 00352C58 54 04 0F FE */ srwi r4, r0, 0x1f /* 80355D1C 00352C5C 7C 00 22 14 */ add r0, r0, r4 /* 80355D20 00352C60 1C 00 00 0C */ mulli r0, r0, 0xc /* 80355D24 00352C64 3C 80 41 C6 */ lis r4, 0x41C64E6D@ha /* 80355D28 00352C68 3B 3B 00 00 */ addi r25, r27, 0 /* 80355D2C 00352C6C 7F A3 02 14 */ add r29, r3, r0 /* 80355D30 00352C70 3B C4 4E 6D */ addi r30, r4, 0x41C64E6D@l /* 80355D34 00352C74 3B 40 00 00 */ li r26, 0 lbl_80355D38: /* 80355D38 00352C78 7C BF F1 D6 */ mullw r5, r31, r30 /* 80355D3C 00352C7C 7C 7C F0 16 */ mulhwu r3, r28, r30 /* 80355D40 00352C80 3B E0 00 00 */ li r31, 0 /* 80355D44 00352C84 7C A5 1A 14 */ add r5, r5, r3 /* 80355D48 00352C88 7C 7C F9 D6 */ mullw r3, r28, r31 /* 80355D4C 00352C8C 7C 1C F1 D6 */ mullw r0, r28, r30 /* 80355D50 00352C90 3B 80 30 39 */ li r28, 0x3039 /* 80355D54 00352C94 7C 80 E0 14 */ addc r4, r0, r28 /* 80355D58 00352C98 7C 05 1A 14 */ add r0, r5, r3 /* 80355D5C 00352C9C 7C 60 F9 14 */ adde r3, r0, r31 /* 80355D60 00352CA0 38 A0 00 10 */ li r5, 0x10 /* 80355D64 00352CA4 48 00 C9 31 */ bl __shr2i /* 80355D68 00352CA8 88 1D 00 00 */ lbz r0, 0(r29) /* 80355D6C 00352CAC 88 D9 00 00 */ lbz r6, 0(r25) /* 80355D70 00352CB0 7C 04 00 14 */ addc r0, r4, r0 /* 80355D74 00352CB4 54 00 06 3E */ clrlwi r0, r0, 0x18 /* 80355D78 00352CB8 7C 06 00 40 */ cmplw r6, r0 /* 80355D7C 00352CBC 41 82 00 14 */ beq lbl_80355D90 /* 80355D80 00352CC0 38 60 00 00 */ li r3, 0 /* 80355D84 00352CC4 4B FE A7 D9 */ bl __OSUnlockSramEx /* 80355D88 00352CC8 38 60 FF FA */ li r3, -6 /* 80355D8C 00352CCC 48 00 00 74 */ b lbl_80355E00 lbl_80355D90: /* 80355D90 00352CD0 7C A3 F1 D6 */ mullw r5, r3, r30 /* 80355D94 00352CD4 7C 64 F0 16 */ mulhwu r3, r4, r30 /* 80355D98 00352CD8 7C A5 1A 14 */ add r5, r5, r3 /* 80355D9C 00352CDC 7C 64 F9 D6 */ mullw r3, r4, r31 /* 80355DA0 00352CE0 7C 04 F1 D6 */ mullw r0, r4, r30 /* 80355DA4 00352CE4 7C 80 E0 14 */ addc r4, r0, r28 /* 80355DA8 00352CE8 7C 05 1A 14 */ add r0, r5, r3 /* 80355DAC 00352CEC 7C 60 F9 14 */ adde r3, r0, r31 /* 80355DB0 00352CF0 38 A0 00 10 */ li r5, 0x10 /* 80355DB4 00352CF4 48 00 C8 E1 */ bl __shr2i /* 80355DB8 00352CF8 3B 5A 00 01 */ addi r26, r26, 1 /* 80355DBC 00352CFC 2C 1A 00 0C */ cmpwi r26, 0xc /* 80355DC0 00352D00 38 00 7F FF */ li r0, 0x7fff /* 80355DC4 00352D04 7C 9C 00 38 */ and r28, r4, r0 /* 80355DC8 00352D08 7C 7F F8 38 */ and r31, r3, r31 /* 80355DCC 00352D0C 3B BD 00 01 */ addi r29, r29, 1 /* 80355DD0 00352D10 3B 39 00 01 */ addi r25, r25, 1 /* 80355DD4 00352D14 41 80 FF 64 */ blt lbl_80355D38 /* 80355DD8 00352D18 38 60 00 00 */ li r3, 0 /* 80355DDC 00352D1C 4B FE A7 81 */ bl __OSUnlockSramEx /* 80355DE0 00352D20 4B FF DD 95 */ bl __CARDGetFontEncode /* 80355DE4 00352D24 A0 1B 00 24 */ lhz r0, 0x24(r27) /* 80355DE8 00352D28 54 63 04 3E */ clrlwi r3, r3, 0x10 /* 80355DEC 00352D2C 7C 00 18 40 */ cmplw r0, r3 /* 80355DF0 00352D30 41 82 00 0C */ beq lbl_80355DFC /* 80355DF4 00352D34 38 60 FF F3 */ li r3, -13 /* 80355DF8 00352D38 48 00 00 08 */ b lbl_80355E00 lbl_80355DFC: /* 80355DFC 00352D3C 38 60 00 00 */ li r3, 0 lbl_80355E00: /* 80355E00 00352D40 BB 21 00 14 */ lmw r25, 0x14(r1) /* 80355E04 00352D44 80 01 00 34 */ lwz r0, 0x34(r1) /* 80355E08 00352D48 38 21 00 30 */ addi r1, r1, 0x30 /* 80355E0C 00352D4C 7C 08 03 A6 */ mtlr r0 /* 80355E10 00352D50 4E 80 00 20 */ blr .global VerifyDir VerifyDir: /* 80355E14 00352D54 7C 08 02 A6 */ mflr r0 /* 80355E18 00352D58 90 01 00 04 */ stw r0, 4(r1) /* 80355E1C 00352D5C 94 21 FF C8 */ stwu r1, -0x38(r1) /* 80355E20 00352D60 93 E1 00 34 */ stw r31, 0x34(r1) /* 80355E24 00352D64 38 E1 00 1C */ addi r7, r1, 0x1c /* 80355E28 00352D68 39 01 00 14 */ addi r8, r1, 0x14 /* 80355E2C 00352D6C 93 C1 00 30 */ stw r30, 0x30(r1) /* 80355E30 00352D70 3B E0 00 00 */ li r31, 0 /* 80355E34 00352D74 3B C0 00 00 */ li r30, 0 /* 80355E38 00352D78 93 A1 00 2C */ stw r29, 0x2c(r1) /* 80355E3C 00352D7C 3B A4 00 00 */ addi r29, r4, 0 /* 80355E40 00352D80 38 80 00 00 */ li r4, 0 lbl_80355E44: /* 80355E44 00352D84 38 04 00 01 */ addi r0, r4, 1 /* 80355E48 00352D88 80 A3 00 80 */ lwz r5, 0x80(r3) /* 80355E4C 00352D8C 54 00 68 24 */ slwi r0, r0, 0xd /* 80355E50 00352D90 7C 05 02 14 */ add r0, r5, r0 /* 80355E54 00352D94 90 07 00 00 */ stw r0, 0(r7) /* 80355E58 00352D98 38 C0 1F FC */ li r6, 0x1ffc /* 80355E5C 00352D9C 7C C6 0E 70 */ srawi r6, r6, 1 /* 80355E60 00352DA0 80 A7 00 00 */ lwz r5, 0(r7) /* 80355E64 00352DA4 7C C6 01 95 */ addze. r6, r6 /* 80355E68 00352DA8 39 60 00 00 */ li r11, 0 /* 80355E6C 00352DAC 38 05 1F C0 */ addi r0, r5, 0x1fc0 /* 80355E70 00352DB0 90 08 00 00 */ stw r0, 0(r8) /* 80355E74 00352DB4 39 40 00 00 */ li r10, 0 /* 80355E78 00352DB8 80 A7 00 00 */ lwz r5, 0(r7) /* 80355E7C 00352DBC 40 81 00 BC */ ble lbl_80355F38 /* 80355E80 00352DC0 54 C0 E8 FF */ rlwinm. r0, r6, 0x1d, 3, 0x1f /* 80355E84 00352DC4 7C 09 03 A6 */ mtctr r0 /* 80355E88 00352DC8 41 82 00 94 */ beq lbl_80355F1C lbl_80355E8C: /* 80355E8C 00352DCC A1 25 00 00 */ lhz r9, 0(r5) /* 80355E90 00352DD0 7D 20 48 F8 */ nor r0, r9, r9 /* 80355E94 00352DD4 7D 4A 4A 14 */ add r10, r10, r9 /* 80355E98 00352DD8 A1 25 00 02 */ lhz r9, 2(r5) /* 80355E9C 00352DDC 7D 6B 02 14 */ add r11, r11, r0 /* 80355EA0 00352DE0 7D 20 48 F8 */ nor r0, r9, r9 /* 80355EA4 00352DE4 7D 4A 4A 14 */ add r10, r10, r9 /* 80355EA8 00352DE8 A1 25 00 04 */ lhz r9, 4(r5) /* 80355EAC 00352DEC 7D 6B 02 14 */ add r11, r11, r0 /* 80355EB0 00352DF0 7D 20 48 F8 */ nor r0, r9, r9 /* 80355EB4 00352DF4 7D 4A 4A 14 */ add r10, r10, r9 /* 80355EB8 00352DF8 A1 25 00 06 */ lhz r9, 6(r5) /* 80355EBC 00352DFC 7D 6B 02 14 */ add r11, r11, r0 /* 80355EC0 00352E00 7D 20 48 F8 */ nor r0, r9, r9 /* 80355EC4 00352E04 7D 4A 4A 14 */ add r10, r10, r9 /* 80355EC8 00352E08 A1 25 00 08 */ lhz r9, 8(r5) /* 80355ECC 00352E0C 7D 6B 02 14 */ add r11, r11, r0 /* 80355ED0 00352E10 7D 20 48 F8 */ nor r0, r9, r9 /* 80355ED4 00352E14 7D 4A 4A 14 */ add r10, r10, r9 /* 80355ED8 00352E18 A1 25 00 0A */ lhz r9, 0xa(r5) /* 80355EDC 00352E1C 7D 6B 02 14 */ add r11, r11, r0 /* 80355EE0 00352E20 7D 20 48 F8 */ nor r0, r9, r9 /* 80355EE4 00352E24 7D 4A 4A 14 */ add r10, r10, r9 /* 80355EE8 00352E28 A1 25 00 0C */ lhz r9, 0xc(r5) /* 80355EEC 00352E2C 7D 6B 02 14 */ add r11, r11, r0 /* 80355EF0 00352E30 7D 20 48 F8 */ nor r0, r9, r9 /* 80355EF4 00352E34 7D 4A 4A 14 */ add r10, r10, r9 /* 80355EF8 00352E38 A1 25 00 0E */ lhz r9, 0xe(r5) /* 80355EFC 00352E3C 7D 6B 02 14 */ add r11, r11, r0 /* 80355F00 00352E40 7D 20 48 F8 */ nor r0, r9, r9 /* 80355F04 00352E44 7D 4A 4A 14 */ add r10, r10, r9 /* 80355F08 00352E48 7D 6B 02 14 */ add r11, r11, r0 /* 80355F0C 00352E4C 38 A5 00 10 */ addi r5, r5, 0x10 /* 80355F10 00352E50 42 00 FF 7C */ bdnz lbl_80355E8C /* 80355F14 00352E54 70 C6 00 07 */ andi. r6, r6, 7 /* 80355F18 00352E58 41 82 00 20 */ beq lbl_80355F38 lbl_80355F1C: /* 80355F1C 00352E5C 7C C9 03 A6 */ mtctr r6 lbl_80355F20: /* 80355F20 00352E60 A1 25 00 00 */ lhz r9, 0(r5) /* 80355F24 00352E64 38 A5 00 02 */ addi r5, r5, 2 /* 80355F28 00352E68 7D 20 48 F8 */ nor r0, r9, r9 /* 80355F2C 00352E6C 7D 4A 4A 14 */ add r10, r10, r9 /* 80355F30 00352E70 7D 6B 02 14 */ add r11, r11, r0 /* 80355F34 00352E74 42 00 FF EC */ bdnz lbl_80355F20 lbl_80355F38: /* 80355F38 00352E78 55 40 04 3E */ clrlwi r0, r10, 0x10 /* 80355F3C 00352E7C 28 00 FF FF */ cmplwi r0, 0xffff /* 80355F40 00352E80 40 82 00 08 */ bne lbl_80355F48 /* 80355F44 00352E84 39 40 00 00 */ li r10, 0 lbl_80355F48: /* 80355F48 00352E88 55 60 04 3E */ clrlwi r0, r11, 0x10 /* 80355F4C 00352E8C 28 00 FF FF */ cmplwi r0, 0xffff /* 80355F50 00352E90 40 82 00 08 */ bne lbl_80355F58 /* 80355F54 00352E94 39 60 00 00 */ li r11, 0 lbl_80355F58: /* 80355F58 00352E98 80 C8 00 00 */ lwz r6, 0(r8) /* 80355F5C 00352E9C 55 45 04 3E */ clrlwi r5, r10, 0x10 /* 80355F60 00352EA0 A0 06 00 3C */ lhz r0, 0x3c(r6) /* 80355F64 00352EA4 7C 05 00 40 */ cmplw r5, r0 /* 80355F68 00352EA8 40 82 00 14 */ bne lbl_80355F7C /* 80355F6C 00352EAC A0 06 00 3E */ lhz r0, 0x3e(r6) /* 80355F70 00352EB0 55 65 04 3E */ clrlwi r5, r11, 0x10 /* 80355F74 00352EB4 7C 05 00 40 */ cmplw r5, r0 /* 80355F78 00352EB8 41 82 00 14 */ beq lbl_80355F8C lbl_80355F7C: /* 80355F7C 00352EBC 38 00 00 00 */ li r0, 0 /* 80355F80 00352EC0 90 03 00 84 */ stw r0, 0x84(r3) /* 80355F84 00352EC4 3B C4 00 00 */ addi r30, r4, 0 /* 80355F88 00352EC8 3B FF 00 01 */ addi r31, r31, 1 lbl_80355F8C: /* 80355F8C 00352ECC 38 84 00 01 */ addi r4, r4, 1 /* 80355F90 00352ED0 2C 04 00 02 */ cmpwi r4, 2 /* 80355F94 00352ED4 38 E7 00 04 */ addi r7, r7, 4 /* 80355F98 00352ED8 39 08 00 04 */ addi r8, r8, 4 /* 80355F9C 00352EDC 41 80 FE A8 */ blt lbl_80355E44 /* 80355FA0 00352EE0 2C 1F 00 00 */ cmpwi r31, 0 /* 80355FA4 00352EE4 40 82 00 84 */ bne lbl_80356028 /* 80355FA8 00352EE8 80 83 00 84 */ lwz r4, 0x84(r3) /* 80355FAC 00352EEC 28 04 00 00 */ cmplwi r4, 0 /* 80355FB0 00352EF0 40 82 00 5C */ bne lbl_8035600C /* 80355FB4 00352EF4 80 A1 00 18 */ lwz r5, 0x18(r1) /* 80355FB8 00352EF8 80 81 00 14 */ lwz r4, 0x14(r1) /* 80355FBC 00352EFC A8 A5 00 3A */ lha r5, 0x3a(r5) /* 80355FC0 00352F00 A8 04 00 3A */ lha r0, 0x3a(r4) /* 80355FC4 00352F04 7C 05 00 51 */ subf. r0, r5, r0 /* 80355FC8 00352F08 40 80 00 0C */ bge lbl_80355FD4 /* 80355FCC 00352F0C 3B C0 00 00 */ li r30, 0 /* 80355FD0 00352F10 48 00 00 08 */ b lbl_80355FD8 lbl_80355FD4: /* 80355FD4 00352F14 3B C0 00 01 */ li r30, 1 lbl_80355FD8: /* 80355FD8 00352F18 57 C0 10 3A */ slwi r0, r30, 2 /* 80355FDC 00352F1C 38 C1 00 1C */ addi r6, r1, 0x1c /* 80355FE0 00352F20 7C C6 02 14 */ add r6, r6, r0 /* 80355FE4 00352F24 80 86 00 00 */ lwz r4, 0(r6) /* 80355FE8 00352F28 6B C0 00 01 */ xori r0, r30, 1 /* 80355FEC 00352F2C 54 00 10 3A */ slwi r0, r0, 2 /* 80355FF0 00352F30 90 83 00 84 */ stw r4, 0x84(r3) /* 80355FF4 00352F34 38 81 00 1C */ addi r4, r1, 0x1c /* 80355FF8 00352F38 38 A0 20 00 */ li r5, 0x2000 /* 80355FFC 00352F3C 80 66 00 00 */ lwz r3, 0(r6) /* 80356000 00352F40 7C 84 00 2E */ lwzx r4, r4, r0 /* 80356004 00352F44 4B CA D5 3D */ bl memcpy /* 80356008 00352F48 48 00 00 20 */ b lbl_80356028 lbl_8035600C: /* 8035600C 00352F4C 80 01 00 1C */ lwz r0, 0x1c(r1) /* 80356010 00352F50 7C 04 00 40 */ cmplw r4, r0 /* 80356014 00352F54 40 82 00 0C */ bne lbl_80356020 /* 80356018 00352F58 38 00 00 00 */ li r0, 0 /* 8035601C 00352F5C 48 00 00 08 */ b lbl_80356024 lbl_80356020: /* 80356020 00352F60 38 00 00 01 */ li r0, 1 lbl_80356024: /* 80356024 00352F64 7C 1E 03 78 */ mr r30, r0 lbl_80356028: /* 80356028 00352F68 28 1D 00 00 */ cmplwi r29, 0 /* 8035602C 00352F6C 41 82 00 08 */ beq lbl_80356034 /* 80356030 00352F70 93 DD 00 00 */ stw r30, 0(r29) lbl_80356034: /* 80356034 00352F74 7F E3 FB 78 */ mr r3, r31 /* 80356038 00352F78 80 01 00 3C */ lwz r0, 0x3c(r1) /* 8035603C 00352F7C 83 E1 00 34 */ lwz r31, 0x34(r1) /* 80356040 00352F80 83 C1 00 30 */ lwz r30, 0x30(r1) /* 80356044 00352F84 83 A1 00 2C */ lwz r29, 0x2c(r1) /* 80356048 00352F88 38 21 00 38 */ addi r1, r1, 0x38 /* 8035604C 00352F8C 7C 08 03 A6 */ mtlr r0 /* 80356050 00352F90 4E 80 00 20 */ blr .global VerifyFAT VerifyFAT: /* 80356054 00352F94 7C 08 02 A6 */ mflr r0 /* 80356058 00352F98 38 A0 00 00 */ li r5, 0 /* 8035605C 00352F9C 90 01 00 04 */ stw r0, 4(r1) /* 80356060 00352FA0 94 21 FF D8 */ stwu r1, -0x28(r1) /* 80356064 00352FA4 93 E1 00 24 */ stw r31, 0x24(r1) /* 80356068 00352FA8 3B E0 00 00 */ li r31, 0 /* 8035606C 00352FAC 93 C1 00 20 */ stw r30, 0x20(r1) /* 80356070 00352FB0 3B C0 00 00 */ li r30, 0 /* 80356074 00352FB4 93 A1 00 1C */ stw r29, 0x1c(r1) /* 80356078 00352FB8 3B A4 00 00 */ addi r29, r4, 0 /* 8035607C 00352FBC 38 81 00 10 */ addi r4, r1, 0x10 lbl_80356080: /* 80356080 00352FC0 39 00 1F FC */ li r8, 0x1ffc /* 80356084 00352FC4 80 C3 00 80 */ lwz r6, 0x80(r3) /* 80356088 00352FC8 38 05 00 03 */ addi r0, r5, 3 /* 8035608C 00352FCC 7D 08 0E 70 */ srawi r8, r8, 1 /* 80356090 00352FD0 54 00 68 24 */ slwi r0, r0, 0xd /* 80356094 00352FD4 7C E6 02 14 */ add r7, r6, r0 /* 80356098 00352FD8 7D 08 01 95 */ addze. r8, r8 /* 8035609C 00352FDC 90 E4 00 00 */ stw r7, 0(r4) /* 803560A0 00352FE0 38 C7 00 04 */ addi r6, r7, 4 /* 803560A4 00352FE4 39 60 00 00 */ li r11, 0 /* 803560A8 00352FE8 39 40 00 00 */ li r10, 0 /* 803560AC 00352FEC 40 81 00 BC */ ble lbl_80356168 /* 803560B0 00352FF0 55 00 E8 FF */ rlwinm. r0, r8, 0x1d, 3, 0x1f /* 803560B4 00352FF4 7C 09 03 A6 */ mtctr r0 /* 803560B8 00352FF8 41 82 00 94 */ beq lbl_8035614C lbl_803560BC: /* 803560BC 00352FFC A1 26 00 00 */ lhz r9, 0(r6) /* 803560C0 00353000 7D 20 48 F8 */ nor r0, r9, r9 /* 803560C4 00353004 7D 4A 4A 14 */ add r10, r10, r9 /* 803560C8 00353008 A1 26 00 02 */ lhz r9, 2(r6) /* 803560CC 0035300C 7D 6B 02 14 */ add r11, r11, r0 /* 803560D0 00353010 7D 20 48 F8 */ nor r0, r9, r9 /* 803560D4 00353014 7D 4A 4A 14 */ add r10, r10, r9 /* 803560D8 00353018 A1 26 00 04 */ lhz r9, 4(r6) /* 803560DC 0035301C 7D 6B 02 14 */ add r11, r11, r0 /* 803560E0 00353020 7D 20 48 F8 */ nor r0, r9, r9 /* 803560E4 00353024 7D 4A 4A 14 */ add r10, r10, r9 /* 803560E8 00353028 A1 26 00 06 */ lhz r9, 6(r6) /* 803560EC 0035302C 7D 6B 02 14 */ add r11, r11, r0 /* 803560F0 00353030 7D 20 48 F8 */ nor r0, r9, r9 /* 803560F4 00353034 7D 4A 4A 14 */ add r10, r10, r9 /* 803560F8 00353038 A1 26 00 08 */ lhz r9, 8(r6) /* 803560FC 0035303C 7D 6B 02 14 */ add r11, r11, r0 /* 80356100 00353040 7D 20 48 F8 */ nor r0, r9, r9 /* 80356104 00353044 7D 4A 4A 14 */ add r10, r10, r9 /* 80356108 00353048 A1 26 00 0A */ lhz r9, 0xa(r6) /* 8035610C 0035304C 7D 6B 02 14 */ add r11, r11, r0 /* 80356110 00353050 7D 20 48 F8 */ nor r0, r9, r9 /* 80356114 00353054 7D 4A 4A 14 */ add r10, r10, r9 /* 80356118 00353058 A1 26 00 0C */ lhz r9, 0xc(r6) /* 8035611C 0035305C 7D 6B 02 14 */ add r11, r11, r0 /* 80356120 00353060 7D 20 48 F8 */ nor r0, r9, r9 /* 80356124 00353064 7D 4A 4A 14 */ add r10, r10, r9 /* 80356128 00353068 A1 26 00 0E */ lhz r9, 0xe(r6) /* 8035612C 0035306C 7D 6B 02 14 */ add r11, r11, r0 /* 80356130 00353070 7D 20 48 F8 */ nor r0, r9, r9 /* 80356134 00353074 7D 4A 4A 14 */ add r10, r10, r9 /* 80356138 00353078 7D 6B 02 14 */ add r11, r11, r0 /* 8035613C 0035307C 38 C6 00 10 */ addi r6, r6, 0x10 /* 80356140 00353080 42 00 FF 7C */ bdnz lbl_803560BC /* 80356144 00353084 71 08 00 07 */ andi. r8, r8, 7 /* 80356148 00353088 41 82 00 20 */ beq lbl_80356168 lbl_8035614C: /* 8035614C 0035308C 7D 09 03 A6 */ mtctr r8 lbl_80356150: /* 80356150 00353090 A1 26 00 00 */ lhz r9, 0(r6) /* 80356154 00353094 38 C6 00 02 */ addi r6, r6, 2 /* 80356158 00353098 7D 20 48 F8 */ nor r0, r9, r9 /* 8035615C 0035309C 7D 4A 4A 14 */ add r10, r10, r9 /* 80356160 003530A0 7D 6B 02 14 */ add r11, r11, r0 /* 80356164 003530A4 42 00 FF EC */ bdnz lbl_80356150 lbl_80356168: /* 80356168 003530A8 55 40 04 3E */ clrlwi r0, r10, 0x10 /* 8035616C 003530AC 28 00 FF FF */ cmplwi r0, 0xffff /* 80356170 003530B0 40 82 00 08 */ bne lbl_80356178 /* 80356174 003530B4 39 40 00 00 */ li r10, 0 lbl_80356178: /* 80356178 003530B8 55 60 04 3E */ clrlwi r0, r11, 0x10 /* 8035617C 003530BC 28 00 FF FF */ cmplwi r0, 0xffff /* 80356180 003530C0 40 82 00 08 */ bne lbl_80356188 /* 80356184 003530C4 39 60 00 00 */ li r11, 0 lbl_80356188: /* 80356188 003530C8 A0 C7 00 00 */ lhz r6, 0(r7) /* 8035618C 003530CC 55 40 04 3E */ clrlwi r0, r10, 0x10 /* 80356190 003530D0 7C 06 00 40 */ cmplw r6, r0 /* 80356194 003530D4 40 82 00 14 */ bne lbl_803561A8 /* 80356198 003530D8 A0 C7 00 02 */ lhz r6, 2(r7) /* 8035619C 003530DC 55 60 04 3E */ clrlwi r0, r11, 0x10 /* 803561A0 003530E0 7C 06 00 40 */ cmplw r6, r0 /* 803561A4 003530E4 41 82 00 18 */ beq lbl_803561BC lbl_803561A8: /* 803561A8 003530E8 38 00 00 00 */ li r0, 0 /* 803561AC 003530EC 90 03 00 88 */ stw r0, 0x88(r3) /* 803561B0 003530F0 3B C5 00 00 */ addi r30, r5, 0 /* 803561B4 003530F4 3B FF 00 01 */ addi r31, r31, 1 /* 803561B8 003530F8 48 00 00 5C */ b lbl_80356214 lbl_803561BC: /* 803561BC 003530FC A1 03 00 10 */ lhz r8, 0x10(r3) /* 803561C0 00353100 38 C7 00 0A */ addi r6, r7, 0xa /* 803561C4 00353104 39 40 00 00 */ li r10, 0 /* 803561C8 00353108 39 20 00 05 */ li r9, 5 /* 803561CC 0035310C 48 00 00 1C */ b lbl_803561E8 lbl_803561D0: /* 803561D0 00353110 A0 06 00 00 */ lhz r0, 0(r6) /* 803561D4 00353114 28 00 00 00 */ cmplwi r0, 0 /* 803561D8 00353118 40 82 00 08 */ bne lbl_803561E0 /* 803561DC 0035311C 39 4A 00 01 */ addi r10, r10, 1 lbl_803561E0: /* 803561E0 00353120 38 C6 00 02 */ addi r6, r6, 2 /* 803561E4 00353124 39 29 00 01 */ addi r9, r9, 1 lbl_803561E8: /* 803561E8 00353128 55 20 04 3E */ clrlwi r0, r9, 0x10 /* 803561EC 0035312C 7C 00 40 40 */ cmplw r0, r8 /* 803561F0 00353130 41 80 FF E0 */ blt lbl_803561D0 /* 803561F4 00353134 A0 07 00 06 */ lhz r0, 6(r7) /* 803561F8 00353138 55 46 04 3E */ clrlwi r6, r10, 0x10 /* 803561FC 0035313C 7C 06 00 40 */ cmplw r6, r0 /* 80356200 00353140 41 82 00 14 */ beq lbl_80356214 /* 80356204 00353144 38 00 00 00 */ li r0, 0 /* 80356208 00353148 90 03 00 88 */ stw r0, 0x88(r3) /* 8035620C 0035314C 3B C5 00 00 */ addi r30, r5, 0 /* 80356210 00353150 3B FF 00 01 */ addi r31, r31, 1 lbl_80356214: /* 80356214 00353154 38 A5 00 01 */ addi r5, r5, 1 /* 80356218 00353158 2C 05 00 02 */ cmpwi r5, 2 /* 8035621C 0035315C 38 84 00 04 */ addi r4, r4, 4 /* 80356220 00353160 41 80 FE 60 */ blt lbl_80356080 /* 80356224 00353164 2C 1F 00 00 */ cmpwi r31, 0 /* 80356228 00353168 40 82 00 84 */ bne lbl_803562AC /* 8035622C 0035316C 80 83 00 88 */ lwz r4, 0x88(r3) /* 80356230 00353170 28 04 00 00 */ cmplwi r4, 0 /* 80356234 00353174 40 82 00 5C */ bne lbl_80356290 /* 80356238 00353178 80 A1 00 14 */ lwz r5, 0x14(r1) /* 8035623C 0035317C 80 81 00 10 */ lwz r4, 0x10(r1) /* 80356240 00353180 A8 A5 00 04 */ lha r5, 4(r5) /* 80356244 00353184 A8 04 00 04 */ lha r0, 4(r4) /* 80356248 00353188 7C 05 00 51 */ subf. r0, r5, r0 /* 8035624C 0035318C 40 80 00 0C */ bge lbl_80356258 /* 80356250 00353190 3B C0 00 00 */ li r30, 0 /* 80356254 00353194 48 00 00 08 */ b lbl_8035625C lbl_80356258: /* 80356258 00353198 3B C0 00 01 */ li r30, 1 lbl_8035625C: /* 8035625C 0035319C 57 C0 10 3A */ slwi r0, r30, 2 /* 80356260 003531A0 38 C1 00 10 */ addi r6, r1, 0x10 /* 80356264 003531A4 7C C6 02 14 */ add r6, r6, r0 /* 80356268 003531A8 80 86 00 00 */ lwz r4, 0(r6) /* 8035626C 003531AC 6B C0 00 01 */ xori r0, r30, 1 /* 80356270 003531B0 54 00 10 3A */ slwi r0, r0, 2 /* 80356274 003531B4 90 83 00 88 */ stw r4, 0x88(r3) /* 80356278 003531B8 38 81 00 10 */ addi r4, r1, 0x10 /* 8035627C 003531BC 38 A0 20 00 */ li r5, 0x2000 /* 80356280 003531C0 80 66 00 00 */ lwz r3, 0(r6) /* 80356284 003531C4 7C 84 00 2E */ lwzx r4, r4, r0 /* 80356288 003531C8 4B CA D2 B9 */ bl memcpy /* 8035628C 003531CC 48 00 00 20 */ b lbl_803562AC lbl_80356290: /* 80356290 003531D0 80 01 00 10 */ lwz r0, 0x10(r1) /* 80356294 003531D4 7C 04 00 40 */ cmplw r4, r0 /* 80356298 003531D8 40 82 00 0C */ bne lbl_803562A4 /* 8035629C 003531DC 38 00 00 00 */ li r0, 0 /* 803562A0 003531E0 48 00 00 08 */ b lbl_803562A8 lbl_803562A4: /* 803562A4 003531E4 38 00 00 01 */ li r0, 1 lbl_803562A8: /* 803562A8 003531E8 7C 1E 03 78 */ mr r30, r0 lbl_803562AC: /* 803562AC 003531EC 28 1D 00 00 */ cmplwi r29, 0 /* 803562B0 003531F0 41 82 00 08 */ beq lbl_803562B8 /* 803562B4 003531F4 93 DD 00 00 */ stw r30, 0(r29) lbl_803562B8: /* 803562B8 003531F8 7F E3 FB 78 */ mr r3, r31 /* 803562BC 003531FC 80 01 00 2C */ lwz r0, 0x2c(r1) /* 803562C0 00353200 83 E1 00 24 */ lwz r31, 0x24(r1) /* 803562C4 00353204 83 C1 00 20 */ lwz r30, 0x20(r1) /* 803562C8 00353208 83 A1 00 1C */ lwz r29, 0x1c(r1) /* 803562CC 0035320C 38 21 00 28 */ addi r1, r1, 0x28 /* 803562D0 00353210 7C 08 03 A6 */ mtlr r0 /* 803562D4 00353214 4E 80 00 20 */ blr .global __CARDVerify __CARDVerify: /* 803562D8 00353218 7C 08 02 A6 */ mflr r0 /* 803562DC 0035321C 90 01 00 04 */ stw r0, 4(r1) /* 803562E0 00353220 94 21 FF E8 */ stwu r1, -0x18(r1) /* 803562E4 00353224 93 E1 00 14 */ stw r31, 0x14(r1) /* 803562E8 00353228 93 C1 00 10 */ stw r30, 0x10(r1) /* 803562EC 0035322C 7C 7E 1B 78 */ mr r30, r3 /* 803562F0 00353230 4B FF F8 A1 */ bl VerifyID /* 803562F4 00353234 2C 03 00 00 */ cmpwi r3, 0 /* 803562F8 00353238 40 80 00 08 */ bge lbl_80356300 /* 803562FC 0035323C 48 00 00 50 */ b lbl_8035634C lbl_80356300: /* 80356300 00353240 38 7E 00 00 */ addi r3, r30, 0 /* 80356304 00353244 38 80 00 00 */ li r4, 0 /* 80356308 00353248 4B FF FB 0D */ bl VerifyDir /* 8035630C 0035324C 3B E3 00 00 */ addi r31, r3, 0 /* 80356310 00353250 38 7E 00 00 */ addi r3, r30, 0 /* 80356314 00353254 38 80 00 00 */ li r4, 0 /* 80356318 00353258 4B FF FD 3D */ bl VerifyFAT /* 8035631C 0035325C 7C 1F 1A 14 */ add r0, r31, r3 /* 80356320 00353260 2C 00 00 01 */ cmpwi r0, 1 /* 80356324 00353264 41 82 00 1C */ beq lbl_80356340 /* 80356328 00353268 40 80 00 20 */ bge lbl_80356348 /* 8035632C 0035326C 2C 00 00 00 */ cmpwi r0, 0 /* 80356330 00353270 40 80 00 08 */ bge lbl_80356338 /* 80356334 00353274 48 00 00 14 */ b lbl_80356348 lbl_80356338: /* 80356338 00353278 38 60 00 00 */ li r3, 0 /* 8035633C 0035327C 48 00 00 10 */ b lbl_8035634C lbl_80356340: /* 80356340 00353280 38 60 FF FA */ li r3, -6 /* 80356344 00353284 48 00 00 08 */ b lbl_8035634C lbl_80356348: /* 80356348 00353288 38 60 FF FA */ li r3, -6 lbl_8035634C: /* 8035634C 0035328C 80 01 00 1C */ lwz r0, 0x1c(r1) /* 80356350 00353290 83 E1 00 14 */ lwz r31, 0x14(r1) /* 80356354 00353294 83 C1 00 10 */ lwz r30, 0x10(r1) /* 80356358 00353298 38 21 00 18 */ addi r1, r1, 0x18 /* 8035635C 0035329C 7C 08 03 A6 */ mtlr r0 /* 80356360 003532A0 4E 80 00 20 */ blr .global CARDCheckExAsync CARDCheckExAsync: /* 80356364 003532A4 7C 08 02 A6 */ mflr r0 /* 80356368 003532A8 90 01 00 04 */ stw r0, 4(r1) /* 8035636C 003532AC 94 21 FF A8 */ stwu r1, -0x58(r1) /* 80356370 003532B0 BF 21 00 3C */ stmw r25, 0x3c(r1) /* 80356374 003532B4 7C 9A 23 79 */ or. r26, r4, r4 /* 80356378 003532B8 3B 23 00 00 */ addi r25, r3, 0 /* 8035637C 003532BC 3B 65 00 00 */ addi r27, r5, 0 /* 80356380 003532C0 3B C0 00 00 */ li r30, 0 /* 80356384 003532C4 3B A0 00 00 */ li r29, 0 /* 80356388 003532C8 3B 80 00 00 */ li r28, 0 /* 8035638C 003532CC 41 82 00 0C */ beq lbl_80356398 /* 80356390 003532D0 38 00 00 00 */ li r0, 0 /* 80356394 003532D4 90 1A 00 00 */ stw r0, 0(r26) lbl_80356398: /* 80356398 003532D8 38 79 00 00 */ addi r3, r25, 0 /* 8035639C 003532DC 38 81 00 30 */ addi r4, r1, 0x30 /* 803563A0 003532E0 4B FF D8 15 */ bl __CARDGetControlBlock /* 803563A4 003532E4 2C 03 00 00 */ cmpwi r3, 0 /* 803563A8 003532E8 40 80 00 08 */ bge lbl_803563B0 /* 803563AC 003532EC 48 00 05 34 */ b lbl_803568E0 lbl_803563B0: /* 803563B0 003532F0 80 61 00 30 */ lwz r3, 0x30(r1) /* 803563B4 003532F4 4B FF F7 DD */ bl VerifyID /* 803563B8 003532F8 7C 64 1B 79 */ or. r4, r3, r3 /* 803563BC 003532FC 40 80 00 10 */ bge lbl_803563CC /* 803563C0 00353300 80 61 00 30 */ lwz r3, 0x30(r1) /* 803563C4 00353304 4B FF D8 A9 */ bl __CARDPutControlBlock /* 803563C8 00353308 48 00 05 18 */ b lbl_803568E0 lbl_803563CC: /* 803563CC 0035330C 80 61 00 30 */ lwz r3, 0x30(r1) /* 803563D0 00353310 38 81 00 18 */ addi r4, r1, 0x18 /* 803563D4 00353314 4B FF FA 41 */ bl VerifyDir /* 803563D8 00353318 7C 7F 1B 78 */ mr r31, r3 /* 803563DC 0035331C 80 61 00 30 */ lwz r3, 0x30(r1) /* 803563E0 00353320 38 81 00 1C */ addi r4, r1, 0x1c /* 803563E4 00353324 4B FF FC 71 */ bl VerifyFAT /* 803563E8 00353328 7C BF 1A 14 */ add r5, r31, r3 /* 803563EC 0035332C 2C 05 00 01 */ cmpwi r5, 1 /* 803563F0 00353330 40 81 00 14 */ ble lbl_80356404 /* 803563F4 00353334 80 61 00 30 */ lwz r3, 0x30(r1) /* 803563F8 00353338 38 80 FF FA */ li r4, -6 /* 803563FC 0035333C 4B FF D8 71 */ bl __CARDPutControlBlock /* 80356400 00353340 48 00 04 E0 */ b lbl_803568E0 lbl_80356404: /* 80356404 00353344 80 C1 00 30 */ lwz r6, 0x30(r1) /* 80356408 00353348 80 86 00 80 */ lwz r4, 0x80(r6) /* 8035640C 0035334C 38 64 20 00 */ addi r3, r4, 0x2000 /* 80356410 00353350 38 04 60 00 */ addi r0, r4, 0x6000 /* 80356414 00353354 90 61 00 28 */ stw r3, 0x28(r1) /* 80356418 00353358 3C 64 00 01 */ addis r3, r4, 1 /* 8035641C 0035335C 38 84 40 00 */ addi r4, r4, 0x4000 /* 80356420 00353360 90 01 00 20 */ stw r0, 0x20(r1) /* 80356424 00353364 38 03 80 00 */ addi r0, r3, -32768 /* 80356428 00353368 90 81 00 2C */ stw r4, 0x2c(r1) /* 8035642C 0035336C 90 01 00 24 */ stw r0, 0x24(r1) /* 80356430 00353370 41 82 00 0C */ beq lbl_8035643C /* 80356434 00353374 40 80 00 8C */ bge lbl_803564C0 /* 80356438 00353378 48 00 00 88 */ b lbl_803564C0 lbl_8035643C: /* 8035643C 0035337C 38 66 00 84 */ addi r3, r6, 0x84 /* 80356440 00353380 80 06 00 84 */ lwz r0, 0x84(r6) /* 80356444 00353384 28 00 00 00 */ cmplwi r0, 0 /* 80356448 00353388 40 82 00 40 */ bne lbl_80356488 /* 8035644C 0035338C 80 01 00 18 */ lwz r0, 0x18(r1) /* 80356450 00353390 38 81 00 28 */ addi r4, r1, 0x28 /* 80356454 00353394 38 A0 20 00 */ li r5, 0x2000 /* 80356458 00353398 54 00 10 3A */ slwi r0, r0, 2 /* 8035645C 0035339C 7C 04 00 2E */ lwzx r0, r4, r0 /* 80356460 003533A0 90 03 00 00 */ stw r0, 0(r3) /* 80356464 003533A4 80 61 00 18 */ lwz r3, 0x18(r1) /* 80356468 003533A8 68 60 00 01 */ xori r0, r3, 1 /* 8035646C 003533AC 54 63 10 3A */ slwi r3, r3, 2 /* 80356470 003533B0 54 00 10 3A */ slwi r0, r0, 2 /* 80356474 003533B4 7C 64 18 2E */ lwzx r3, r4, r3 /* 80356478 003533B8 7C 84 00 2E */ lwzx r4, r4, r0 /* 8035647C 003533BC 4B CA D0 C5 */ bl memcpy /* 80356480 003533C0 3B A0 00 01 */ li r29, 1 /* 80356484 003533C4 48 00 00 3C */ b lbl_803564C0 lbl_80356488: /* 80356488 003533C8 80 01 00 1C */ lwz r0, 0x1c(r1) /* 8035648C 003533CC 38 81 00 20 */ addi r4, r1, 0x20 /* 80356490 003533D0 38 A0 20 00 */ li r5, 0x2000 /* 80356494 003533D4 54 00 10 3A */ slwi r0, r0, 2 /* 80356498 003533D8 7C 04 00 2E */ lwzx r0, r4, r0 /* 8035649C 003533DC 90 06 00 88 */ stw r0, 0x88(r6) /* 803564A0 003533E0 80 61 00 1C */ lwz r3, 0x1c(r1) /* 803564A4 003533E4 68 60 00 01 */ xori r0, r3, 1 /* 803564A8 003533E8 54 63 10 3A */ slwi r3, r3, 2 /* 803564AC 003533EC 54 00 10 3A */ slwi r0, r0, 2 /* 803564B0 003533F0 7C 64 18 2E */ lwzx r3, r4, r3 /* 803564B4 003533F4 7C 84 00 2E */ lwzx r4, r4, r0 /* 803564B8 003533F8 4B CA D0 89 */ bl memcpy /* 803564BC 003533FC 3B C0 00 01 */ li r30, 1 lbl_803564C0: /* 803564C0 00353400 80 01 00 1C */ lwz r0, 0x1c(r1) /* 803564C4 00353404 38 61 00 20 */ addi r3, r1, 0x20 /* 803564C8 00353408 38 80 00 00 */ li r4, 0 /* 803564CC 0035340C 68 00 00 01 */ xori r0, r0, 1 /* 803564D0 00353410 54 00 10 3A */ slwi r0, r0, 2 /* 803564D4 00353414 7F E3 00 2E */ lwzx r31, r3, r0 /* 803564D8 00353418 38 A0 20 00 */ li r5, 0x2000 /* 803564DC 0035341C 38 7F 00 00 */ addi r3, r31, 0 /* 803564E0 00353420 4B CA CF 79 */ bl memset /* 803564E4 00353424 38 00 00 7F */ li r0, 0x7f /* 803564E8 00353428 80 A1 00 30 */ lwz r5, 0x30(r1) /* 803564EC 0035342C 7C 09 03 A6 */ mtctr r0 /* 803564F0 00353430 38 C0 00 00 */ li r6, 0 lbl_803564F4: /* 803564F4 00353434 80 05 00 84 */ lwz r0, 0x84(r5) /* 803564F8 00353438 7C E0 32 14 */ add r7, r0, r6 /* 803564FC 0035343C 88 07 00 00 */ lbz r0, 0(r7) /* 80356500 00353440 28 00 00 FF */ cmplwi r0, 0xff /* 80356504 00353444 41 82 00 A8 */ beq lbl_803565AC /* 80356508 00353448 A0 87 00 36 */ lhz r4, 0x36(r7) /* 8035650C 0035344C 39 00 00 00 */ li r8, 0 /* 80356510 00353450 48 00 00 54 */ b lbl_80356564 lbl_80356514: /* 80356514 00353454 54 83 04 3E */ clrlwi r3, r4, 0x10 /* 80356518 00353458 28 03 00 05 */ cmplwi r3, 5 /* 8035651C 0035345C 41 80 00 2C */ blt lbl_80356548 /* 80356520 00353460 A0 05 00 10 */ lhz r0, 0x10(r5) /* 80356524 00353464 7C 03 00 40 */ cmplw r3, r0 /* 80356528 00353468 40 80 00 20 */ bge lbl_80356548 /* 8035652C 0035346C 54 64 08 3C */ slwi r4, r3, 1 /* 80356530 00353470 7C 7F 22 2E */ lhzx r3, r31, r4 /* 80356534 00353474 38 63 00 01 */ addi r3, r3, 1 /* 80356538 00353478 54 60 04 3E */ clrlwi r0, r3, 0x10 /* 8035653C 0035347C 7C 7F 23 2E */ sthx r3, r31, r4 /* 80356540 00353480 28 00 00 01 */ cmplwi r0, 1 /* 80356544 00353484 40 81 00 14 */ ble lbl_80356558 lbl_80356548: /* 80356548 00353488 80 61 00 30 */ lwz r3, 0x30(r1) /* 8035654C 0035348C 38 80 FF FA */ li r4, -6 /* 80356550 00353490 4B FF D7 1D */ bl __CARDPutControlBlock /* 80356554 00353494 48 00 03 8C */ b lbl_803568E0 lbl_80356558: /* 80356558 00353498 80 65 00 88 */ lwz r3, 0x88(r5) /* 8035655C 0035349C 39 08 00 01 */ addi r8, r8, 1 /* 80356560 003534A0 7C 83 22 2E */ lhzx r4, r3, r4 lbl_80356564: /* 80356564 003534A4 54 80 04 3E */ clrlwi r0, r4, 0x10 /* 80356568 003534A8 28 00 FF FF */ cmplwi r0, 0xffff /* 8035656C 003534AC 41 82 00 14 */ beq lbl_80356580 /* 80356570 003534B0 A0 07 00 38 */ lhz r0, 0x38(r7) /* 80356574 003534B4 55 03 04 3E */ clrlwi r3, r8, 0x10 /* 80356578 003534B8 7C 03 00 40 */ cmplw r3, r0 /* 8035657C 003534BC 41 80 FF 98 */ blt lbl_80356514 lbl_80356580: /* 80356580 003534C0 A0 07 00 38 */ lhz r0, 0x38(r7) /* 80356584 003534C4 55 03 04 3E */ clrlwi r3, r8, 0x10 /* 80356588 003534C8 7C 03 00 40 */ cmplw r3, r0 /* 8035658C 003534CC 40 82 00 10 */ bne lbl_8035659C /* 80356590 003534D0 54 80 04 3E */ clrlwi r0, r4, 0x10 /* 80356594 003534D4 28 00 FF FF */ cmplwi r0, 0xffff /* 80356598 003534D8 41 82 00 14 */ beq lbl_803565AC lbl_8035659C: /* 8035659C 003534DC 80 61 00 30 */ lwz r3, 0x30(r1) /* 803565A0 003534E0 38 80 FF FA */ li r4, -6 /* 803565A4 003534E4 4B FF D6 C9 */ bl __CARDPutControlBlock /* 803565A8 003534E8 48 00 03 38 */ b lbl_803568E0 lbl_803565AC: /* 803565AC 003534EC 38 C6 00 40 */ addi r6, r6, 0x40 /* 803565B0 003534F0 42 00 FF 44 */ bdnz lbl_803564F4 /* 803565B4 003534F4 80 61 00 30 */ lwz r3, 0x30(r1) /* 803565B8 003534F8 38 DF 00 0A */ addi r6, r31, 0xa /* 803565BC 003534FC 39 20 00 00 */ li r9, 0 /* 803565C0 00353500 39 00 00 05 */ li r8, 5 /* 803565C4 00353504 38 A0 00 0A */ li r5, 0xa /* 803565C8 00353508 48 00 00 68 */ b lbl_80356630 lbl_803565CC: /* 803565CC 0035350C 80 83 00 88 */ lwz r4, 0x88(r3) /* 803565D0 00353510 A0 06 00 00 */ lhz r0, 0(r6) /* 803565D4 00353514 7C 84 2A 14 */ add r4, r4, r5 /* 803565D8 00353518 28 00 00 00 */ cmplwi r0, 0 /* 803565DC 0035351C A0 04 00 00 */ lhz r0, 0(r4) /* 803565E0 00353520 40 82 00 20 */ bne lbl_80356600 /* 803565E4 00353524 28 00 00 00 */ cmplwi r0, 0 /* 803565E8 00353528 41 82 00 10 */ beq lbl_803565F8 /* 803565EC 0035352C 38 00 00 00 */ li r0, 0 /* 803565F0 00353530 B0 04 00 00 */ sth r0, 0(r4) /* 803565F4 00353534 3B 80 00 01 */ li r28, 1 lbl_803565F8: /* 803565F8 00353538 39 29 00 01 */ addi r9, r9, 1 /* 803565FC 0035353C 48 00 00 28 */ b lbl_80356624 lbl_80356600: /* 80356600 00353540 28 00 00 05 */ cmplwi r0, 5 /* 80356604 00353544 41 80 00 0C */ blt lbl_80356610 /* 80356608 00353548 7C 00 38 40 */ cmplw r0, r7 /* 8035660C 0035354C 41 80 00 18 */ blt lbl_80356624 lbl_80356610: /* 80356610 00353550 28 00 FF FF */ cmplwi r0, 0xffff /* 80356614 00353554 41 82 00 10 */ beq lbl_80356624 /* 80356618 00353558 38 80 FF FA */ li r4, -6 /* 8035661C 0035355C 4B FF D6 51 */ bl __CARDPutControlBlock /* 80356620 00353560 48 00 02 C0 */ b lbl_803568E0 lbl_80356624: /* 80356624 00353564 38 A5 00 02 */ addi r5, r5, 2 /* 80356628 00353568 38 C6 00 02 */ addi r6, r6, 2 /* 8035662C 0035356C 39 08 00 01 */ addi r8, r8, 1 lbl_80356630: /* 80356630 00353570 A0 E3 00 10 */ lhz r7, 0x10(r3) /* 80356634 00353574 55 00 04 3E */ clrlwi r0, r8, 0x10 /* 80356638 00353578 7C 00 38 40 */ cmplw r0, r7 /* 8035663C 0035357C 41 80 FF 90 */ blt lbl_803565CC /* 80356640 00353580 80 63 00 88 */ lwz r3, 0x88(r3) /* 80356644 00353584 55 24 04 3E */ clrlwi r4, r9, 0x10 /* 80356648 00353588 A4 03 00 06 */ lhzu r0, 6(r3) /* 8035664C 0035358C 7C 04 00 40 */ cmplw r4, r0 /* 80356650 00353590 41 82 00 0C */ beq lbl_8035665C /* 80356654 00353594 B1 23 00 00 */ sth r9, 0(r3) /* 80356658 00353598 3B 80 00 01 */ li r28, 1 lbl_8035665C: /* 8035665C 0035359C 2C 1C 00 00 */ cmpwi r28, 0 /* 80356660 003535A0 41 82 01 C8 */ beq lbl_80356828 /* 80356664 003535A4 80 61 00 30 */ lwz r3, 0x30(r1) /* 80356668 003535A8 38 80 1F FC */ li r4, 0x1ffc /* 8035666C 003535AC 7C 84 0E 70 */ srawi r4, r4, 1 /* 80356670 003535B0 80 C3 00 88 */ lwz r6, 0x88(r3) /* 80356674 003535B4 38 00 00 00 */ li r0, 0 /* 80356678 003535B8 7C 84 01 95 */ addze. r4, r4 /* 8035667C 003535BC B0 06 00 02 */ sth r0, 2(r6) /* 80356680 003535C0 38 E6 00 02 */ addi r7, r6, 2 /* 80356684 003535C4 38 A6 00 04 */ addi r5, r6, 4 /* 80356688 003535C8 B0 06 00 00 */ sth r0, 0(r6) /* 8035668C 003535CC 38 64 00 00 */ addi r3, r4, 0 /* 80356690 003535D0 40 81 01 70 */ ble lbl_80356800 /* 80356694 003535D4 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f /* 80356698 003535D8 7C 09 03 A6 */ mtctr r0 /* 8035669C 003535DC 41 82 01 34 */ beq lbl_803567D0 lbl_803566A0: /* 803566A0 003535E0 A0 86 00 00 */ lhz r4, 0(r6) /* 803566A4 003535E4 A0 05 00 00 */ lhz r0, 0(r5) /* 803566A8 003535E8 7C 04 02 14 */ add r0, r4, r0 /* 803566AC 003535EC B0 06 00 00 */ sth r0, 0(r6) /* 803566B0 003535F0 A0 05 00 00 */ lhz r0, 0(r5) /* 803566B4 003535F4 A0 87 00 00 */ lhz r4, 0(r7) /* 803566B8 003535F8 7C 00 00 F8 */ nor r0, r0, r0 /* 803566BC 003535FC 7C 04 02 14 */ add r0, r4, r0 /* 803566C0 00353600 B0 07 00 00 */ sth r0, 0(r7) /* 803566C4 00353604 A0 86 00 00 */ lhz r4, 0(r6) /* 803566C8 00353608 A0 05 00 02 */ lhz r0, 2(r5) /* 803566CC 0035360C 7C 04 02 14 */ add r0, r4, r0 /* 803566D0 00353610 B0 06 00 00 */ sth r0, 0(r6) /* 803566D4 00353614 A0 05 00 02 */ lhz r0, 2(r5) /* 803566D8 00353618 A0 87 00 00 */ lhz r4, 0(r7) /* 803566DC 0035361C 7C 00 00 F8 */ nor r0, r0, r0 /* 803566E0 00353620 7C 04 02 14 */ add r0, r4, r0 /* 803566E4 00353624 B0 07 00 00 */ sth r0, 0(r7) /* 803566E8 00353628 A0 86 00 00 */ lhz r4, 0(r6) /* 803566EC 0035362C A0 05 00 04 */ lhz r0, 4(r5) /* 803566F0 00353630 7C 04 02 14 */ add r0, r4, r0 /* 803566F4 00353634 B0 06 00 00 */ sth r0, 0(r6) /* 803566F8 00353638 A0 05 00 04 */ lhz r0, 4(r5) /* 803566FC 0035363C A0 87 00 00 */ lhz r4, 0(r7) /* 80356700 00353640 7C 00 00 F8 */ nor r0, r0, r0 /* 80356704 00353644 7C 04 02 14 */ add r0, r4, r0 /* 80356708 00353648 B0 07 00 00 */ sth r0, 0(r7) /* 8035670C 0035364C A0 86 00 00 */ lhz r4, 0(r6) /* 80356710 00353650 A0 05 00 06 */ lhz r0, 6(r5) /* 80356714 00353654 7C 04 02 14 */ add r0, r4, r0 /* 80356718 00353658 B0 06 00 00 */ sth r0, 0(r6) /* 8035671C 0035365C A0 05 00 06 */ lhz r0, 6(r5) /* 80356720 00353660 A0 87 00 00 */ lhz r4, 0(r7) /* 80356724 00353664 7C 00 00 F8 */ nor r0, r0, r0 /* 80356728 00353668 7C 04 02 14 */ add r0, r4, r0 /* 8035672C 0035366C B0 07 00 00 */ sth r0, 0(r7) /* 80356730 00353670 A0 86 00 00 */ lhz r4, 0(r6) /* 80356734 00353674 A0 05 00 08 */ lhz r0, 8(r5) /* 80356738 00353678 7C 04 02 14 */ add r0, r4, r0 /* 8035673C 0035367C B0 06 00 00 */ sth r0, 0(r6) /* 80356740 00353680 A0 05 00 08 */ lhz r0, 8(r5) /* 80356744 00353684 A0 87 00 00 */ lhz r4, 0(r7) /* 80356748 00353688 7C 00 00 F8 */ nor r0, r0, r0 /* 8035674C 0035368C 7C 04 02 14 */ add r0, r4, r0 /* 80356750 00353690 B0 07 00 00 */ sth r0, 0(r7) /* 80356754 00353694 A0 86 00 00 */ lhz r4, 0(r6) /* 80356758 00353698 A0 05 00 0A */ lhz r0, 0xa(r5) /* 8035675C 0035369C 7C 04 02 14 */ add r0, r4, r0 /* 80356760 003536A0 B0 06 00 00 */ sth r0, 0(r6) /* 80356764 003536A4 A0 05 00 0A */ lhz r0, 0xa(r5) /* 80356768 003536A8 A0 87 00 00 */ lhz r4, 0(r7) /* 8035676C 003536AC 7C 00 00 F8 */ nor r0, r0, r0 /* 80356770 003536B0 7C 04 02 14 */ add r0, r4, r0 /* 80356774 003536B4 B0 07 00 00 */ sth r0, 0(r7) /* 80356778 003536B8 A0 86 00 00 */ lhz r4, 0(r6) /* 8035677C 003536BC A0 05 00 0C */ lhz r0, 0xc(r5) /* 80356780 003536C0 7C 04 02 14 */ add r0, r4, r0 /* 80356784 003536C4 B0 06 00 00 */ sth r0, 0(r6) /* 80356788 003536C8 A0 05 00 0C */ lhz r0, 0xc(r5) /* 8035678C 003536CC A0 87 00 00 */ lhz r4, 0(r7) /* 80356790 003536D0 7C 00 00 F8 */ nor r0, r0, r0 /* 80356794 003536D4 7C 04 02 14 */ add r0, r4, r0 /* 80356798 003536D8 B0 07 00 00 */ sth r0, 0(r7) /* 8035679C 003536DC A0 86 00 00 */ lhz r4, 0(r6) /* 803567A0 003536E0 A0 05 00 0E */ lhz r0, 0xe(r5) /* 803567A4 003536E4 7C 04 02 14 */ add r0, r4, r0 /* 803567A8 003536E8 B0 06 00 00 */ sth r0, 0(r6) /* 803567AC 003536EC A0 05 00 0E */ lhz r0, 0xe(r5) /* 803567B0 003536F0 38 A5 00 10 */ addi r5, r5, 0x10 /* 803567B4 003536F4 A0 87 00 00 */ lhz r4, 0(r7) /* 803567B8 003536F8 7C 00 00 F8 */ nor r0, r0, r0 /* 803567BC 003536FC 7C 04 02 14 */ add r0, r4, r0 /* 803567C0 00353700 B0 07 00 00 */ sth r0, 0(r7) /* 803567C4 00353704 42 00 FE DC */ bdnz lbl_803566A0 /* 803567C8 00353708 70 63 00 07 */ andi. r3, r3, 7 /* 803567CC 0035370C 41 82 00 34 */ beq lbl_80356800 lbl_803567D0: /* 803567D0 00353710 7C 69 03 A6 */ mtctr r3 lbl_803567D4: /* 803567D4 00353714 A0 86 00 00 */ lhz r4, 0(r6) /* 803567D8 00353718 A0 05 00 00 */ lhz r0, 0(r5) /* 803567DC 0035371C 7C 04 02 14 */ add r0, r4, r0 /* 803567E0 00353720 B0 06 00 00 */ sth r0, 0(r6) /* 803567E4 00353724 A0 05 00 00 */ lhz r0, 0(r5) /* 803567E8 00353728 38 A5 00 02 */ addi r5, r5, 2 /* 803567EC 0035372C A0 87 00 00 */ lhz r4, 0(r7) /* 803567F0 00353730 7C 00 00 F8 */ nor r0, r0, r0 /* 803567F4 00353734 7C 04 02 14 */ add r0, r4, r0 /* 803567F8 00353738 B0 07 00 00 */ sth r0, 0(r7) /* 803567FC 0035373C 42 00 FF D8 */ bdnz lbl_803567D4 lbl_80356800: /* 80356800 00353740 A0 06 00 00 */ lhz r0, 0(r6) /* 80356804 00353744 28 00 FF FF */ cmplwi r0, 0xffff /* 80356808 00353748 40 82 00 0C */ bne lbl_80356814 /* 8035680C 0035374C 38 00 00 00 */ li r0, 0 /* 80356810 00353750 B0 06 00 00 */ sth r0, 0(r6) lbl_80356814: /* 80356814 00353754 A0 07 00 00 */ lhz r0, 0(r7) /* 80356818 00353758 28 00 FF FF */ cmplwi r0, 0xffff /* 8035681C 0035375C 40 82 00 0C */ bne lbl_80356828 /* 80356820 00353760 38 00 00 00 */ li r0, 0 /* 80356824 00353764 B0 07 00 00 */ sth r0, 0(r7) lbl_80356828: /* 80356828 00353768 80 C1 00 1C */ lwz r6, 0x1c(r1) /* 8035682C 0035376C 38 81 00 20 */ addi r4, r1, 0x20 /* 80356830 00353770 38 A0 20 00 */ li r5, 0x2000 /* 80356834 00353774 68 C0 00 01 */ xori r0, r6, 1 /* 80356838 00353778 54 03 10 3A */ slwi r3, r0, 2 /* 8035683C 0035377C 54 C0 10 3A */ slwi r0, r6, 2 /* 80356840 00353780 7C 64 18 2E */ lwzx r3, r4, r3 /* 80356844 00353784 7C 84 00 2E */ lwzx r4, r4, r0 /* 80356848 00353788 4B CA CC F9 */ bl memcpy /* 8035684C 0035378C 2C 1D 00 00 */ cmpwi r29, 0 /* 80356850 00353790 41 82 00 24 */ beq lbl_80356874 /* 80356854 00353794 28 1A 00 00 */ cmplwi r26, 0 /* 80356858 00353798 41 82 00 0C */ beq lbl_80356864 /* 8035685C 0035379C 38 00 20 00 */ li r0, 0x2000 /* 80356860 003537A0 90 1A 00 00 */ stw r0, 0(r26) lbl_80356864: /* 80356864 003537A4 38 79 00 00 */ addi r3, r25, 0 /* 80356868 003537A8 38 9B 00 00 */ addi r4, r27, 0 /* 8035686C 003537AC 4B FF F0 B1 */ bl __CARDUpdateDir /* 80356870 003537B0 48 00 00 70 */ b lbl_803568E0 lbl_80356874: /* 80356874 003537B4 7F C0 E3 79 */ or. r0, r30, r28 /* 80356878 003537B8 41 82 00 2C */ beq lbl_803568A4 /* 8035687C 003537BC 28 1A 00 00 */ cmplwi r26, 0 /* 80356880 003537C0 41 82 00 0C */ beq lbl_8035688C /* 80356884 003537C4 38 00 20 00 */ li r0, 0x2000 /* 80356888 003537C8 90 1A 00 00 */ stw r0, 0(r26) lbl_8035688C: /* 8035688C 003537CC 80 81 00 30 */ lwz r4, 0x30(r1) /* 80356890 003537D0 38 79 00 00 */ addi r3, r25, 0 /* 80356894 003537D4 38 BB 00 00 */ addi r5, r27, 0 /* 80356898 003537D8 80 84 00 88 */ lwz r4, 0x88(r4) /* 8035689C 003537DC 4B FF EE 35 */ bl __CARDUpdateFatBlock /* 803568A0 003537E0 48 00 00 40 */ b lbl_803568E0 lbl_803568A4: /* 803568A4 003537E4 80 61 00 30 */ lwz r3, 0x30(r1) /* 803568A8 003537E8 38 80 00 00 */ li r4, 0 /* 803568AC 003537EC 4B FF D3 C1 */ bl __CARDPutControlBlock /* 803568B0 003537F0 28 1B 00 00 */ cmplwi r27, 0 /* 803568B4 003537F4 41 82 00 28 */ beq lbl_803568DC /* 803568B8 003537F8 4B FE 6E 3D */ bl __RAS_OSDisableInterrupts_begin /* 803568BC 003537FC 39 9B 00 00 */ addi r12, r27, 0 /* 803568C0 00353800 7D 88 03 A6 */ mtlr r12 /* 803568C4 00353804 3B 43 00 00 */ addi r26, r3, 0 /* 803568C8 00353808 38 79 00 00 */ addi r3, r25, 0 /* 803568CC 0035380C 38 80 00 00 */ li r4, 0 /* 803568D0 00353810 4E 80 00 21 */ blrl /* 803568D4 00353814 7F 43 D3 78 */ mr r3, r26 /* 803568D8 00353818 4B FE 6E 45 */ bl OSRestoreInterrupts lbl_803568DC: /* 803568DC 0035381C 38 60 00 00 */ li r3, 0 lbl_803568E0: /* 803568E0 00353820 BB 21 00 3C */ lmw r25, 0x3c(r1) /* 803568E4 00353824 80 01 00 5C */ lwz r0, 0x5c(r1) /* 803568E8 00353828 38 21 00 58 */ addi r1, r1, 0x58 /* 803568EC 0035382C 7C 08 03 A6 */ mtlr r0 /* 803568F0 00353830 4E 80 00 20 */ blr .global CARDCheck CARDCheck: /* 803568F4 00353834 7C 08 02 A6 */ mflr r0 .global __CARDSyncCallback /* 803568F8 00353838 3C 80 80 35 */ lis r4, __CARDSyncCallback@ha /* 803568FC 0035383C 90 01 00 04 */ stw r0, 4(r1) .global __CARDSyncCallback /* 80356900 00353840 38 A4 2A 34 */ addi r5, r4, __CARDSyncCallback@l /* 80356904 00353844 94 21 FF E8 */ stwu r1, -0x18(r1) /* 80356908 00353848 93 E1 00 14 */ stw r31, 0x14(r1) /* 8035690C 0035384C 3B E3 00 00 */ addi r31, r3, 0 /* 80356910 00353850 38 81 00 0C */ addi r4, r1, 0xc /* 80356914 00353854 4B FF FA 51 */ bl CARDCheckExAsync /* 80356918 00353858 2C 03 00 00 */ cmpwi r3, 0 /* 8035691C 0035385C 41 80 00 18 */ blt lbl_80356934 /* 80356920 00353860 34 01 00 0C */ addic. r0, r1, 0xc /* 80356924 00353864 40 82 00 08 */ bne lbl_8035692C /* 80356928 00353868 48 00 00 0C */ b lbl_80356934 lbl_8035692C: /* 8035692C 0035386C 7F E3 FB 78 */ mr r3, r31 /* 80356930 00353870 4B FF D4 F1 */ bl __CARDSync lbl_80356934: /* 80356934 00353874 80 01 00 1C */ lwz r0, 0x1c(r1) /* 80356938 00353878 83 E1 00 14 */ lwz r31, 0x14(r1) /* 8035693C 0035387C 38 21 00 18 */ addi r1, r1, 0x18 /* 80356940 00353880 7C 08 03 A6 */ mtlr r0 /* 80356944 00353884 4E 80 00 20 */ blr