sub_8123254

This commit is contained in:
PikalaxALT
2017-10-29 21:38:45 -04:00
parent 8d35bf1c9e
commit 16c5a58f35
3 changed files with 48 additions and 116 deletions
-115
View File
@@ -5,121 +5,6 @@
.text
thumb_func_start sub_8123254
sub_8123254: @ 8123254
push {r4-r6,lr}
movs r4, 0
ldr r3, =gUnknown_0203A144
ldr r0, [r3]
mov r12, r0
adds r0, 0x6A
strh r4, [r0]
mov r5, r12
adds r5, 0x68
strh r4, [r5]
ldr r2, =gMain
ldrh r1, [r2, 0x2C]
movs r0, 0x40
ands r0, r1
adds r6, r3, 0
adds r3, r2, 0
cmp r0, 0
beq _0812328E
mov r0, r12
adds r0, 0x5E
movs r2, 0
ldrsh r1, [r0, r2]
movs r0, 0x34
negs r0, r0
cmp r1, r0
ble _0812328E
ldr r0, =0x0000ffff
strh r0, [r5]
movs r4, 0x1
_0812328E:
ldrh r1, [r3, 0x2C]
movs r0, 0x80
ands r0, r1
cmp r0, 0
beq _081232AE
ldr r1, [r6]
adds r0, r1, 0
adds r0, 0x5E
movs r5, 0
ldrsh r0, [r0, r5]
cmp r0, 0x3B
bgt _081232AE
adds r1, 0x68
movs r0, 0x1
strh r0, [r1]
movs r4, 0x1
_081232AE:
ldrh r1, [r3, 0x2C]
movs r0, 0x20
ands r0, r1
cmp r0, 0
beq _081232D4
ldr r2, [r6]
adds r0, r2, 0
adds r0, 0x5C
movs r5, 0
ldrsh r1, [r0, r5]
movs r0, 0x2C
negs r0, r0
cmp r1, r0
ble _081232D4
adds r1, r2, 0
adds r1, 0x6A
ldr r0, =0x0000ffff
strh r0, [r1]
movs r4, 0x1
_081232D4:
ldrh r1, [r3, 0x2C]
movs r0, 0x10
ands r0, r1
cmp r0, 0
beq _081232F4
ldr r1, [r6]
adds r0, r1, 0
adds r0, 0x5C
movs r2, 0
ldrsh r0, [r0, r2]
cmp r0, 0xAB
bgt _081232F4
adds r1, 0x6A
movs r0, 0x1
strh r0, [r1]
movs r4, 0x1
_081232F4:
ldrh r2, [r3, 0x2E]
movs r0, 0x1
ands r0, r2
cmp r0, 0
beq _08123300
movs r4, 0x4
_08123300:
movs r0, 0x2
ands r0, r2
cmp r0, 0
beq _0812330A
movs r4, 0x5
_0812330A:
cmp r4, 0x1
bne _0812331A
ldr r0, [r6]
ldr r1, =sub_8123334
str r1, [r0, 0x18]
adds r0, 0x6C
movs r1, 0
strh r1, [r0]
_0812331A:
adds r0, r4, 0
pop {r4-r6}
pop {r1}
bx r1
.pool
thumb_func_end sub_8123254
thumb_func_start sub_8123334
sub_8123334: @ 8123334
push {r4,r5,lr}