prime/asm/Dolphin/card/CARDCheck.s

1094 lines
51 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .text, "ax"
.global __CARDCheckSum
__CARDCheckSum:
/* 803BABD4 003B7B34 38 00 00 00 */ li r0, 0
/* 803BABD8 003B7B38 7C 84 0E 70 */ srawi r4, r4, 1
/* 803BABDC 003B7B3C B0 06 00 00 */ sth r0, 0(r6)
/* 803BABE0 003B7B40 7C 84 01 95 */ addze. r4, r4
/* 803BABE4 003B7B44 B0 05 00 00 */ sth r0, 0(r5)
/* 803BABE8 003B7B48 40 81 01 70 */ ble lbl_803BAD58
/* 803BABEC 003B7B4C 54 80 E8 FF */ rlwinm. r0, r4, 0x1d, 3, 0x1f
/* 803BABF0 003B7B50 7C 09 03 A6 */ mtctr r0
/* 803BABF4 003B7B54 41 82 01 34 */ beq lbl_803BAD28
lbl_803BABF8:
/* 803BABF8 003B7B58 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BABFC 003B7B5C A0 03 00 00 */ lhz r0, 0(r3)
/* 803BAC00 003B7B60 7C 07 02 14 */ add r0, r7, r0
/* 803BAC04 003B7B64 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAC08 003B7B68 A0 03 00 00 */ lhz r0, 0(r3)
/* 803BAC0C 003B7B6C A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAC10 003B7B70 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAC14 003B7B74 7C 07 02 14 */ add r0, r7, r0
/* 803BAC18 003B7B78 B0 06 00 00 */ sth r0, 0(r6)
/* 803BAC1C 003B7B7C A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BAC20 003B7B80 A0 03 00 02 */ lhz r0, 2(r3)
/* 803BAC24 003B7B84 7C 07 02 14 */ add r0, r7, r0
/* 803BAC28 003B7B88 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAC2C 003B7B8C A0 03 00 02 */ lhz r0, 2(r3)
/* 803BAC30 003B7B90 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAC34 003B7B94 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAC38 003B7B98 7C 07 02 14 */ add r0, r7, r0
/* 803BAC3C 003B7B9C B0 06 00 00 */ sth r0, 0(r6)
/* 803BAC40 003B7BA0 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BAC44 003B7BA4 A0 03 00 04 */ lhz r0, 4(r3)
/* 803BAC48 003B7BA8 7C 07 02 14 */ add r0, r7, r0
/* 803BAC4C 003B7BAC B0 05 00 00 */ sth r0, 0(r5)
/* 803BAC50 003B7BB0 A0 03 00 04 */ lhz r0, 4(r3)
/* 803BAC54 003B7BB4 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAC58 003B7BB8 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAC5C 003B7BBC 7C 07 02 14 */ add r0, r7, r0
/* 803BAC60 003B7BC0 B0 06 00 00 */ sth r0, 0(r6)
/* 803BAC64 003B7BC4 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BAC68 003B7BC8 A0 03 00 06 */ lhz r0, 6(r3)
/* 803BAC6C 003B7BCC 7C 07 02 14 */ add r0, r7, r0
/* 803BAC70 003B7BD0 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAC74 003B7BD4 A0 03 00 06 */ lhz r0, 6(r3)
/* 803BAC78 003B7BD8 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAC7C 003B7BDC 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAC80 003B7BE0 7C 07 02 14 */ add r0, r7, r0
/* 803BAC84 003B7BE4 B0 06 00 00 */ sth r0, 0(r6)
/* 803BAC88 003B7BE8 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BAC8C 003B7BEC A0 03 00 08 */ lhz r0, 8(r3)
/* 803BAC90 003B7BF0 7C 07 02 14 */ add r0, r7, r0
/* 803BAC94 003B7BF4 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAC98 003B7BF8 A0 03 00 08 */ lhz r0, 8(r3)
/* 803BAC9C 003B7BFC A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BACA0 003B7C00 7C 00 00 F8 */ nor r0, r0, r0
/* 803BACA4 003B7C04 7C 07 02 14 */ add r0, r7, r0
/* 803BACA8 003B7C08 B0 06 00 00 */ sth r0, 0(r6)
/* 803BACAC 003B7C0C A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BACB0 003B7C10 A0 03 00 0A */ lhz r0, 0xa(r3)
/* 803BACB4 003B7C14 7C 07 02 14 */ add r0, r7, r0
/* 803BACB8 003B7C18 B0 05 00 00 */ sth r0, 0(r5)
/* 803BACBC 003B7C1C A0 03 00 0A */ lhz r0, 0xa(r3)
/* 803BACC0 003B7C20 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BACC4 003B7C24 7C 00 00 F8 */ nor r0, r0, r0
/* 803BACC8 003B7C28 7C 07 02 14 */ add r0, r7, r0
/* 803BACCC 003B7C2C B0 06 00 00 */ sth r0, 0(r6)
/* 803BACD0 003B7C30 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BACD4 003B7C34 A0 03 00 0C */ lhz r0, 0xc(r3)
/* 803BACD8 003B7C38 7C 07 02 14 */ add r0, r7, r0
/* 803BACDC 003B7C3C B0 05 00 00 */ sth r0, 0(r5)
/* 803BACE0 003B7C40 A0 03 00 0C */ lhz r0, 0xc(r3)
/* 803BACE4 003B7C44 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BACE8 003B7C48 7C 00 00 F8 */ nor r0, r0, r0
/* 803BACEC 003B7C4C 7C 07 02 14 */ add r0, r7, r0
/* 803BACF0 003B7C50 B0 06 00 00 */ sth r0, 0(r6)
/* 803BACF4 003B7C54 A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BACF8 003B7C58 A0 03 00 0E */ lhz r0, 0xe(r3)
/* 803BACFC 003B7C5C 7C 07 02 14 */ add r0, r7, r0
/* 803BAD00 003B7C60 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAD04 003B7C64 A0 03 00 0E */ lhz r0, 0xe(r3)
/* 803BAD08 003B7C68 38 63 00 10 */ addi r3, r3, 0x10
/* 803BAD0C 003B7C6C A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAD10 003B7C70 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAD14 003B7C74 7C 07 02 14 */ add r0, r7, r0
/* 803BAD18 003B7C78 B0 06 00 00 */ sth r0, 0(r6)
/* 803BAD1C 003B7C7C 42 00 FE DC */ bdnz lbl_803BABF8
/* 803BAD20 003B7C80 70 84 00 07 */ andi. r4, r4, 7
/* 803BAD24 003B7C84 41 82 00 34 */ beq lbl_803BAD58
lbl_803BAD28:
/* 803BAD28 003B7C88 7C 89 03 A6 */ mtctr r4
lbl_803BAD2C:
/* 803BAD2C 003B7C8C A0 E5 00 00 */ lhz r7, 0(r5)
/* 803BAD30 003B7C90 A0 03 00 00 */ lhz r0, 0(r3)
/* 803BAD34 003B7C94 7C 07 02 14 */ add r0, r7, r0
/* 803BAD38 003B7C98 B0 05 00 00 */ sth r0, 0(r5)
/* 803BAD3C 003B7C9C A0 03 00 00 */ lhz r0, 0(r3)
/* 803BAD40 003B7CA0 38 63 00 02 */ addi r3, r3, 2
/* 803BAD44 003B7CA4 A0 E6 00 00 */ lhz r7, 0(r6)
/* 803BAD48 003B7CA8 7C 00 00 F8 */ nor r0, r0, r0
/* 803BAD4C 003B7CAC 7C 07 02 14 */ add r0, r7, r0
/* 803BAD50 003B7CB0 B0 06 00 00 */ sth r0, 0(r6)
/* 803BAD54 003B7CB4 42 00 FF D8 */ bdnz lbl_803BAD2C
lbl_803BAD58:
/* 803BAD58 003B7CB8 A0 05 00 00 */ lhz r0, 0(r5)
/* 803BAD5C 003B7CBC 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BAD60 003B7CC0 40 82 00 0C */ bne lbl_803BAD6C
/* 803BAD64 003B7CC4 38 00 00 00 */ li r0, 0
/* 803BAD68 003B7CC8 B0 05 00 00 */ sth r0, 0(r5)
lbl_803BAD6C:
/* 803BAD6C 003B7CCC A0 06 00 00 */ lhz r0, 0(r6)
/* 803BAD70 003B7CD0 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BAD74 003B7CD4 4C 82 00 20 */ bnelr
/* 803BAD78 003B7CD8 38 00 00 00 */ li r0, 0
/* 803BAD7C 003B7CDC B0 06 00 00 */ sth r0, 0(r6)
/* 803BAD80 003B7CE0 4E 80 00 20 */ blr
.global VerifyID
VerifyID:
/* 803BAD84 003B7CE4 7C 08 02 A6 */ mflr r0
/* 803BAD88 003B7CE8 90 01 00 04 */ stw r0, 4(r1)
/* 803BAD8C 003B7CEC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 803BAD90 003B7CF0 BF 21 00 14 */ stmw r25, 0x14(r1)
/* 803BAD94 003B7CF4 7C 7A 1B 78 */ mr r26, r3
/* 803BAD98 003B7CF8 80 63 00 80 */ lwz r3, 0x80(r3)
/* 803BAD9C 003B7CFC A0 03 00 20 */ lhz r0, 0x20(r3)
/* 803BADA0 003B7D00 3B 63 00 00 */ addi r27, r3, 0
/* 803BADA4 003B7D04 28 00 00 00 */ cmplwi r0, 0
/* 803BADA8 003B7D08 40 82 00 14 */ bne lbl_803BADBC
/* 803BADAC 003B7D0C A0 7B 00 22 */ lhz r3, 0x22(r27)
/* 803BADB0 003B7D10 A0 1A 00 08 */ lhz r0, 8(r26)
/* 803BADB4 003B7D14 7C 03 00 40 */ cmplw r3, r0
/* 803BADB8 003B7D18 41 82 00 0C */ beq lbl_803BADC4
lbl_803BADBC:
/* 803BADBC 003B7D1C 38 60 FF FA */ li r3, -6
/* 803BADC0 003B7D20 48 00 02 34 */ b lbl_803BAFF4
lbl_803BADC4:
/* 803BADC4 003B7D24 38 00 01 FC */ li r0, 0x1fc
/* 803BADC8 003B7D28 7C 00 0E 70 */ srawi r0, r0, 1
/* 803BADCC 003B7D2C 7C 00 01 95 */ addze. r0, r0
/* 803BADD0 003B7D30 38 9B 00 00 */ addi r4, r27, 0
/* 803BADD4 003B7D34 38 E0 00 00 */ li r7, 0
/* 803BADD8 003B7D38 7C 03 03 78 */ mr r3, r0
/* 803BADDC 003B7D3C 38 C0 00 00 */ li r6, 0
/* 803BADE0 003B7D40 40 81 00 BC */ ble lbl_803BAE9C
/* 803BADE4 003B7D44 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803BADE8 003B7D48 7C 09 03 A6 */ mtctr r0
/* 803BADEC 003B7D4C 41 82 00 94 */ beq lbl_803BAE80
lbl_803BADF0:
/* 803BADF0 003B7D50 A0 A4 00 00 */ lhz r5, 0(r4)
/* 803BADF4 003B7D54 7C A0 28 F8 */ nor r0, r5, r5
/* 803BADF8 003B7D58 7C C6 2A 14 */ add r6, r6, r5
/* 803BADFC 003B7D5C A0 A4 00 02 */ lhz r5, 2(r4)
/* 803BAE00 003B7D60 7C E7 02 14 */ add r7, r7, r0
/* 803BAE04 003B7D64 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE08 003B7D68 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE0C 003B7D6C A0 A4 00 04 */ lhz r5, 4(r4)
/* 803BAE10 003B7D70 7C E7 02 14 */ add r7, r7, r0
/* 803BAE14 003B7D74 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE18 003B7D78 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE1C 003B7D7C A0 A4 00 06 */ lhz r5, 6(r4)
/* 803BAE20 003B7D80 7C E7 02 14 */ add r7, r7, r0
/* 803BAE24 003B7D84 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE28 003B7D88 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE2C 003B7D8C A0 A4 00 08 */ lhz r5, 8(r4)
/* 803BAE30 003B7D90 7C E7 02 14 */ add r7, r7, r0
/* 803BAE34 003B7D94 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE38 003B7D98 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE3C 003B7D9C A0 A4 00 0A */ lhz r5, 0xa(r4)
/* 803BAE40 003B7DA0 7C E7 02 14 */ add r7, r7, r0
/* 803BAE44 003B7DA4 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE48 003B7DA8 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE4C 003B7DAC A0 A4 00 0C */ lhz r5, 0xc(r4)
/* 803BAE50 003B7DB0 7C E7 02 14 */ add r7, r7, r0
/* 803BAE54 003B7DB4 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE58 003B7DB8 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE5C 003B7DBC A0 A4 00 0E */ lhz r5, 0xe(r4)
/* 803BAE60 003B7DC0 7C E7 02 14 */ add r7, r7, r0
/* 803BAE64 003B7DC4 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE68 003B7DC8 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE6C 003B7DCC 7C E7 02 14 */ add r7, r7, r0
/* 803BAE70 003B7DD0 38 84 00 10 */ addi r4, r4, 0x10
/* 803BAE74 003B7DD4 42 00 FF 7C */ bdnz lbl_803BADF0
/* 803BAE78 003B7DD8 70 63 00 07 */ andi. r3, r3, 7
/* 803BAE7C 003B7DDC 41 82 00 20 */ beq lbl_803BAE9C
lbl_803BAE80:
/* 803BAE80 003B7DE0 7C 69 03 A6 */ mtctr r3
lbl_803BAE84:
/* 803BAE84 003B7DE4 A0 A4 00 00 */ lhz r5, 0(r4)
/* 803BAE88 003B7DE8 38 84 00 02 */ addi r4, r4, 2
/* 803BAE8C 003B7DEC 7C A0 28 F8 */ nor r0, r5, r5
/* 803BAE90 003B7DF0 7C C6 2A 14 */ add r6, r6, r5
/* 803BAE94 003B7DF4 7C E7 02 14 */ add r7, r7, r0
/* 803BAE98 003B7DF8 42 00 FF EC */ bdnz lbl_803BAE84
lbl_803BAE9C:
/* 803BAE9C 003B7DFC 54 C0 04 3E */ clrlwi r0, r6, 0x10
/* 803BAEA0 003B7E00 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BAEA4 003B7E04 40 82 00 08 */ bne lbl_803BAEAC
/* 803BAEA8 003B7E08 38 C0 00 00 */ li r6, 0
lbl_803BAEAC:
/* 803BAEAC 003B7E0C 54 E0 04 3E */ clrlwi r0, r7, 0x10
/* 803BAEB0 003B7E10 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BAEB4 003B7E14 40 82 00 08 */ bne lbl_803BAEBC
/* 803BAEB8 003B7E18 38 E0 00 00 */ li r7, 0
lbl_803BAEBC:
/* 803BAEBC 003B7E1C A0 7B 01 FC */ lhz r3, 0x1fc(r27)
/* 803BAEC0 003B7E20 54 C0 04 3E */ clrlwi r0, r6, 0x10
/* 803BAEC4 003B7E24 7C 03 00 40 */ cmplw r3, r0
/* 803BAEC8 003B7E28 40 82 00 14 */ bne lbl_803BAEDC
/* 803BAECC 003B7E2C A0 7B 01 FE */ lhz r3, 0x1fe(r27)
/* 803BAED0 003B7E30 54 E0 04 3E */ clrlwi r0, r7, 0x10
/* 803BAED4 003B7E34 7C 03 00 40 */ cmplw r3, r0
/* 803BAED8 003B7E38 41 82 00 0C */ beq lbl_803BAEE4
lbl_803BAEDC:
/* 803BAEDC 003B7E3C 38 60 FF FA */ li r3, -6
/* 803BAEE0 003B7E40 48 00 01 14 */ b lbl_803BAFF4
lbl_803BAEE4:
/* 803BAEE4 003B7E44 83 FB 00 0C */ lwz r31, 0xc(r27)
/* 803BAEE8 003B7E48 83 9B 00 10 */ lwz r28, 0x10(r27)
/* 803BAEEC 003B7E4C 4B FC 8C 45 */ bl __OSLockSramEx
/* 803BAEF0 003B7E50 3C 80 80 57 */ lis r4, __CARDBlock@ha
/* 803BAEF4 003B7E54 38 04 9A 58 */ addi r0, r4, __CARDBlock@l
/* 803BAEF8 003B7E58 3C 80 78 78 */ lis r4, 0x78787879@ha
/* 803BAEFC 003B7E5C 7C 00 D0 50 */ subf r0, r0, r26
/* 803BAF00 003B7E60 38 84 78 79 */ addi r4, r4, 0x78787879@l
/* 803BAF04 003B7E64 7C 04 00 96 */ mulhw r0, r4, r0
/* 803BAF08 003B7E68 7C 00 3E 70 */ srawi r0, r0, 7
/* 803BAF0C 003B7E6C 54 04 0F FE */ srwi r4, r0, 0x1f
/* 803BAF10 003B7E70 7C 00 22 14 */ add r0, r0, r4
/* 803BAF14 003B7E74 1C 00 00 0C */ mulli r0, r0, 0xc
/* 803BAF18 003B7E78 3C 80 41 C6 */ lis r4, 0x41C64E6D@ha
/* 803BAF1C 003B7E7C 3B 3B 00 00 */ addi r25, r27, 0
/* 803BAF20 003B7E80 7F A3 02 14 */ add r29, r3, r0
/* 803BAF24 003B7E84 3B C4 4E 6D */ addi r30, r4, 0x41C64E6D@l
/* 803BAF28 003B7E88 3B 40 00 00 */ li r26, 0
lbl_803BAF2C:
/* 803BAF2C 003B7E8C 7C BF F1 D6 */ mullw r5, r31, r30
/* 803BAF30 003B7E90 7C 7C F0 16 */ mulhwu r3, r28, r30
/* 803BAF34 003B7E94 3B E0 00 00 */ li r31, 0
/* 803BAF38 003B7E98 7C A5 1A 14 */ add r5, r5, r3
/* 803BAF3C 003B7E9C 7C 7C F9 D6 */ mullw r3, r28, r31
/* 803BAF40 003B7EA0 7C 1C F1 D6 */ mullw r0, r28, r30
/* 803BAF44 003B7EA4 3B 80 30 39 */ li r28, 0x3039
/* 803BAF48 003B7EA8 7C 80 E0 14 */ addc r4, r0, r28
/* 803BAF4C 003B7EAC 7C 05 1A 14 */ add r0, r5, r3
/* 803BAF50 003B7EB0 7C 60 F9 14 */ adde r3, r0, r31
/* 803BAF54 003B7EB4 38 A0 00 10 */ li r5, 0x10
/* 803BAF58 003B7EB8 4B FC EF E5 */ bl __shr2i
/* 803BAF5C 003B7EBC 88 1D 00 00 */ lbz r0, 0(r29)
/* 803BAF60 003B7EC0 88 D9 00 00 */ lbz r6, 0(r25)
/* 803BAF64 003B7EC4 7C 04 00 14 */ addc r0, r4, r0
/* 803BAF68 003B7EC8 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 803BAF6C 003B7ECC 7C 06 00 40 */ cmplw r6, r0
/* 803BAF70 003B7ED0 41 82 00 14 */ beq lbl_803BAF84
/* 803BAF74 003B7ED4 38 60 00 00 */ li r3, 0
/* 803BAF78 003B7ED8 4B FC 8F 41 */ bl __OSUnlockSramEx
/* 803BAF7C 003B7EDC 38 60 FF FA */ li r3, -6
/* 803BAF80 003B7EE0 48 00 00 74 */ b lbl_803BAFF4
lbl_803BAF84:
/* 803BAF84 003B7EE4 7C A3 F1 D6 */ mullw r5, r3, r30
/* 803BAF88 003B7EE8 7C 64 F0 16 */ mulhwu r3, r4, r30
/* 803BAF8C 003B7EEC 7C A5 1A 14 */ add r5, r5, r3
/* 803BAF90 003B7EF0 7C 64 F9 D6 */ mullw r3, r4, r31
/* 803BAF94 003B7EF4 7C 04 F1 D6 */ mullw r0, r4, r30
/* 803BAF98 003B7EF8 7C 80 E0 14 */ addc r4, r0, r28
/* 803BAF9C 003B7EFC 7C 05 1A 14 */ add r0, r5, r3
/* 803BAFA0 003B7F00 7C 60 F9 14 */ adde r3, r0, r31
/* 803BAFA4 003B7F04 38 A0 00 10 */ li r5, 0x10
/* 803BAFA8 003B7F08 4B FC EF 95 */ bl __shr2i
/* 803BAFAC 003B7F0C 3B 5A 00 01 */ addi r26, r26, 1
/* 803BAFB0 003B7F10 2C 1A 00 0C */ cmpwi r26, 0xc
/* 803BAFB4 003B7F14 38 00 7F FF */ li r0, 0x7fff
/* 803BAFB8 003B7F18 7C 9C 00 38 */ and r28, r4, r0
/* 803BAFBC 003B7F1C 7C 7F F8 38 */ and r31, r3, r31
/* 803BAFC0 003B7F20 3B BD 00 01 */ addi r29, r29, 1
/* 803BAFC4 003B7F24 3B 39 00 01 */ addi r25, r25, 1
/* 803BAFC8 003B7F28 41 80 FF 64 */ blt lbl_803BAF2C
/* 803BAFCC 003B7F2C 38 60 00 00 */ li r3, 0
/* 803BAFD0 003B7F30 4B FC 8E E9 */ bl __OSUnlockSramEx
/* 803BAFD4 003B7F34 4B FF DD 8D */ bl __CARDGetFontEncode
/* 803BAFD8 003B7F38 A0 1B 00 24 */ lhz r0, 0x24(r27)
/* 803BAFDC 003B7F3C 54 63 04 3E */ clrlwi r3, r3, 0x10
/* 803BAFE0 003B7F40 7C 00 18 40 */ cmplw r0, r3
/* 803BAFE4 003B7F44 41 82 00 0C */ beq lbl_803BAFF0
/* 803BAFE8 003B7F48 38 60 FF F3 */ li r3, -13
/* 803BAFEC 003B7F4C 48 00 00 08 */ b lbl_803BAFF4
lbl_803BAFF0:
/* 803BAFF0 003B7F50 38 60 00 00 */ li r3, 0
lbl_803BAFF4:
/* 803BAFF4 003B7F54 BB 21 00 14 */ lmw r25, 0x14(r1)
/* 803BAFF8 003B7F58 80 01 00 34 */ lwz r0, 0x34(r1)
/* 803BAFFC 003B7F5C 38 21 00 30 */ addi r1, r1, 0x30
/* 803BB000 003B7F60 7C 08 03 A6 */ mtlr r0
/* 803BB004 003B7F64 4E 80 00 20 */ blr
.global VerifyDir
VerifyDir:
/* 803BB008 003B7F68 7C 08 02 A6 */ mflr r0
/* 803BB00C 003B7F6C 90 01 00 04 */ stw r0, 4(r1)
/* 803BB010 003B7F70 94 21 FF C8 */ stwu r1, -0x38(r1)
/* 803BB014 003B7F74 93 E1 00 34 */ stw r31, 0x34(r1)
/* 803BB018 003B7F78 38 E1 00 1C */ addi r7, r1, 0x1c
/* 803BB01C 003B7F7C 39 01 00 14 */ addi r8, r1, 0x14
/* 803BB020 003B7F80 93 C1 00 30 */ stw r30, 0x30(r1)
/* 803BB024 003B7F84 3B E0 00 00 */ li r31, 0
/* 803BB028 003B7F88 3B C0 00 00 */ li r30, 0
/* 803BB02C 003B7F8C 93 A1 00 2C */ stw r29, 0x2c(r1)
/* 803BB030 003B7F90 3B A4 00 00 */ addi r29, r4, 0
/* 803BB034 003B7F94 38 80 00 00 */ li r4, 0
lbl_803BB038:
/* 803BB038 003B7F98 38 04 00 01 */ addi r0, r4, 1
/* 803BB03C 003B7F9C 80 A3 00 80 */ lwz r5, 0x80(r3)
/* 803BB040 003B7FA0 54 00 68 24 */ slwi r0, r0, 0xd
/* 803BB044 003B7FA4 7C 05 02 14 */ add r0, r5, r0
/* 803BB048 003B7FA8 90 07 00 00 */ stw r0, 0(r7)
/* 803BB04C 003B7FAC 38 C0 1F FC */ li r6, 0x1ffc
/* 803BB050 003B7FB0 7C C6 0E 70 */ srawi r6, r6, 1
/* 803BB054 003B7FB4 80 A7 00 00 */ lwz r5, 0(r7)
/* 803BB058 003B7FB8 7C C6 01 95 */ addze. r6, r6
/* 803BB05C 003B7FBC 39 60 00 00 */ li r11, 0
/* 803BB060 003B7FC0 38 05 1F C0 */ addi r0, r5, 0x1fc0
/* 803BB064 003B7FC4 90 08 00 00 */ stw r0, 0(r8)
/* 803BB068 003B7FC8 39 40 00 00 */ li r10, 0
/* 803BB06C 003B7FCC 80 A7 00 00 */ lwz r5, 0(r7)
/* 803BB070 003B7FD0 40 81 00 BC */ ble lbl_803BB12C
/* 803BB074 003B7FD4 54 C0 E8 FF */ rlwinm. r0, r6, 0x1d, 3, 0x1f
/* 803BB078 003B7FD8 7C 09 03 A6 */ mtctr r0
/* 803BB07C 003B7FDC 41 82 00 94 */ beq lbl_803BB110
lbl_803BB080:
/* 803BB080 003B7FE0 A1 25 00 00 */ lhz r9, 0(r5)
/* 803BB084 003B7FE4 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB088 003B7FE8 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB08C 003B7FEC A1 25 00 02 */ lhz r9, 2(r5)
/* 803BB090 003B7FF0 7D 6B 02 14 */ add r11, r11, r0
/* 803BB094 003B7FF4 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB098 003B7FF8 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB09C 003B7FFC A1 25 00 04 */ lhz r9, 4(r5)
/* 803BB0A0 003B8000 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0A4 003B8004 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0A8 003B8008 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0AC 003B800C A1 25 00 06 */ lhz r9, 6(r5)
/* 803BB0B0 003B8010 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0B4 003B8014 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0B8 003B8018 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0BC 003B801C A1 25 00 08 */ lhz r9, 8(r5)
/* 803BB0C0 003B8020 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0C4 003B8024 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0C8 003B8028 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0CC 003B802C A1 25 00 0A */ lhz r9, 0xa(r5)
/* 803BB0D0 003B8030 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0D4 003B8034 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0D8 003B8038 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0DC 003B803C A1 25 00 0C */ lhz r9, 0xc(r5)
/* 803BB0E0 003B8040 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0E4 003B8044 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0E8 003B8048 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0EC 003B804C A1 25 00 0E */ lhz r9, 0xe(r5)
/* 803BB0F0 003B8050 7D 6B 02 14 */ add r11, r11, r0
/* 803BB0F4 003B8054 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB0F8 003B8058 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB0FC 003B805C 7D 6B 02 14 */ add r11, r11, r0
/* 803BB100 003B8060 38 A5 00 10 */ addi r5, r5, 0x10
/* 803BB104 003B8064 42 00 FF 7C */ bdnz lbl_803BB080
/* 803BB108 003B8068 70 C6 00 07 */ andi. r6, r6, 7
/* 803BB10C 003B806C 41 82 00 20 */ beq lbl_803BB12C
lbl_803BB110:
/* 803BB110 003B8070 7C C9 03 A6 */ mtctr r6
lbl_803BB114:
/* 803BB114 003B8074 A1 25 00 00 */ lhz r9, 0(r5)
/* 803BB118 003B8078 38 A5 00 02 */ addi r5, r5, 2
/* 803BB11C 003B807C 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB120 003B8080 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB124 003B8084 7D 6B 02 14 */ add r11, r11, r0
/* 803BB128 003B8088 42 00 FF EC */ bdnz lbl_803BB114
lbl_803BB12C:
/* 803BB12C 003B808C 55 40 04 3E */ clrlwi r0, r10, 0x10
/* 803BB130 003B8090 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB134 003B8094 40 82 00 08 */ bne lbl_803BB13C
/* 803BB138 003B8098 39 40 00 00 */ li r10, 0
lbl_803BB13C:
/* 803BB13C 003B809C 55 60 04 3E */ clrlwi r0, r11, 0x10
/* 803BB140 003B80A0 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB144 003B80A4 40 82 00 08 */ bne lbl_803BB14C
/* 803BB148 003B80A8 39 60 00 00 */ li r11, 0
lbl_803BB14C:
/* 803BB14C 003B80AC 80 C8 00 00 */ lwz r6, 0(r8)
/* 803BB150 003B80B0 55 45 04 3E */ clrlwi r5, r10, 0x10
/* 803BB154 003B80B4 A0 06 00 3C */ lhz r0, 0x3c(r6)
/* 803BB158 003B80B8 7C 05 00 40 */ cmplw r5, r0
/* 803BB15C 003B80BC 40 82 00 14 */ bne lbl_803BB170
/* 803BB160 003B80C0 A0 06 00 3E */ lhz r0, 0x3e(r6)
/* 803BB164 003B80C4 55 65 04 3E */ clrlwi r5, r11, 0x10
/* 803BB168 003B80C8 7C 05 00 40 */ cmplw r5, r0
/* 803BB16C 003B80CC 41 82 00 14 */ beq lbl_803BB180
lbl_803BB170:
/* 803BB170 003B80D0 38 00 00 00 */ li r0, 0
/* 803BB174 003B80D4 90 03 00 84 */ stw r0, 0x84(r3)
/* 803BB178 003B80D8 3B C4 00 00 */ addi r30, r4, 0
/* 803BB17C 003B80DC 3B FF 00 01 */ addi r31, r31, 1
lbl_803BB180:
/* 803BB180 003B80E0 38 84 00 01 */ addi r4, r4, 1
/* 803BB184 003B80E4 2C 04 00 02 */ cmpwi r4, 2
/* 803BB188 003B80E8 38 E7 00 04 */ addi r7, r7, 4
/* 803BB18C 003B80EC 39 08 00 04 */ addi r8, r8, 4
/* 803BB190 003B80F0 41 80 FE A8 */ blt lbl_803BB038
/* 803BB194 003B80F4 2C 1F 00 00 */ cmpwi r31, 0
/* 803BB198 003B80F8 40 82 00 84 */ bne lbl_803BB21C
/* 803BB19C 003B80FC 80 83 00 84 */ lwz r4, 0x84(r3)
/* 803BB1A0 003B8100 28 04 00 00 */ cmplwi r4, 0
/* 803BB1A4 003B8104 40 82 00 5C */ bne lbl_803BB200
/* 803BB1A8 003B8108 80 A1 00 18 */ lwz r5, 0x18(r1)
/* 803BB1AC 003B810C 80 81 00 14 */ lwz r4, 0x14(r1)
/* 803BB1B0 003B8110 A8 A5 00 3A */ lha r5, 0x3a(r5)
/* 803BB1B4 003B8114 A8 04 00 3A */ lha r0, 0x3a(r4)
/* 803BB1B8 003B8118 7C 05 00 51 */ subf. r0, r5, r0
/* 803BB1BC 003B811C 40 80 00 0C */ bge lbl_803BB1C8
/* 803BB1C0 003B8120 3B C0 00 00 */ li r30, 0
/* 803BB1C4 003B8124 48 00 00 08 */ b lbl_803BB1CC
lbl_803BB1C8:
/* 803BB1C8 003B8128 3B C0 00 01 */ li r30, 1
lbl_803BB1CC:
/* 803BB1CC 003B812C 57 C0 10 3A */ slwi r0, r30, 2
/* 803BB1D0 003B8130 38 C1 00 1C */ addi r6, r1, 0x1c
/* 803BB1D4 003B8134 7C C6 02 14 */ add r6, r6, r0
/* 803BB1D8 003B8138 80 86 00 00 */ lwz r4, 0(r6)
/* 803BB1DC 003B813C 6B C0 00 01 */ xori r0, r30, 1
/* 803BB1E0 003B8140 54 00 10 3A */ slwi r0, r0, 2
/* 803BB1E4 003B8144 90 83 00 84 */ stw r4, 0x84(r3)
/* 803BB1E8 003B8148 38 81 00 1C */ addi r4, r1, 0x1c
/* 803BB1EC 003B814C 38 A0 20 00 */ li r5, 0x2000
/* 803BB1F0 003B8150 80 66 00 00 */ lwz r3, 0(r6)
/* 803BB1F4 003B8154 7C 84 00 2E */ lwzx r4, r4, r0
/* 803BB1F8 003B8158 4B C4 82 99 */ bl memcpy
/* 803BB1FC 003B815C 48 00 00 20 */ b lbl_803BB21C
lbl_803BB200:
/* 803BB200 003B8160 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803BB204 003B8164 7C 04 00 40 */ cmplw r4, r0
/* 803BB208 003B8168 40 82 00 0C */ bne lbl_803BB214
/* 803BB20C 003B816C 38 00 00 00 */ li r0, 0
/* 803BB210 003B8170 48 00 00 08 */ b lbl_803BB218
lbl_803BB214:
/* 803BB214 003B8174 38 00 00 01 */ li r0, 1
lbl_803BB218:
/* 803BB218 003B8178 7C 1E 03 78 */ mr r30, r0
lbl_803BB21C:
/* 803BB21C 003B817C 28 1D 00 00 */ cmplwi r29, 0
/* 803BB220 003B8180 41 82 00 08 */ beq lbl_803BB228
/* 803BB224 003B8184 93 DD 00 00 */ stw r30, 0(r29)
lbl_803BB228:
/* 803BB228 003B8188 7F E3 FB 78 */ mr r3, r31
/* 803BB22C 003B818C 80 01 00 3C */ lwz r0, 0x3c(r1)
/* 803BB230 003B8190 83 E1 00 34 */ lwz r31, 0x34(r1)
/* 803BB234 003B8194 83 C1 00 30 */ lwz r30, 0x30(r1)
/* 803BB238 003B8198 83 A1 00 2C */ lwz r29, 0x2c(r1)
/* 803BB23C 003B819C 38 21 00 38 */ addi r1, r1, 0x38
/* 803BB240 003B81A0 7C 08 03 A6 */ mtlr r0
/* 803BB244 003B81A4 4E 80 00 20 */ blr
.global VerifyFAT
VerifyFAT:
/* 803BB248 003B81A8 7C 08 02 A6 */ mflr r0
/* 803BB24C 003B81AC 38 A0 00 00 */ li r5, 0
/* 803BB250 003B81B0 90 01 00 04 */ stw r0, 4(r1)
/* 803BB254 003B81B4 94 21 FF D8 */ stwu r1, -0x28(r1)
/* 803BB258 003B81B8 93 E1 00 24 */ stw r31, 0x24(r1)
/* 803BB25C 003B81BC 3B E0 00 00 */ li r31, 0
/* 803BB260 003B81C0 93 C1 00 20 */ stw r30, 0x20(r1)
/* 803BB264 003B81C4 3B C0 00 00 */ li r30, 0
/* 803BB268 003B81C8 93 A1 00 1C */ stw r29, 0x1c(r1)
/* 803BB26C 003B81CC 3B A4 00 00 */ addi r29, r4, 0
/* 803BB270 003B81D0 38 81 00 10 */ addi r4, r1, 0x10
lbl_803BB274:
/* 803BB274 003B81D4 39 00 1F FC */ li r8, 0x1ffc
/* 803BB278 003B81D8 80 C3 00 80 */ lwz r6, 0x80(r3)
/* 803BB27C 003B81DC 38 05 00 03 */ addi r0, r5, 3
/* 803BB280 003B81E0 7D 08 0E 70 */ srawi r8, r8, 1
/* 803BB284 003B81E4 54 00 68 24 */ slwi r0, r0, 0xd
/* 803BB288 003B81E8 7C E6 02 14 */ add r7, r6, r0
/* 803BB28C 003B81EC 7D 08 01 95 */ addze. r8, r8
/* 803BB290 003B81F0 90 E4 00 00 */ stw r7, 0(r4)
/* 803BB294 003B81F4 38 C7 00 04 */ addi r6, r7, 4
/* 803BB298 003B81F8 39 60 00 00 */ li r11, 0
/* 803BB29C 003B81FC 39 40 00 00 */ li r10, 0
/* 803BB2A0 003B8200 40 81 00 BC */ ble lbl_803BB35C
/* 803BB2A4 003B8204 55 00 E8 FF */ rlwinm. r0, r8, 0x1d, 3, 0x1f
/* 803BB2A8 003B8208 7C 09 03 A6 */ mtctr r0
/* 803BB2AC 003B820C 41 82 00 94 */ beq lbl_803BB340
lbl_803BB2B0:
/* 803BB2B0 003B8210 A1 26 00 00 */ lhz r9, 0(r6)
/* 803BB2B4 003B8214 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB2B8 003B8218 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB2BC 003B821C A1 26 00 02 */ lhz r9, 2(r6)
/* 803BB2C0 003B8220 7D 6B 02 14 */ add r11, r11, r0
/* 803BB2C4 003B8224 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB2C8 003B8228 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB2CC 003B822C A1 26 00 04 */ lhz r9, 4(r6)
/* 803BB2D0 003B8230 7D 6B 02 14 */ add r11, r11, r0
/* 803BB2D4 003B8234 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB2D8 003B8238 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB2DC 003B823C A1 26 00 06 */ lhz r9, 6(r6)
/* 803BB2E0 003B8240 7D 6B 02 14 */ add r11, r11, r0
/* 803BB2E4 003B8244 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB2E8 003B8248 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB2EC 003B824C A1 26 00 08 */ lhz r9, 8(r6)
/* 803BB2F0 003B8250 7D 6B 02 14 */ add r11, r11, r0
/* 803BB2F4 003B8254 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB2F8 003B8258 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB2FC 003B825C A1 26 00 0A */ lhz r9, 0xa(r6)
/* 803BB300 003B8260 7D 6B 02 14 */ add r11, r11, r0
/* 803BB304 003B8264 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB308 003B8268 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB30C 003B826C A1 26 00 0C */ lhz r9, 0xc(r6)
/* 803BB310 003B8270 7D 6B 02 14 */ add r11, r11, r0
/* 803BB314 003B8274 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB318 003B8278 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB31C 003B827C A1 26 00 0E */ lhz r9, 0xe(r6)
/* 803BB320 003B8280 7D 6B 02 14 */ add r11, r11, r0
/* 803BB324 003B8284 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB328 003B8288 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB32C 003B828C 7D 6B 02 14 */ add r11, r11, r0
/* 803BB330 003B8290 38 C6 00 10 */ addi r6, r6, 0x10
/* 803BB334 003B8294 42 00 FF 7C */ bdnz lbl_803BB2B0
/* 803BB338 003B8298 71 08 00 07 */ andi. r8, r8, 7
/* 803BB33C 003B829C 41 82 00 20 */ beq lbl_803BB35C
lbl_803BB340:
/* 803BB340 003B82A0 7D 09 03 A6 */ mtctr r8
lbl_803BB344:
/* 803BB344 003B82A4 A1 26 00 00 */ lhz r9, 0(r6)
/* 803BB348 003B82A8 38 C6 00 02 */ addi r6, r6, 2
/* 803BB34C 003B82AC 7D 20 48 F8 */ nor r0, r9, r9
/* 803BB350 003B82B0 7D 4A 4A 14 */ add r10, r10, r9
/* 803BB354 003B82B4 7D 6B 02 14 */ add r11, r11, r0
/* 803BB358 003B82B8 42 00 FF EC */ bdnz lbl_803BB344
lbl_803BB35C:
/* 803BB35C 003B82BC 55 40 04 3E */ clrlwi r0, r10, 0x10
/* 803BB360 003B82C0 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB364 003B82C4 40 82 00 08 */ bne lbl_803BB36C
/* 803BB368 003B82C8 39 40 00 00 */ li r10, 0
lbl_803BB36C:
/* 803BB36C 003B82CC 55 60 04 3E */ clrlwi r0, r11, 0x10
/* 803BB370 003B82D0 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB374 003B82D4 40 82 00 08 */ bne lbl_803BB37C
/* 803BB378 003B82D8 39 60 00 00 */ li r11, 0
lbl_803BB37C:
/* 803BB37C 003B82DC A0 C7 00 00 */ lhz r6, 0(r7)
/* 803BB380 003B82E0 55 40 04 3E */ clrlwi r0, r10, 0x10
/* 803BB384 003B82E4 7C 06 00 40 */ cmplw r6, r0
/* 803BB388 003B82E8 40 82 00 14 */ bne lbl_803BB39C
/* 803BB38C 003B82EC A0 C7 00 02 */ lhz r6, 2(r7)
/* 803BB390 003B82F0 55 60 04 3E */ clrlwi r0, r11, 0x10
/* 803BB394 003B82F4 7C 06 00 40 */ cmplw r6, r0
/* 803BB398 003B82F8 41 82 00 18 */ beq lbl_803BB3B0
lbl_803BB39C:
/* 803BB39C 003B82FC 38 00 00 00 */ li r0, 0
/* 803BB3A0 003B8300 90 03 00 88 */ stw r0, 0x88(r3)
/* 803BB3A4 003B8304 3B C5 00 00 */ addi r30, r5, 0
/* 803BB3A8 003B8308 3B FF 00 01 */ addi r31, r31, 1
/* 803BB3AC 003B830C 48 00 00 5C */ b lbl_803BB408
lbl_803BB3B0:
/* 803BB3B0 003B8310 A1 03 00 10 */ lhz r8, 0x10(r3)
/* 803BB3B4 003B8314 38 C7 00 0A */ addi r6, r7, 0xa
/* 803BB3B8 003B8318 39 40 00 00 */ li r10, 0
/* 803BB3BC 003B831C 39 20 00 05 */ li r9, 5
/* 803BB3C0 003B8320 48 00 00 1C */ b lbl_803BB3DC
lbl_803BB3C4:
/* 803BB3C4 003B8324 A0 06 00 00 */ lhz r0, 0(r6)
/* 803BB3C8 003B8328 28 00 00 00 */ cmplwi r0, 0
/* 803BB3CC 003B832C 40 82 00 08 */ bne lbl_803BB3D4
/* 803BB3D0 003B8330 39 4A 00 01 */ addi r10, r10, 1
lbl_803BB3D4:
/* 803BB3D4 003B8334 38 C6 00 02 */ addi r6, r6, 2
/* 803BB3D8 003B8338 39 29 00 01 */ addi r9, r9, 1
lbl_803BB3DC:
/* 803BB3DC 003B833C 55 20 04 3E */ clrlwi r0, r9, 0x10
/* 803BB3E0 003B8340 7C 00 40 40 */ cmplw r0, r8
/* 803BB3E4 003B8344 41 80 FF E0 */ blt lbl_803BB3C4
/* 803BB3E8 003B8348 A0 07 00 06 */ lhz r0, 6(r7)
/* 803BB3EC 003B834C 55 46 04 3E */ clrlwi r6, r10, 0x10
/* 803BB3F0 003B8350 7C 06 00 40 */ cmplw r6, r0
/* 803BB3F4 003B8354 41 82 00 14 */ beq lbl_803BB408
/* 803BB3F8 003B8358 38 00 00 00 */ li r0, 0
/* 803BB3FC 003B835C 90 03 00 88 */ stw r0, 0x88(r3)
/* 803BB400 003B8360 3B C5 00 00 */ addi r30, r5, 0
/* 803BB404 003B8364 3B FF 00 01 */ addi r31, r31, 1
lbl_803BB408:
/* 803BB408 003B8368 38 A5 00 01 */ addi r5, r5, 1
/* 803BB40C 003B836C 2C 05 00 02 */ cmpwi r5, 2
/* 803BB410 003B8370 38 84 00 04 */ addi r4, r4, 4
/* 803BB414 003B8374 41 80 FE 60 */ blt lbl_803BB274
/* 803BB418 003B8378 2C 1F 00 00 */ cmpwi r31, 0
/* 803BB41C 003B837C 40 82 00 84 */ bne lbl_803BB4A0
/* 803BB420 003B8380 80 83 00 88 */ lwz r4, 0x88(r3)
/* 803BB424 003B8384 28 04 00 00 */ cmplwi r4, 0
/* 803BB428 003B8388 40 82 00 5C */ bne lbl_803BB484
/* 803BB42C 003B838C 80 A1 00 14 */ lwz r5, 0x14(r1)
/* 803BB430 003B8390 80 81 00 10 */ lwz r4, 0x10(r1)
/* 803BB434 003B8394 A8 A5 00 04 */ lha r5, 4(r5)
/* 803BB438 003B8398 A8 04 00 04 */ lha r0, 4(r4)
/* 803BB43C 003B839C 7C 05 00 51 */ subf. r0, r5, r0
/* 803BB440 003B83A0 40 80 00 0C */ bge lbl_803BB44C
/* 803BB444 003B83A4 3B C0 00 00 */ li r30, 0
/* 803BB448 003B83A8 48 00 00 08 */ b lbl_803BB450
lbl_803BB44C:
/* 803BB44C 003B83AC 3B C0 00 01 */ li r30, 1
lbl_803BB450:
/* 803BB450 003B83B0 57 C0 10 3A */ slwi r0, r30, 2
/* 803BB454 003B83B4 38 C1 00 10 */ addi r6, r1, 0x10
/* 803BB458 003B83B8 7C C6 02 14 */ add r6, r6, r0
/* 803BB45C 003B83BC 80 86 00 00 */ lwz r4, 0(r6)
/* 803BB460 003B83C0 6B C0 00 01 */ xori r0, r30, 1
/* 803BB464 003B83C4 54 00 10 3A */ slwi r0, r0, 2
/* 803BB468 003B83C8 90 83 00 88 */ stw r4, 0x88(r3)
/* 803BB46C 003B83CC 38 81 00 10 */ addi r4, r1, 0x10
/* 803BB470 003B83D0 38 A0 20 00 */ li r5, 0x2000
/* 803BB474 003B83D4 80 66 00 00 */ lwz r3, 0(r6)
/* 803BB478 003B83D8 7C 84 00 2E */ lwzx r4, r4, r0
/* 803BB47C 003B83DC 4B C4 80 15 */ bl memcpy
/* 803BB480 003B83E0 48 00 00 20 */ b lbl_803BB4A0
lbl_803BB484:
/* 803BB484 003B83E4 80 01 00 10 */ lwz r0, 0x10(r1)
/* 803BB488 003B83E8 7C 04 00 40 */ cmplw r4, r0
/* 803BB48C 003B83EC 40 82 00 0C */ bne lbl_803BB498
/* 803BB490 003B83F0 38 00 00 00 */ li r0, 0
/* 803BB494 003B83F4 48 00 00 08 */ b lbl_803BB49C
lbl_803BB498:
/* 803BB498 003B83F8 38 00 00 01 */ li r0, 1
lbl_803BB49C:
/* 803BB49C 003B83FC 7C 1E 03 78 */ mr r30, r0
lbl_803BB4A0:
/* 803BB4A0 003B8400 28 1D 00 00 */ cmplwi r29, 0
/* 803BB4A4 003B8404 41 82 00 08 */ beq lbl_803BB4AC
/* 803BB4A8 003B8408 93 DD 00 00 */ stw r30, 0(r29)
lbl_803BB4AC:
/* 803BB4AC 003B840C 7F E3 FB 78 */ mr r3, r31
/* 803BB4B0 003B8410 80 01 00 2C */ lwz r0, 0x2c(r1)
/* 803BB4B4 003B8414 83 E1 00 24 */ lwz r31, 0x24(r1)
/* 803BB4B8 003B8418 83 C1 00 20 */ lwz r30, 0x20(r1)
/* 803BB4BC 003B841C 83 A1 00 1C */ lwz r29, 0x1c(r1)
/* 803BB4C0 003B8420 38 21 00 28 */ addi r1, r1, 0x28
/* 803BB4C4 003B8424 7C 08 03 A6 */ mtlr r0
/* 803BB4C8 003B8428 4E 80 00 20 */ blr
.global __CARDVerify
__CARDVerify:
/* 803BB4CC 003B842C 7C 08 02 A6 */ mflr r0
/* 803BB4D0 003B8430 90 01 00 04 */ stw r0, 4(r1)
/* 803BB4D4 003B8434 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803BB4D8 003B8438 93 E1 00 14 */ stw r31, 0x14(r1)
/* 803BB4DC 003B843C 93 C1 00 10 */ stw r30, 0x10(r1)
/* 803BB4E0 003B8440 7C 7E 1B 78 */ mr r30, r3
/* 803BB4E4 003B8444 4B FF F8 A1 */ bl VerifyID
/* 803BB4E8 003B8448 2C 03 00 00 */ cmpwi r3, 0
/* 803BB4EC 003B844C 40 80 00 08 */ bge lbl_803BB4F4
/* 803BB4F0 003B8450 48 00 00 50 */ b lbl_803BB540
lbl_803BB4F4:
/* 803BB4F4 003B8454 38 7E 00 00 */ addi r3, r30, 0
/* 803BB4F8 003B8458 38 80 00 00 */ li r4, 0
/* 803BB4FC 003B845C 4B FF FB 0D */ bl VerifyDir
/* 803BB500 003B8460 3B E3 00 00 */ addi r31, r3, 0
/* 803BB504 003B8464 38 7E 00 00 */ addi r3, r30, 0
/* 803BB508 003B8468 38 80 00 00 */ li r4, 0
/* 803BB50C 003B846C 4B FF FD 3D */ bl VerifyFAT
/* 803BB510 003B8470 7C 1F 1A 14 */ add r0, r31, r3
/* 803BB514 003B8474 2C 00 00 01 */ cmpwi r0, 1
/* 803BB518 003B8478 41 82 00 1C */ beq lbl_803BB534
/* 803BB51C 003B847C 40 80 00 20 */ bge lbl_803BB53C
/* 803BB520 003B8480 2C 00 00 00 */ cmpwi r0, 0
/* 803BB524 003B8484 40 80 00 08 */ bge lbl_803BB52C
/* 803BB528 003B8488 48 00 00 14 */ b lbl_803BB53C
lbl_803BB52C:
/* 803BB52C 003B848C 38 60 00 00 */ li r3, 0
/* 803BB530 003B8490 48 00 00 10 */ b lbl_803BB540
lbl_803BB534:
/* 803BB534 003B8494 38 60 FF FA */ li r3, -6
/* 803BB538 003B8498 48 00 00 08 */ b lbl_803BB540
lbl_803BB53C:
/* 803BB53C 003B849C 38 60 FF FA */ li r3, -6
lbl_803BB540:
/* 803BB540 003B84A0 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803BB544 003B84A4 83 E1 00 14 */ lwz r31, 0x14(r1)
/* 803BB548 003B84A8 83 C1 00 10 */ lwz r30, 0x10(r1)
/* 803BB54C 003B84AC 38 21 00 18 */ addi r1, r1, 0x18
/* 803BB550 003B84B0 7C 08 03 A6 */ mtlr r0
/* 803BB554 003B84B4 4E 80 00 20 */ blr
.global CARDCheckExAsync
CARDCheckExAsync:
/* 803BB558 003B84B8 7C 08 02 A6 */ mflr r0
/* 803BB55C 003B84BC 90 01 00 04 */ stw r0, 4(r1)
/* 803BB560 003B84C0 94 21 FF A8 */ stwu r1, -0x58(r1)
/* 803BB564 003B84C4 BF 21 00 3C */ stmw r25, 0x3c(r1)
/* 803BB568 003B84C8 7C 9A 23 79 */ or. r26, r4, r4
/* 803BB56C 003B84CC 3B 23 00 00 */ addi r25, r3, 0
/* 803BB570 003B84D0 3B 65 00 00 */ addi r27, r5, 0
/* 803BB574 003B84D4 3B C0 00 00 */ li r30, 0
/* 803BB578 003B84D8 3B A0 00 00 */ li r29, 0
/* 803BB57C 003B84DC 3B 80 00 00 */ li r28, 0
/* 803BB580 003B84E0 41 82 00 0C */ beq lbl_803BB58C
/* 803BB584 003B84E4 38 00 00 00 */ li r0, 0
/* 803BB588 003B84E8 90 1A 00 00 */ stw r0, 0(r26)
lbl_803BB58C:
/* 803BB58C 003B84EC 38 79 00 00 */ addi r3, r25, 0
/* 803BB590 003B84F0 38 81 00 30 */ addi r4, r1, 0x30
/* 803BB594 003B84F4 4B FF D8 0D */ bl __CARDGetControlBlock
/* 803BB598 003B84F8 2C 03 00 00 */ cmpwi r3, 0
/* 803BB59C 003B84FC 40 80 00 08 */ bge lbl_803BB5A4
/* 803BB5A0 003B8500 48 00 05 34 */ b lbl_803BBAD4
lbl_803BB5A4:
/* 803BB5A4 003B8504 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB5A8 003B8508 4B FF F7 DD */ bl VerifyID
/* 803BB5AC 003B850C 7C 64 1B 79 */ or. r4, r3, r3
/* 803BB5B0 003B8510 40 80 00 10 */ bge lbl_803BB5C0
/* 803BB5B4 003B8514 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB5B8 003B8518 4B FF D8 A1 */ bl __CARDPutControlBlock
/* 803BB5BC 003B851C 48 00 05 18 */ b lbl_803BBAD4
lbl_803BB5C0:
/* 803BB5C0 003B8520 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB5C4 003B8524 38 81 00 18 */ addi r4, r1, 0x18
/* 803BB5C8 003B8528 4B FF FA 41 */ bl VerifyDir
/* 803BB5CC 003B852C 7C 7F 1B 78 */ mr r31, r3
/* 803BB5D0 003B8530 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB5D4 003B8534 38 81 00 1C */ addi r4, r1, 0x1c
/* 803BB5D8 003B8538 4B FF FC 71 */ bl VerifyFAT
/* 803BB5DC 003B853C 7C BF 1A 14 */ add r5, r31, r3
/* 803BB5E0 003B8540 2C 05 00 01 */ cmpwi r5, 1
/* 803BB5E4 003B8544 40 81 00 14 */ ble lbl_803BB5F8
/* 803BB5E8 003B8548 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB5EC 003B854C 38 80 FF FA */ li r4, -6
/* 803BB5F0 003B8550 4B FF D8 69 */ bl __CARDPutControlBlock
/* 803BB5F4 003B8554 48 00 04 E0 */ b lbl_803BBAD4
lbl_803BB5F8:
/* 803BB5F8 003B8558 80 C1 00 30 */ lwz r6, 0x30(r1)
/* 803BB5FC 003B855C 80 86 00 80 */ lwz r4, 0x80(r6)
/* 803BB600 003B8560 38 64 20 00 */ addi r3, r4, 0x2000
/* 803BB604 003B8564 38 04 60 00 */ addi r0, r4, 0x6000
/* 803BB608 003B8568 90 61 00 28 */ stw r3, 0x28(r1)
/* 803BB60C 003B856C 3C 64 00 01 */ addis r3, r4, 1
/* 803BB610 003B8570 38 84 40 00 */ addi r4, r4, 0x4000
/* 803BB614 003B8574 90 01 00 20 */ stw r0, 0x20(r1)
/* 803BB618 003B8578 38 03 80 00 */ addi r0, r3, -32768
/* 803BB61C 003B857C 90 81 00 2C */ stw r4, 0x2c(r1)
/* 803BB620 003B8580 90 01 00 24 */ stw r0, 0x24(r1)
/* 803BB624 003B8584 41 82 00 0C */ beq lbl_803BB630
/* 803BB628 003B8588 40 80 00 8C */ bge lbl_803BB6B4
/* 803BB62C 003B858C 48 00 00 88 */ b lbl_803BB6B4
lbl_803BB630:
/* 803BB630 003B8590 38 66 00 84 */ addi r3, r6, 0x84
/* 803BB634 003B8594 80 06 00 84 */ lwz r0, 0x84(r6)
/* 803BB638 003B8598 28 00 00 00 */ cmplwi r0, 0
/* 803BB63C 003B859C 40 82 00 40 */ bne lbl_803BB67C
/* 803BB640 003B85A0 80 01 00 18 */ lwz r0, 0x18(r1)
/* 803BB644 003B85A4 38 81 00 28 */ addi r4, r1, 0x28
/* 803BB648 003B85A8 38 A0 20 00 */ li r5, 0x2000
/* 803BB64C 003B85AC 54 00 10 3A */ slwi r0, r0, 2
/* 803BB650 003B85B0 7C 04 00 2E */ lwzx r0, r4, r0
/* 803BB654 003B85B4 90 03 00 00 */ stw r0, 0(r3)
/* 803BB658 003B85B8 80 61 00 18 */ lwz r3, 0x18(r1)
/* 803BB65C 003B85BC 68 60 00 01 */ xori r0, r3, 1
/* 803BB660 003B85C0 54 63 10 3A */ slwi r3, r3, 2
/* 803BB664 003B85C4 54 00 10 3A */ slwi r0, r0, 2
/* 803BB668 003B85C8 7C 64 18 2E */ lwzx r3, r4, r3
/* 803BB66C 003B85CC 7C 84 00 2E */ lwzx r4, r4, r0
/* 803BB670 003B85D0 4B C4 7E 21 */ bl memcpy
/* 803BB674 003B85D4 3B A0 00 01 */ li r29, 1
/* 803BB678 003B85D8 48 00 00 3C */ b lbl_803BB6B4
lbl_803BB67C:
/* 803BB67C 003B85DC 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803BB680 003B85E0 38 81 00 20 */ addi r4, r1, 0x20
/* 803BB684 003B85E4 38 A0 20 00 */ li r5, 0x2000
/* 803BB688 003B85E8 54 00 10 3A */ slwi r0, r0, 2
/* 803BB68C 003B85EC 7C 04 00 2E */ lwzx r0, r4, r0
/* 803BB690 003B85F0 90 06 00 88 */ stw r0, 0x88(r6)
/* 803BB694 003B85F4 80 61 00 1C */ lwz r3, 0x1c(r1)
/* 803BB698 003B85F8 68 60 00 01 */ xori r0, r3, 1
/* 803BB69C 003B85FC 54 63 10 3A */ slwi r3, r3, 2
/* 803BB6A0 003B8600 54 00 10 3A */ slwi r0, r0, 2
/* 803BB6A4 003B8604 7C 64 18 2E */ lwzx r3, r4, r3
/* 803BB6A8 003B8608 7C 84 00 2E */ lwzx r4, r4, r0
/* 803BB6AC 003B860C 4B C4 7D E5 */ bl memcpy
/* 803BB6B0 003B8610 3B C0 00 01 */ li r30, 1
lbl_803BB6B4:
/* 803BB6B4 003B8614 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803BB6B8 003B8618 38 61 00 20 */ addi r3, r1, 0x20
/* 803BB6BC 003B861C 38 80 00 00 */ li r4, 0
/* 803BB6C0 003B8620 68 00 00 01 */ xori r0, r0, 1
/* 803BB6C4 003B8624 54 00 10 3A */ slwi r0, r0, 2
/* 803BB6C8 003B8628 7F E3 00 2E */ lwzx r31, r3, r0
/* 803BB6CC 003B862C 38 A0 20 00 */ li r5, 0x2000
/* 803BB6D0 003B8630 38 7F 00 00 */ addi r3, r31, 0
/* 803BB6D4 003B8634 4B C4 7C D5 */ bl memset
/* 803BB6D8 003B8638 38 00 00 7F */ li r0, 0x7f
/* 803BB6DC 003B863C 80 A1 00 30 */ lwz r5, 0x30(r1)
/* 803BB6E0 003B8640 7C 09 03 A6 */ mtctr r0
/* 803BB6E4 003B8644 38 C0 00 00 */ li r6, 0
lbl_803BB6E8:
/* 803BB6E8 003B8648 80 05 00 84 */ lwz r0, 0x84(r5)
/* 803BB6EC 003B864C 7C E0 32 14 */ add r7, r0, r6
/* 803BB6F0 003B8650 88 07 00 00 */ lbz r0, 0(r7)
/* 803BB6F4 003B8654 28 00 00 FF */ cmplwi r0, 0xff
/* 803BB6F8 003B8658 41 82 00 A8 */ beq lbl_803BB7A0
/* 803BB6FC 003B865C A0 87 00 36 */ lhz r4, 0x36(r7)
/* 803BB700 003B8660 39 00 00 00 */ li r8, 0
/* 803BB704 003B8664 48 00 00 54 */ b lbl_803BB758
lbl_803BB708:
/* 803BB708 003B8668 54 83 04 3E */ clrlwi r3, r4, 0x10
/* 803BB70C 003B866C 28 03 00 05 */ cmplwi r3, 5
/* 803BB710 003B8670 41 80 00 2C */ blt lbl_803BB73C
/* 803BB714 003B8674 A0 05 00 10 */ lhz r0, 0x10(r5)
/* 803BB718 003B8678 7C 03 00 40 */ cmplw r3, r0
/* 803BB71C 003B867C 40 80 00 20 */ bge lbl_803BB73C
/* 803BB720 003B8680 54 64 08 3C */ slwi r4, r3, 1
/* 803BB724 003B8684 7C 7F 22 2E */ lhzx r3, r31, r4
/* 803BB728 003B8688 38 63 00 01 */ addi r3, r3, 1
/* 803BB72C 003B868C 54 60 04 3E */ clrlwi r0, r3, 0x10
/* 803BB730 003B8690 7C 7F 23 2E */ sthx r3, r31, r4
/* 803BB734 003B8694 28 00 00 01 */ cmplwi r0, 1
/* 803BB738 003B8698 40 81 00 14 */ ble lbl_803BB74C
lbl_803BB73C:
/* 803BB73C 003B869C 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB740 003B86A0 38 80 FF FA */ li r4, -6
/* 803BB744 003B86A4 4B FF D7 15 */ bl __CARDPutControlBlock
/* 803BB748 003B86A8 48 00 03 8C */ b lbl_803BBAD4
lbl_803BB74C:
/* 803BB74C 003B86AC 80 65 00 88 */ lwz r3, 0x88(r5)
/* 803BB750 003B86B0 39 08 00 01 */ addi r8, r8, 1
/* 803BB754 003B86B4 7C 83 22 2E */ lhzx r4, r3, r4
lbl_803BB758:
/* 803BB758 003B86B8 54 80 04 3E */ clrlwi r0, r4, 0x10
/* 803BB75C 003B86BC 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB760 003B86C0 41 82 00 14 */ beq lbl_803BB774
/* 803BB764 003B86C4 A0 07 00 38 */ lhz r0, 0x38(r7)
/* 803BB768 003B86C8 55 03 04 3E */ clrlwi r3, r8, 0x10
/* 803BB76C 003B86CC 7C 03 00 40 */ cmplw r3, r0
/* 803BB770 003B86D0 41 80 FF 98 */ blt lbl_803BB708
lbl_803BB774:
/* 803BB774 003B86D4 A0 07 00 38 */ lhz r0, 0x38(r7)
/* 803BB778 003B86D8 55 03 04 3E */ clrlwi r3, r8, 0x10
/* 803BB77C 003B86DC 7C 03 00 40 */ cmplw r3, r0
/* 803BB780 003B86E0 40 82 00 10 */ bne lbl_803BB790
/* 803BB784 003B86E4 54 80 04 3E */ clrlwi r0, r4, 0x10
/* 803BB788 003B86E8 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB78C 003B86EC 41 82 00 14 */ beq lbl_803BB7A0
lbl_803BB790:
/* 803BB790 003B86F0 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB794 003B86F4 38 80 FF FA */ li r4, -6
/* 803BB798 003B86F8 4B FF D6 C1 */ bl __CARDPutControlBlock
/* 803BB79C 003B86FC 48 00 03 38 */ b lbl_803BBAD4
lbl_803BB7A0:
/* 803BB7A0 003B8700 38 C6 00 40 */ addi r6, r6, 0x40
/* 803BB7A4 003B8704 42 00 FF 44 */ bdnz lbl_803BB6E8
/* 803BB7A8 003B8708 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB7AC 003B870C 38 DF 00 0A */ addi r6, r31, 0xa
/* 803BB7B0 003B8710 39 20 00 00 */ li r9, 0
/* 803BB7B4 003B8714 39 00 00 05 */ li r8, 5
/* 803BB7B8 003B8718 38 A0 00 0A */ li r5, 0xa
/* 803BB7BC 003B871C 48 00 00 68 */ b lbl_803BB824
lbl_803BB7C0:
/* 803BB7C0 003B8720 80 83 00 88 */ lwz r4, 0x88(r3)
/* 803BB7C4 003B8724 A0 06 00 00 */ lhz r0, 0(r6)
/* 803BB7C8 003B8728 7C 84 2A 14 */ add r4, r4, r5
/* 803BB7CC 003B872C 28 00 00 00 */ cmplwi r0, 0
/* 803BB7D0 003B8730 A0 04 00 00 */ lhz r0, 0(r4)
/* 803BB7D4 003B8734 40 82 00 20 */ bne lbl_803BB7F4
/* 803BB7D8 003B8738 28 00 00 00 */ cmplwi r0, 0
/* 803BB7DC 003B873C 41 82 00 10 */ beq lbl_803BB7EC
/* 803BB7E0 003B8740 38 00 00 00 */ li r0, 0
/* 803BB7E4 003B8744 B0 04 00 00 */ sth r0, 0(r4)
/* 803BB7E8 003B8748 3B 80 00 01 */ li r28, 1
lbl_803BB7EC:
/* 803BB7EC 003B874C 39 29 00 01 */ addi r9, r9, 1
/* 803BB7F0 003B8750 48 00 00 28 */ b lbl_803BB818
lbl_803BB7F4:
/* 803BB7F4 003B8754 28 00 00 05 */ cmplwi r0, 5
/* 803BB7F8 003B8758 41 80 00 0C */ blt lbl_803BB804
/* 803BB7FC 003B875C 7C 00 38 40 */ cmplw r0, r7
/* 803BB800 003B8760 41 80 00 18 */ blt lbl_803BB818
lbl_803BB804:
/* 803BB804 003B8764 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB808 003B8768 41 82 00 10 */ beq lbl_803BB818
/* 803BB80C 003B876C 38 80 FF FA */ li r4, -6
/* 803BB810 003B8770 4B FF D6 49 */ bl __CARDPutControlBlock
/* 803BB814 003B8774 48 00 02 C0 */ b lbl_803BBAD4
lbl_803BB818:
/* 803BB818 003B8778 38 A5 00 02 */ addi r5, r5, 2
/* 803BB81C 003B877C 38 C6 00 02 */ addi r6, r6, 2
/* 803BB820 003B8780 39 08 00 01 */ addi r8, r8, 1
lbl_803BB824:
/* 803BB824 003B8784 A0 E3 00 10 */ lhz r7, 0x10(r3)
/* 803BB828 003B8788 55 00 04 3E */ clrlwi r0, r8, 0x10
/* 803BB82C 003B878C 7C 00 38 40 */ cmplw r0, r7
/* 803BB830 003B8790 41 80 FF 90 */ blt lbl_803BB7C0
/* 803BB834 003B8794 80 63 00 88 */ lwz r3, 0x88(r3)
/* 803BB838 003B8798 55 24 04 3E */ clrlwi r4, r9, 0x10
/* 803BB83C 003B879C A4 03 00 06 */ lhzu r0, 6(r3)
/* 803BB840 003B87A0 7C 04 00 40 */ cmplw r4, r0
/* 803BB844 003B87A4 41 82 00 0C */ beq lbl_803BB850
/* 803BB848 003B87A8 B1 23 00 00 */ sth r9, 0(r3)
/* 803BB84C 003B87AC 3B 80 00 01 */ li r28, 1
lbl_803BB850:
/* 803BB850 003B87B0 2C 1C 00 00 */ cmpwi r28, 0
/* 803BB854 003B87B4 41 82 01 C8 */ beq lbl_803BBA1C
/* 803BB858 003B87B8 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BB85C 003B87BC 38 80 1F FC */ li r4, 0x1ffc
/* 803BB860 003B87C0 7C 84 0E 70 */ srawi r4, r4, 1
/* 803BB864 003B87C4 80 C3 00 88 */ lwz r6, 0x88(r3)
/* 803BB868 003B87C8 38 00 00 00 */ li r0, 0
/* 803BB86C 003B87CC 7C 84 01 95 */ addze. r4, r4
/* 803BB870 003B87D0 B0 06 00 02 */ sth r0, 2(r6)
/* 803BB874 003B87D4 38 E6 00 02 */ addi r7, r6, 2
/* 803BB878 003B87D8 38 A6 00 04 */ addi r5, r6, 4
/* 803BB87C 003B87DC B0 06 00 00 */ sth r0, 0(r6)
/* 803BB880 003B87E0 38 64 00 00 */ addi r3, r4, 0
/* 803BB884 003B87E4 40 81 01 70 */ ble lbl_803BB9F4
/* 803BB888 003B87E8 54 60 E8 FF */ rlwinm. r0, r3, 0x1d, 3, 0x1f
/* 803BB88C 003B87EC 7C 09 03 A6 */ mtctr r0
/* 803BB890 003B87F0 41 82 01 34 */ beq lbl_803BB9C4
lbl_803BB894:
/* 803BB894 003B87F4 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB898 003B87F8 A0 05 00 00 */ lhz r0, 0(r5)
/* 803BB89C 003B87FC 7C 04 02 14 */ add r0, r4, r0
/* 803BB8A0 003B8800 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB8A4 003B8804 A0 05 00 00 */ lhz r0, 0(r5)
/* 803BB8A8 003B8808 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB8AC 003B880C 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB8B0 003B8810 7C 04 02 14 */ add r0, r4, r0
/* 803BB8B4 003B8814 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB8B8 003B8818 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB8BC 003B881C A0 05 00 02 */ lhz r0, 2(r5)
/* 803BB8C0 003B8820 7C 04 02 14 */ add r0, r4, r0
/* 803BB8C4 003B8824 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB8C8 003B8828 A0 05 00 02 */ lhz r0, 2(r5)
/* 803BB8CC 003B882C A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB8D0 003B8830 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB8D4 003B8834 7C 04 02 14 */ add r0, r4, r0
/* 803BB8D8 003B8838 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB8DC 003B883C A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB8E0 003B8840 A0 05 00 04 */ lhz r0, 4(r5)
/* 803BB8E4 003B8844 7C 04 02 14 */ add r0, r4, r0
/* 803BB8E8 003B8848 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB8EC 003B884C A0 05 00 04 */ lhz r0, 4(r5)
/* 803BB8F0 003B8850 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB8F4 003B8854 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB8F8 003B8858 7C 04 02 14 */ add r0, r4, r0
/* 803BB8FC 003B885C B0 07 00 00 */ sth r0, 0(r7)
/* 803BB900 003B8860 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB904 003B8864 A0 05 00 06 */ lhz r0, 6(r5)
/* 803BB908 003B8868 7C 04 02 14 */ add r0, r4, r0
/* 803BB90C 003B886C B0 06 00 00 */ sth r0, 0(r6)
/* 803BB910 003B8870 A0 05 00 06 */ lhz r0, 6(r5)
/* 803BB914 003B8874 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB918 003B8878 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB91C 003B887C 7C 04 02 14 */ add r0, r4, r0
/* 803BB920 003B8880 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB924 003B8884 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB928 003B8888 A0 05 00 08 */ lhz r0, 8(r5)
/* 803BB92C 003B888C 7C 04 02 14 */ add r0, r4, r0
/* 803BB930 003B8890 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB934 003B8894 A0 05 00 08 */ lhz r0, 8(r5)
/* 803BB938 003B8898 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB93C 003B889C 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB940 003B88A0 7C 04 02 14 */ add r0, r4, r0
/* 803BB944 003B88A4 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB948 003B88A8 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB94C 003B88AC A0 05 00 0A */ lhz r0, 0xa(r5)
/* 803BB950 003B88B0 7C 04 02 14 */ add r0, r4, r0
/* 803BB954 003B88B4 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB958 003B88B8 A0 05 00 0A */ lhz r0, 0xa(r5)
/* 803BB95C 003B88BC A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB960 003B88C0 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB964 003B88C4 7C 04 02 14 */ add r0, r4, r0
/* 803BB968 003B88C8 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB96C 003B88CC A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB970 003B88D0 A0 05 00 0C */ lhz r0, 0xc(r5)
/* 803BB974 003B88D4 7C 04 02 14 */ add r0, r4, r0
/* 803BB978 003B88D8 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB97C 003B88DC A0 05 00 0C */ lhz r0, 0xc(r5)
/* 803BB980 003B88E0 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB984 003B88E4 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB988 003B88E8 7C 04 02 14 */ add r0, r4, r0
/* 803BB98C 003B88EC B0 07 00 00 */ sth r0, 0(r7)
/* 803BB990 003B88F0 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB994 003B88F4 A0 05 00 0E */ lhz r0, 0xe(r5)
/* 803BB998 003B88F8 7C 04 02 14 */ add r0, r4, r0
/* 803BB99C 003B88FC B0 06 00 00 */ sth r0, 0(r6)
/* 803BB9A0 003B8900 A0 05 00 0E */ lhz r0, 0xe(r5)
/* 803BB9A4 003B8904 38 A5 00 10 */ addi r5, r5, 0x10
/* 803BB9A8 003B8908 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB9AC 003B890C 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB9B0 003B8910 7C 04 02 14 */ add r0, r4, r0
/* 803BB9B4 003B8914 B0 07 00 00 */ sth r0, 0(r7)
/* 803BB9B8 003B8918 42 00 FE DC */ bdnz lbl_803BB894
/* 803BB9BC 003B891C 70 63 00 07 */ andi. r3, r3, 7
/* 803BB9C0 003B8920 41 82 00 34 */ beq lbl_803BB9F4
lbl_803BB9C4:
/* 803BB9C4 003B8924 7C 69 03 A6 */ mtctr r3
lbl_803BB9C8:
/* 803BB9C8 003B8928 A0 86 00 00 */ lhz r4, 0(r6)
/* 803BB9CC 003B892C A0 05 00 00 */ lhz r0, 0(r5)
/* 803BB9D0 003B8930 7C 04 02 14 */ add r0, r4, r0
/* 803BB9D4 003B8934 B0 06 00 00 */ sth r0, 0(r6)
/* 803BB9D8 003B8938 A0 05 00 00 */ lhz r0, 0(r5)
/* 803BB9DC 003B893C 38 A5 00 02 */ addi r5, r5, 2
/* 803BB9E0 003B8940 A0 87 00 00 */ lhz r4, 0(r7)
/* 803BB9E4 003B8944 7C 00 00 F8 */ nor r0, r0, r0
/* 803BB9E8 003B8948 7C 04 02 14 */ add r0, r4, r0
/* 803BB9EC 003B894C B0 07 00 00 */ sth r0, 0(r7)
/* 803BB9F0 003B8950 42 00 FF D8 */ bdnz lbl_803BB9C8
lbl_803BB9F4:
/* 803BB9F4 003B8954 A0 06 00 00 */ lhz r0, 0(r6)
/* 803BB9F8 003B8958 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BB9FC 003B895C 40 82 00 0C */ bne lbl_803BBA08
/* 803BBA00 003B8960 38 00 00 00 */ li r0, 0
/* 803BBA04 003B8964 B0 06 00 00 */ sth r0, 0(r6)
lbl_803BBA08:
/* 803BBA08 003B8968 A0 07 00 00 */ lhz r0, 0(r7)
/* 803BBA0C 003B896C 28 00 FF FF */ cmplwi r0, 0xffff
/* 803BBA10 003B8970 40 82 00 0C */ bne lbl_803BBA1C
/* 803BBA14 003B8974 38 00 00 00 */ li r0, 0
/* 803BBA18 003B8978 B0 07 00 00 */ sth r0, 0(r7)
lbl_803BBA1C:
/* 803BBA1C 003B897C 80 C1 00 1C */ lwz r6, 0x1c(r1)
/* 803BBA20 003B8980 38 81 00 20 */ addi r4, r1, 0x20
/* 803BBA24 003B8984 38 A0 20 00 */ li r5, 0x2000
/* 803BBA28 003B8988 68 C0 00 01 */ xori r0, r6, 1
/* 803BBA2C 003B898C 54 03 10 3A */ slwi r3, r0, 2
/* 803BBA30 003B8990 54 C0 10 3A */ slwi r0, r6, 2
/* 803BBA34 003B8994 7C 64 18 2E */ lwzx r3, r4, r3
/* 803BBA38 003B8998 7C 84 00 2E */ lwzx r4, r4, r0
/* 803BBA3C 003B899C 4B C4 7A 55 */ bl memcpy
/* 803BBA40 003B89A0 2C 1D 00 00 */ cmpwi r29, 0
/* 803BBA44 003B89A4 41 82 00 24 */ beq lbl_803BBA68
/* 803BBA48 003B89A8 28 1A 00 00 */ cmplwi r26, 0
/* 803BBA4C 003B89AC 41 82 00 0C */ beq lbl_803BBA58
/* 803BBA50 003B89B0 38 00 20 00 */ li r0, 0x2000
/* 803BBA54 003B89B4 90 1A 00 00 */ stw r0, 0(r26)
lbl_803BBA58:
/* 803BBA58 003B89B8 38 79 00 00 */ addi r3, r25, 0
/* 803BBA5C 003B89BC 38 9B 00 00 */ addi r4, r27, 0
/* 803BBA60 003B89C0 4B FF F0 B1 */ bl __CARDUpdateDir
/* 803BBA64 003B89C4 48 00 00 70 */ b lbl_803BBAD4
lbl_803BBA68:
/* 803BBA68 003B89C8 7F C0 E3 79 */ or. r0, r30, r28
/* 803BBA6C 003B89CC 41 82 00 2C */ beq lbl_803BBA98
/* 803BBA70 003B89D0 28 1A 00 00 */ cmplwi r26, 0
/* 803BBA74 003B89D4 41 82 00 0C */ beq lbl_803BBA80
/* 803BBA78 003B89D8 38 00 20 00 */ li r0, 0x2000
/* 803BBA7C 003B89DC 90 1A 00 00 */ stw r0, 0(r26)
lbl_803BBA80:
/* 803BBA80 003B89E0 80 81 00 30 */ lwz r4, 0x30(r1)
/* 803BBA84 003B89E4 38 79 00 00 */ addi r3, r25, 0
/* 803BBA88 003B89E8 38 BB 00 00 */ addi r5, r27, 0
/* 803BBA8C 003B89EC 80 84 00 88 */ lwz r4, 0x88(r4)
/* 803BBA90 003B89F0 4B FF EE 35 */ bl __CARDUpdateFatBlock
/* 803BBA94 003B89F4 48 00 00 40 */ b lbl_803BBAD4
lbl_803BBA98:
/* 803BBA98 003B89F8 80 61 00 30 */ lwz r3, 0x30(r1)
/* 803BBA9C 003B89FC 38 80 00 00 */ li r4, 0
/* 803BBAA0 003B8A00 4B FF D3 B9 */ bl __CARDPutControlBlock
/* 803BBAA4 003B8A04 28 1B 00 00 */ cmplwi r27, 0
/* 803BBAA8 003B8A08 41 82 00 28 */ beq lbl_803BBAD0
/* 803BBAAC 003B8A0C 4B FC 5B B5 */ bl OSDisableInterrupts
/* 803BBAB0 003B8A10 39 9B 00 00 */ addi r12, r27, 0
/* 803BBAB4 003B8A14 7D 88 03 A6 */ mtlr r12
/* 803BBAB8 003B8A18 3B 43 00 00 */ addi r26, r3, 0
/* 803BBABC 003B8A1C 38 79 00 00 */ addi r3, r25, 0
/* 803BBAC0 003B8A20 38 80 00 00 */ li r4, 0
/* 803BBAC4 003B8A24 4E 80 00 21 */ blrl
/* 803BBAC8 003B8A28 7F 43 D3 78 */ mr r3, r26
/* 803BBACC 003B8A2C 4B FC 5B BD */ bl OSRestoreInterrupts
lbl_803BBAD0:
/* 803BBAD0 003B8A30 38 60 00 00 */ li r3, 0
lbl_803BBAD4:
/* 803BBAD4 003B8A34 BB 21 00 3C */ lmw r25, 0x3c(r1)
/* 803BBAD8 003B8A38 80 01 00 5C */ lwz r0, 0x5c(r1)
/* 803BBADC 003B8A3C 38 21 00 58 */ addi r1, r1, 0x58
/* 803BBAE0 003B8A40 7C 08 03 A6 */ mtlr r0
/* 803BBAE4 003B8A44 4E 80 00 20 */ blr
.global CARDCheckAsync
CARDCheckAsync:
/* 803BBAE8 003B8A48 7C 08 02 A6 */ mflr r0
/* 803BBAEC 003B8A4C 38 A4 00 00 */ addi r5, r4, 0
/* 803BBAF0 003B8A50 90 01 00 04 */ stw r0, 4(r1)
/* 803BBAF4 003B8A54 94 21 FF E8 */ stwu r1, -0x18(r1)
/* 803BBAF8 003B8A58 38 81 00 10 */ addi r4, r1, 0x10
/* 803BBAFC 003B8A5C 4B FF FA 5D */ bl CARDCheckExAsync
/* 803BBB00 003B8A60 80 01 00 1C */ lwz r0, 0x1c(r1)
/* 803BBB04 003B8A64 38 21 00 18 */ addi r1, r1, 0x18
/* 803BBB08 003B8A68 7C 08 03 A6 */ mtlr r0
/* 803BBB0C 003B8A6C 4E 80 00 20 */ blr