mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-24 13:49:45 +00:00
1890 lines
31 KiB
ArmAsm
1890 lines
31 KiB
ArmAsm
#include "constants/items.h"
|
|
#include "constants/moves.h"
|
|
#include "constants/pokemon.h"
|
|
#include "constants/ribbon.h"
|
|
#include "constants/party_menu.h"
|
|
#include "msgdata/msg/msg_0300.h"
|
|
.include "asm/macros.inc"
|
|
.include "unk_020863F4.inc"
|
|
.include "global.inc"
|
|
|
|
.public _020FA484
|
|
.public gNatureStatMods
|
|
|
|
.text
|
|
|
|
thumb_func_start sub_020863F4
|
|
sub_020863F4: ; 0x020863F4
|
|
push {r4, r5, r6, r7, lr}
|
|
sub sp, #0x4c
|
|
add r4, r0, #0
|
|
mov r0, #0x6c
|
|
bl sub_0200CF18
|
|
mov r7, #0x2f
|
|
lsl r7, r7, #4
|
|
add r2, sp, #0x2c
|
|
ldr r3, _02086484 ; =_021027F4
|
|
str r0, [r4, r7]
|
|
ldmia r3!, {r0, r1}
|
|
add r6, r2, #0
|
|
stmia r2!, {r0, r1}
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
ldmia r3!, {r0, r1}
|
|
ldr r5, _02086488 ; =_021027C8
|
|
stmia r2!, {r0, r1}
|
|
add r3, sp, #0x18
|
|
ldmia r5!, {r0, r1}
|
|
add r2, r3, #0
|
|
stmia r3!, {r0, r1}
|
|
ldmia r5!, {r0, r1}
|
|
stmia r3!, {r0, r1}
|
|
ldr r0, [r5]
|
|
add r1, r6, #0
|
|
str r0, [r3]
|
|
ldr r0, [r4, r7]
|
|
mov r3, #0x20
|
|
bl sub_0200CF70
|
|
ldr r3, _0208648C ; =_021027DC
|
|
add r2, sp, #0
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
ldmia r3!, {r0, r1}
|
|
stmia r2!, {r0, r1}
|
|
add r0, r7, #0
|
|
ldr r0, [r4, r0]
|
|
bl sub_0200CF38
|
|
add r1, r7, #4
|
|
str r0, [r4, r1]
|
|
sub r0, r1, #4
|
|
ldr r0, [r4, r0]
|
|
ldr r1, [r4, r1]
|
|
mov r2, #0x80
|
|
bl sub_0200CFF4
|
|
cmp r0, #0
|
|
bne _02086468
|
|
bl GF_AssertFail
|
|
_02086468:
|
|
mov r1, #0x2f
|
|
lsl r1, r1, #4
|
|
ldr r0, [r4, r1]
|
|
add r1, r1, #4
|
|
ldr r1, [r4, r1]
|
|
add r2, sp, #0
|
|
bl sub_0200D3F8
|
|
cmp r0, #0
|
|
bne _02086480
|
|
bl GF_AssertFail
|
|
_02086480:
|
|
add sp, #0x4c
|
|
pop {r4, r5, r6, r7, pc}
|
|
.balign 4, 0
|
|
_02086484: .word _021027F4
|
|
_02086488: .word _021027C8
|
|
_0208648C: .word _021027DC
|
|
thumb_func_end sub_020863F4
|
|
|
|
thumb_func_start sub_02086490
|
|
sub_02086490: ; 0x02086490
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
sub sp, #0x20
|
|
mov r1, #0x2f
|
|
lsl r1, r1, #4
|
|
add r7, r0, #0
|
|
add r0, r1, #4
|
|
ldr r5, [r7, r0]
|
|
add r0, r1, #0
|
|
add r0, #0xc
|
|
ldr r0, [r7, r0]
|
|
ldr r6, [r7, r1]
|
|
str r0, [sp, #0x18]
|
|
add r0, r1, #0
|
|
add r0, #8
|
|
ldr r0, [r7, r0]
|
|
mov r3, #1
|
|
str r0, [sp, #0x1c]
|
|
sub r0, r1, #4
|
|
ldr r4, [r7, r0]
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
str r0, [sp, #4]
|
|
str r0, [sp, #8]
|
|
mov r0, #0x6c
|
|
str r0, [sp, #0xc]
|
|
ldr r2, [sp, #0x1c]
|
|
add r0, r4, #0
|
|
mov r1, #0xc
|
|
bl GfGfxLoader_LoadCharDataFromOpenNarc
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
str r0, [sp, #4]
|
|
str r0, [sp, #8]
|
|
mov r0, #0x6c
|
|
str r0, [sp, #0xc]
|
|
ldr r2, [sp, #0x1c]
|
|
add r0, r4, #0
|
|
mov r1, #0xe
|
|
mov r3, #1
|
|
bl GfGfxLoader_LoadScrnDataFromOpenNarc
|
|
mov r1, #0
|
|
str r1, [sp]
|
|
mov r0, #0x20
|
|
str r0, [sp, #4]
|
|
str r1, [sp, #8]
|
|
ldr r0, [sp, #0x18]
|
|
mov r1, #0xbe
|
|
mov r2, #0xd
|
|
mov r3, #0x6c
|
|
bl PaletteData_LoadNarc
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
str r0, [sp, #4]
|
|
str r0, [sp, #8]
|
|
mov r0, #0x6c
|
|
str r0, [sp, #0xc]
|
|
ldr r2, [sp, #0x1c]
|
|
add r0, r4, #0
|
|
mov r1, #0xf
|
|
mov r3, #5
|
|
bl GfGfxLoader_LoadCharDataFromOpenNarc
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
str r0, [sp, #4]
|
|
str r0, [sp, #8]
|
|
mov r0, #0x6c
|
|
str r0, [sp, #0xc]
|
|
ldr r2, [sp, #0x1c]
|
|
add r0, r4, #0
|
|
mov r1, #0x11
|
|
mov r3, #5
|
|
bl GfGfxLoader_LoadScrnDataFromOpenNarc
|
|
mov r0, #1
|
|
str r0, [sp]
|
|
mov r0, #0x20
|
|
str r0, [sp, #4]
|
|
mov r0, #0
|
|
str r0, [sp, #8]
|
|
ldr r0, [sp, #0x18]
|
|
mov r1, #0xbe
|
|
mov r2, #0x10
|
|
mov r3, #0x6c
|
|
bl PaletteData_LoadNarc
|
|
str r4, [sp]
|
|
mov r1, #1
|
|
str r1, [sp, #4]
|
|
mov r0, #0
|
|
str r0, [sp, #8]
|
|
str r1, [sp, #0xc]
|
|
mov r0, #0xfa
|
|
str r1, [sp, #0x10]
|
|
lsl r0, r0, #2
|
|
str r0, [sp, #0x14]
|
|
ldr r0, [sp, #0x18]
|
|
mov r1, #2
|
|
add r2, r6, #0
|
|
add r3, r5, #0
|
|
bl sub_0200D68C
|
|
mov r3, #0
|
|
str r3, [sp]
|
|
mov r0, #1
|
|
str r0, [sp, #4]
|
|
mov r0, #0xfa
|
|
lsl r0, r0, #2
|
|
str r0, [sp, #8]
|
|
add r0, r6, #0
|
|
add r1, r5, #0
|
|
add r2, r4, #0
|
|
bl sub_0200D504
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
mov r0, #0xfa
|
|
lsl r0, r0, #2
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r1, r5, #0
|
|
add r2, r4, #0
|
|
mov r3, #2
|
|
bl sub_0200D6EC
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
mov r0, #0xfa
|
|
lsl r0, r0, #2
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r1, r5, #0
|
|
add r2, r4, #0
|
|
mov r3, #3
|
|
bl sub_0200D71C
|
|
str r4, [sp]
|
|
mov r0, #5
|
|
str r0, [sp, #4]
|
|
mov r0, #0
|
|
str r0, [sp, #8]
|
|
mov r0, #1
|
|
str r0, [sp, #0xc]
|
|
str r0, [sp, #0x10]
|
|
ldr r0, _020866C4 ; =0x000003E9
|
|
mov r1, #2
|
|
str r0, [sp, #0x14]
|
|
ldr r0, [sp, #0x18]
|
|
add r2, r6, #0
|
|
add r3, r5, #0
|
|
bl sub_0200D68C
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
mov r0, #1
|
|
str r0, [sp, #4]
|
|
ldr r0, _020866C4 ; =0x000003E9
|
|
add r1, r5, #0
|
|
str r0, [sp, #8]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #4
|
|
bl sub_0200D504
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
ldr r0, _020866C4 ; =0x000003E9
|
|
add r1, r5, #0
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #6
|
|
bl sub_0200D6EC
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
ldr r0, _020866C4 ; =0x000003E9
|
|
add r1, r5, #0
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #7
|
|
bl sub_0200D71C
|
|
str r4, [sp]
|
|
mov r0, #9
|
|
str r0, [sp, #4]
|
|
mov r0, #0
|
|
str r0, [sp, #8]
|
|
mov r1, #2
|
|
str r1, [sp, #0xc]
|
|
mov r0, #1
|
|
str r0, [sp, #0x10]
|
|
ldr r0, _020866C8 ; =0x000003EA
|
|
add r2, r6, #0
|
|
str r0, [sp, #0x14]
|
|
ldr r0, [sp, #0x18]
|
|
add r3, r5, #0
|
|
bl sub_0200D68C
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
mov r0, #1
|
|
str r0, [sp, #4]
|
|
ldr r0, _020866C8 ; =0x000003EA
|
|
add r1, r5, #0
|
|
str r0, [sp, #8]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #8
|
|
bl sub_0200D504
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
ldr r0, _020866C8 ; =0x000003EA
|
|
add r1, r5, #0
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #0xa
|
|
bl sub_0200D6EC
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
ldr r0, _020866C8 ; =0x000003EA
|
|
add r1, r5, #0
|
|
str r0, [sp, #4]
|
|
add r0, r6, #0
|
|
add r2, r4, #0
|
|
mov r3, #0xb
|
|
bl sub_0200D71C
|
|
mov r0, #0xf6
|
|
lsl r0, r0, #2
|
|
ldr r0, [r7, r0]
|
|
bl Options_GetFrame
|
|
add r4, r0, #0
|
|
lsl r0, r4, #0x18
|
|
lsr r0, r0, #0x18
|
|
str r0, [sp]
|
|
mov r0, #0x6c
|
|
str r0, [sp, #4]
|
|
ldr r0, [sp, #0x1c]
|
|
mov r1, #4
|
|
mov r2, #1
|
|
mov r3, #0xa
|
|
bl LoadUserFrameGfx2
|
|
add r0, r4, #0
|
|
bl sub_0200E640
|
|
add r2, r0, #0
|
|
mov r0, #1
|
|
str r0, [sp]
|
|
mov r0, #0x20
|
|
str r0, [sp, #4]
|
|
mov r0, #0xb0
|
|
str r0, [sp, #8]
|
|
ldr r0, [sp, #0x18]
|
|
mov r1, #0x26
|
|
mov r3, #0x6c
|
|
bl PaletteData_LoadNarc
|
|
mov r0, #1
|
|
str r0, [sp]
|
|
mov r0, #0x20
|
|
str r0, [sp, #4]
|
|
mov r0, #0xc0
|
|
str r0, [sp, #8]
|
|
ldr r0, [sp, #0x18]
|
|
mov r1, #0x10
|
|
mov r2, #8
|
|
mov r3, #0x6c
|
|
bl PaletteData_LoadNarc
|
|
add sp, #0x20
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
nop
|
|
_020866C4: .word 0x000003E9
|
|
_020866C8: .word 0x000003EA
|
|
thumb_func_end sub_02086490
|
|
|
|
thumb_func_start sub_020866CC
|
|
sub_020866CC: ; 0x020866CC
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
add r6, r0, #0
|
|
mov r0, #0x2d
|
|
lsl r0, r0, #4
|
|
ldr r0, [r6, r0]
|
|
mov r4, #0
|
|
cmp r0, #0
|
|
ble _020866F2
|
|
mov r7, #0x2d
|
|
add r5, r6, #0
|
|
lsl r7, r7, #4
|
|
_020866E2:
|
|
ldr r0, [r5, #0xc]
|
|
bl sub_0200D9DC
|
|
ldr r0, [r6, r7]
|
|
add r4, r4, #1
|
|
add r5, #0x1c
|
|
cmp r4, r0
|
|
blt _020866E2
|
|
_020866F2:
|
|
mov r0, #0xfb
|
|
lsl r0, r0, #2
|
|
ldr r0, [r6, r0]
|
|
mov r5, #0
|
|
cmp r0, #0
|
|
ble _02086718
|
|
mov r7, #0xfb
|
|
add r4, r6, #0
|
|
lsl r7, r7, #2
|
|
_02086704:
|
|
mov r0, #0x73
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
bl sub_0200D9DC
|
|
ldr r0, [r6, r7]
|
|
add r5, r5, #1
|
|
add r4, #0x1c
|
|
cmp r5, r0
|
|
blt _02086704
|
|
_02086718:
|
|
mov r7, #0x9d
|
|
mov r5, #0
|
|
add r4, r6, #0
|
|
lsl r7, r7, #2
|
|
_02086720:
|
|
ldr r0, [r4, r7]
|
|
bl sub_0200D9DC
|
|
add r5, r5, #1
|
|
add r4, #0x1c
|
|
cmp r5, #2
|
|
blt _02086720
|
|
mov r7, #0x22
|
|
mov r5, #0
|
|
add r4, r6, #0
|
|
lsl r7, r7, #4
|
|
_02086736:
|
|
ldr r0, [r4, r7]
|
|
bl sub_0200D9DC
|
|
add r5, r5, #1
|
|
add r4, #0x1c
|
|
cmp r5, #3
|
|
blt _02086736
|
|
add r0, r6, #0
|
|
bl sub_02086FE8
|
|
mov r0, #0xe7
|
|
lsl r0, r0, #2
|
|
add r0, r6, r0
|
|
bl RemoveWindow
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_020866CC
|
|
|
|
thumb_func_start sub_02086758
|
|
sub_02086758: ; 0x02086758
|
|
push {r4, r5, r6, r7, lr}
|
|
sub sp, #0x44
|
|
str r0, [sp]
|
|
mov r0, #0
|
|
str r0, [sp, #0xc]
|
|
mov r0, #0x2f
|
|
lsl r0, r0, #4
|
|
ldr r1, [sp]
|
|
add r2, r0, #4
|
|
ldr r1, [r1, r0]
|
|
str r1, [sp, #8]
|
|
ldr r1, [sp]
|
|
ldr r1, [r1, r2]
|
|
add r2, sp, #0x10
|
|
str r1, [sp, #4]
|
|
ldr r1, [sp, #0xc]
|
|
strh r1, [r2]
|
|
strh r1, [r2, #2]
|
|
strh r1, [r2, #4]
|
|
strh r1, [r2, #6]
|
|
mov r1, #0xa
|
|
str r1, [sp, #0x18]
|
|
ldr r1, [sp, #0xc]
|
|
mov r2, #1
|
|
str r1, [sp, #0x3c]
|
|
str r1, [sp, #0x40]
|
|
str r1, [sp, #0x1c]
|
|
add r1, r0, #0
|
|
add r1, #0xf8
|
|
str r1, [sp, #0x24]
|
|
str r1, [sp, #0x28]
|
|
str r1, [sp, #0x2c]
|
|
str r1, [sp, #0x30]
|
|
sub r1, r2, #2
|
|
str r1, [sp, #0x34]
|
|
str r1, [sp, #0x38]
|
|
ldr r1, [sp]
|
|
str r2, [sp, #0x20]
|
|
add r0, #0xf0
|
|
ldr r4, [r1, r0]
|
|
mov r1, #0x3f
|
|
ldr r0, [sp]
|
|
lsl r1, r1, #4
|
|
ldr r0, [r0, r1]
|
|
sub r6, r0, #1
|
|
bmi _020867DC
|
|
mov r0, #0x1c
|
|
add r1, r6, #0
|
|
mul r1, r0
|
|
ldr r0, [sp]
|
|
mov r7, #0xa
|
|
add r5, r0, r1
|
|
_020867C0:
|
|
add r0, r4, #0
|
|
add r1, r7, #0
|
|
bl _u32_div_f
|
|
add r0, r1, #1
|
|
str r0, [r5]
|
|
add r0, r4, #0
|
|
mov r1, #0xa
|
|
bl _u32_div_f
|
|
add r4, r0, #0
|
|
sub r5, #0x1c
|
|
sub r6, r6, #1
|
|
bpl _020867C0
|
|
_020867DC:
|
|
mov r1, #0xfb
|
|
ldr r0, [sp]
|
|
lsl r1, r1, #2
|
|
ldr r0, [r0, r1]
|
|
mov r2, #0x2d
|
|
ldr r1, [sp]
|
|
lsl r2, r2, #4
|
|
ldr r1, [r1, r2]
|
|
mov r6, #0
|
|
add r1, r1, r0
|
|
cmp r1, #0
|
|
ble _0208689C
|
|
ldr r4, [sp]
|
|
mov r7, #0x4c
|
|
add r5, r4, #0
|
|
_020867FA:
|
|
cmp r0, #0
|
|
beq _0208684C
|
|
mov r0, #7
|
|
lsl r0, r0, #6
|
|
ldr r1, [r4, r0]
|
|
ldr r0, [sp, #0xc]
|
|
add r0, r0, r1
|
|
add r0, r0, #1
|
|
cmp r6, r0
|
|
bne _0208684C
|
|
ldr r0, [sp, #8]
|
|
ldr r1, [sp, #4]
|
|
add r2, sp, #0x10
|
|
bl sub_0200D734
|
|
mov r1, #0x73
|
|
lsl r1, r1, #2
|
|
str r0, [r4, r1]
|
|
add r0, r1, #0
|
|
lsl r1, r7, #0x10
|
|
ldr r0, [r4, r0]
|
|
asr r1, r1, #0x10
|
|
mov r2, #0x18
|
|
bl sub_0200DDB8
|
|
mov r0, #0x73
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
mov r1, #0x16
|
|
bl sub_0200DC4C
|
|
mov r0, #0x73
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
bl sub_0200DC18
|
|
ldr r0, [sp, #0xc]
|
|
add r4, #0x1c
|
|
add r0, r0, #1
|
|
str r0, [sp, #0xc]
|
|
b _02086882
|
|
_0208684C:
|
|
ldr r0, [sp, #8]
|
|
ldr r1, [sp, #4]
|
|
add r2, sp, #0x10
|
|
bl sub_0200D734
|
|
lsl r1, r7, #0x10
|
|
str r0, [r5, #0xc]
|
|
asr r1, r1, #0x10
|
|
mov r2, #0x18
|
|
bl sub_0200DDB8
|
|
ldr r0, [r5]
|
|
ldr r1, [r5, #8]
|
|
bl sub_02086D98
|
|
add r1, r0, #0
|
|
ldr r0, [r5, #0xc]
|
|
bl sub_0200DC4C
|
|
ldr r0, [r5, #0xc]
|
|
mov r1, #2
|
|
bl sub_0200DF98
|
|
ldr r0, [r5, #0xc]
|
|
bl sub_0200DC18
|
|
add r5, #0x1c
|
|
_02086882:
|
|
ldr r1, [sp]
|
|
mov r0, #0xfb
|
|
lsl r0, r0, #2
|
|
ldr r0, [r1, r0]
|
|
add r2, r1, #0
|
|
mov r1, #0x2d
|
|
lsl r1, r1, #4
|
|
ldr r1, [r2, r1]
|
|
add r6, r6, #1
|
|
add r1, r1, r0
|
|
add r7, #8
|
|
cmp r6, r1
|
|
blt _020867FA
|
|
_0208689C:
|
|
add sp, #0x44
|
|
pop {r4, r5, r6, r7, pc}
|
|
thumb_func_end sub_02086758
|
|
|
|
thumb_func_start sub_020868A0
|
|
sub_020868A0: ; 0x020868A0
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0x34
|
|
mov r1, #0x2f
|
|
lsl r1, r1, #4
|
|
add r5, r0, #0
|
|
add r0, r1, #4
|
|
ldr r6, [r5, r1]
|
|
ldr r4, [r5, r0]
|
|
mov r2, #0
|
|
add r0, sp, #0
|
|
strh r2, [r0]
|
|
strh r2, [r0, #2]
|
|
strh r2, [r0, #4]
|
|
strh r2, [r0, #6]
|
|
add r1, #0xf9
|
|
mov r0, #1
|
|
str r0, [sp, #0x10]
|
|
sub r0, r0, #2
|
|
str r2, [sp, #8]
|
|
str r2, [sp, #0x2c]
|
|
str r2, [sp, #0x30]
|
|
str r2, [sp, #0xc]
|
|
str r1, [sp, #0x14]
|
|
str r1, [sp, #0x18]
|
|
str r1, [sp, #0x1c]
|
|
str r1, [sp, #0x20]
|
|
str r0, [sp, #0x24]
|
|
str r0, [sp, #0x28]
|
|
add r0, r6, #0
|
|
add r1, r4, #0
|
|
add r2, sp, #0
|
|
bl sub_0200D734
|
|
mov r1, #0x22
|
|
lsl r1, r1, #4
|
|
str r0, [r5, r1]
|
|
add r0, r6, #0
|
|
add r1, r4, #0
|
|
add r2, sp, #0
|
|
bl sub_0200D734
|
|
mov r1, #0x8f
|
|
lsl r1, r1, #2
|
|
str r0, [r5, r1]
|
|
add r0, r6, #0
|
|
add r1, r4, #0
|
|
add r2, sp, #0
|
|
bl sub_0200D734
|
|
mov r1, #0x96
|
|
lsl r1, r1, #2
|
|
str r0, [r5, r1]
|
|
mov r1, #0x3f
|
|
lsl r1, r1, #4
|
|
ldr r1, [r5, r1]
|
|
add r0, r5, #0
|
|
bl sub_02086AE4
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r5, r0]
|
|
mov r1, #0
|
|
bl sub_0200DC4C
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r2, #0x91
|
|
lsl r2, r2, #2
|
|
mov r1, #0
|
|
strh r1, [r5, r2]
|
|
add r0, r2, #2
|
|
strh r1, [r5, r0]
|
|
mov r0, #1
|
|
sub r2, #0x14
|
|
str r0, [r5, r2]
|
|
add r0, r5, #0
|
|
bl sub_02086B2C
|
|
mov r1, #0x8f
|
|
lsl r1, r1, #2
|
|
ldr r0, [r5, r1]
|
|
sub r1, #0xc
|
|
ldr r1, [r5, r1]
|
|
bl sub_0200DC4C
|
|
mov r0, #0x8f
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r0, #0x8f
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
mov r1, #1
|
|
bl sub_0200E0FC
|
|
mov r2, #0x26
|
|
lsl r2, r2, #4
|
|
mov r1, #0
|
|
strh r1, [r5, r2]
|
|
add r0, r2, #2
|
|
strh r1, [r5, r0]
|
|
mov r0, #1
|
|
sub r2, #0x14
|
|
str r0, [r5, r2]
|
|
add r0, r5, #0
|
|
bl sub_02086B2C
|
|
mov r1, #0x96
|
|
lsl r1, r1, #2
|
|
ldr r0, [r5, r1]
|
|
sub r1, #0xc
|
|
ldr r1, [r5, r1]
|
|
bl sub_0200DC4C
|
|
mov r0, #0x96
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r0, #0x96
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
mov r1, #1
|
|
bl sub_0200E0FC
|
|
add r0, r5, #0
|
|
mov r1, #1
|
|
mov r2, #0
|
|
bl sub_02086AB4
|
|
add r0, r5, #0
|
|
mov r1, #2
|
|
mov r2, #0
|
|
bl sub_02086AB4
|
|
add sp, #0x34
|
|
pop {r3, r4, r5, r6, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_020868A0
|
|
|
|
thumb_func_start sub_020869BC
|
|
sub_020869BC: ; 0x020869BC
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0x34
|
|
mov r2, #0x2f
|
|
lsl r2, r2, #4
|
|
add r5, r0, #0
|
|
add r0, r2, #4
|
|
ldr r6, [r5, r2]
|
|
ldr r4, [r5, r0]
|
|
mov r0, #0
|
|
add r1, sp, #0
|
|
strh r0, [r1]
|
|
strh r0, [r1, #2]
|
|
strh r0, [r1, #4]
|
|
strh r0, [r1, #6]
|
|
add r2, #0xfa
|
|
mov r1, #0xa
|
|
str r1, [sp, #8]
|
|
mov r1, #1
|
|
str r1, [sp, #0x10]
|
|
sub r1, r1, #2
|
|
str r0, [sp, #0xc]
|
|
str r0, [sp, #0x2c]
|
|
str r0, [sp, #0x30]
|
|
str r0, [sp, #0xc]
|
|
str r2, [sp, #0x14]
|
|
str r2, [sp, #0x18]
|
|
str r2, [sp, #0x1c]
|
|
str r2, [sp, #0x20]
|
|
str r1, [sp, #0x24]
|
|
str r1, [sp, #0x28]
|
|
add r0, r6, #0
|
|
add r1, r4, #0
|
|
add r2, sp, #0
|
|
bl sub_0200D734
|
|
mov r1, #0x9d
|
|
lsl r1, r1, #2
|
|
str r0, [r5, r1]
|
|
mov r0, #1
|
|
str r0, [sp, #0xc]
|
|
add r0, r6, #0
|
|
add r1, r4, #0
|
|
add r2, sp, #0
|
|
bl sub_0200D734
|
|
mov r2, #0x29
|
|
lsl r2, r2, #4
|
|
add r1, r2, #0
|
|
str r0, [r5, r2]
|
|
add r1, #0xde
|
|
ldrb r3, [r5, r1]
|
|
add r1, r2, #0
|
|
add r1, #0xdf
|
|
ldrb r1, [r5, r1]
|
|
add r0, r2, #0
|
|
sub r0, #0x1c
|
|
add r3, r3, r1
|
|
lsr r1, r3, #0x1f
|
|
add r1, r3, r1
|
|
add r3, r2, #0
|
|
add r3, #0xdc
|
|
add r2, #0xdd
|
|
lsl r1, r1, #0xf
|
|
ldrb r3, [r5, r3]
|
|
ldrb r2, [r5, r2]
|
|
ldr r0, [r5, r0]
|
|
asr r1, r1, #0x10
|
|
add r3, r3, r2
|
|
lsr r2, r3, #0x1f
|
|
add r2, r3, r2
|
|
lsl r2, r2, #0xf
|
|
asr r2, r2, #0x10
|
|
bl sub_0200DDB8
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
mov r1, #0
|
|
bl sub_0200DC4C
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r2, #0x29
|
|
lsl r2, r2, #4
|
|
add r1, r2, #0
|
|
add r1, #0xe2
|
|
ldrb r3, [r5, r1]
|
|
add r1, r2, #0
|
|
add r1, #0xe3
|
|
ldrb r1, [r5, r1]
|
|
ldr r0, [r5, r2]
|
|
add r3, r3, r1
|
|
lsr r1, r3, #0x1f
|
|
add r1, r3, r1
|
|
add r3, r2, #0
|
|
add r3, #0xe0
|
|
add r2, #0xe1
|
|
lsl r1, r1, #0xf
|
|
ldrb r3, [r5, r3]
|
|
ldrb r2, [r5, r2]
|
|
asr r1, r1, #0x10
|
|
add r3, r3, r2
|
|
lsr r2, r3, #0x1f
|
|
add r2, r3, r2
|
|
lsl r2, r2, #0xf
|
|
asr r2, r2, #0x10
|
|
bl sub_0200DDB8
|
|
mov r0, #0x29
|
|
lsl r0, r0, #4
|
|
ldr r0, [r5, r0]
|
|
mov r1, #0
|
|
bl sub_0200DC4C
|
|
mov r0, #0x29
|
|
lsl r0, r0, #4
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
add sp, #0x34
|
|
pop {r3, r4, r5, r6, pc}
|
|
thumb_func_end sub_020869BC
|
|
|
|
thumb_func_start sub_02086AB4
|
|
sub_02086AB4: ; 0x02086AB4
|
|
push {r3, lr}
|
|
cmp r2, #1
|
|
bne _02086ACE
|
|
mov r2, #0x1c
|
|
mul r2, r1
|
|
add r1, r0, r2
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r1, r0]
|
|
mov r1, #1
|
|
bl sub_0200DCE8
|
|
pop {r3, pc}
|
|
_02086ACE:
|
|
mov r2, #0x1c
|
|
mul r2, r1
|
|
add r1, r0, r2
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r1, r0]
|
|
mov r1, #0
|
|
bl sub_0200DCE8
|
|
pop {r3, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086AB4
|
|
|
|
thumb_func_start sub_02086AE4
|
|
sub_02086AE4: ; 0x02086AE4
|
|
push {r3, r4, lr}
|
|
sub sp, #4
|
|
add r4, r0, #0
|
|
mov r0, #0x3f
|
|
lsl r0, r0, #4
|
|
ldr r0, [r4, r0]
|
|
cmp r1, r0
|
|
blt _02086B26
|
|
mov r0, #0x1c
|
|
mul r0, r1
|
|
add r0, r4, r0
|
|
mov r2, #0x85
|
|
ldr r0, [r0, #0xc]
|
|
lsl r2, r2, #2
|
|
str r1, [r4, r2]
|
|
add r1, sp, #0
|
|
add r1, #2
|
|
add r2, sp, #0
|
|
bl sub_0200DE44
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
add r3, sp, #0
|
|
mov r2, #0
|
|
ldrsh r2, [r3, r2]
|
|
mov r1, #2
|
|
ldrsh r1, [r3, r1]
|
|
add r2, #0x10
|
|
lsl r2, r2, #0x10
|
|
ldr r0, [r4, r0]
|
|
asr r2, r2, #0x10
|
|
bl sub_0200DDB8
|
|
_02086B26:
|
|
add sp, #4
|
|
pop {r3, r4, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086AE4
|
|
|
|
thumb_func_start sub_02086B2C
|
|
sub_02086B2C: ; 0x02086B2C
|
|
push {r4, lr}
|
|
add r1, #0x10
|
|
mov r2, #0x8f
|
|
add r3, r0, #0
|
|
lsl r2, r2, #2
|
|
lsl r1, r1, #2
|
|
ldr r0, [r3, r2]
|
|
add r3, r3, r1
|
|
add r1, r2, #0
|
|
add r1, #0xca
|
|
ldrb r4, [r3, r1]
|
|
add r1, r2, #0
|
|
add r1, #0xcb
|
|
ldrb r1, [r3, r1]
|
|
add r4, r4, r1
|
|
lsr r1, r4, #0x1f
|
|
add r1, r4, r1
|
|
add r4, r2, #0
|
|
add r4, #0xc8
|
|
add r2, #0xc9
|
|
lsl r1, r1, #0xf
|
|
ldrb r4, [r3, r4]
|
|
ldrb r2, [r3, r2]
|
|
asr r1, r1, #0x10
|
|
add r3, r4, r2
|
|
lsr r2, r3, #0x1f
|
|
add r2, r3, r2
|
|
lsl r2, r2, #0xf
|
|
asr r2, r2, #0x10
|
|
bl sub_0200DDB8
|
|
pop {r4, pc}
|
|
thumb_func_end sub_02086B2C
|
|
|
|
thumb_func_start sub_02086B6C
|
|
sub_02086B6C: ; 0x02086B6C
|
|
push {r4, lr}
|
|
add r3, r0, #0
|
|
mov r0, #0x1c
|
|
mul r0, r2
|
|
add r1, #0x10
|
|
mov r2, #0x22
|
|
lsl r1, r1, #2
|
|
add r0, r3, r0
|
|
lsl r2, r2, #4
|
|
add r3, r3, r1
|
|
add r1, r2, #0
|
|
add r1, #0xe6
|
|
ldrb r4, [r3, r1]
|
|
add r1, r2, #0
|
|
add r1, #0xe7
|
|
ldrb r1, [r3, r1]
|
|
ldr r0, [r0, r2]
|
|
add r4, r4, r1
|
|
lsr r1, r4, #0x1f
|
|
add r1, r4, r1
|
|
add r4, r2, #0
|
|
add r4, #0xe4
|
|
add r2, #0xe5
|
|
lsl r1, r1, #0xf
|
|
ldrb r4, [r3, r4]
|
|
ldrb r2, [r3, r2]
|
|
asr r1, r1, #0x10
|
|
add r3, r4, r2
|
|
lsr r2, r3, #0x1f
|
|
add r2, r3, r2
|
|
lsl r2, r2, #0xf
|
|
asr r2, r2, #0x10
|
|
bl sub_0200DDB8
|
|
pop {r4, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086B6C
|
|
|
|
thumb_func_start sub_02086BB4
|
|
sub_02086BB4: ; 0x02086BB4
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
add r5, r0, #0
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r0, #0x8f
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
mov r0, #0x96
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC18
|
|
add r4, r5, #0
|
|
mov r7, #0x22
|
|
mov r6, #1
|
|
add r4, #0x1c
|
|
lsl r7, r7, #4
|
|
_02086BE0:
|
|
ldr r0, [r4, r7]
|
|
bl sub_0200DC64
|
|
cmp r0, #3
|
|
bne _02086C34
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r4, r0]
|
|
bl sub_0200DCA0
|
|
cmp r0, #0
|
|
bne _02086C76
|
|
mov r0, #0x22
|
|
mov r1, #0x85
|
|
lsl r0, r0, #4
|
|
lsl r1, r1, #2
|
|
ldr r0, [r4, r0]
|
|
ldr r1, [r4, r1]
|
|
bl sub_0200DC4C
|
|
mov r0, #0xdd
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
cmp r0, #1
|
|
bne _02086C1E
|
|
add r0, r5, #0
|
|
mov r1, #1
|
|
mov r2, #0
|
|
bl sub_02086AB4
|
|
b _02086C28
|
|
_02086C1E:
|
|
mov r1, #1
|
|
add r0, r5, #0
|
|
add r2, r1, #0
|
|
bl sub_02086AB4
|
|
_02086C28:
|
|
add r0, r5, #0
|
|
mov r1, #2
|
|
mov r2, #0
|
|
bl sub_02086AB4
|
|
b _02086C76
|
|
_02086C34:
|
|
mov r1, #0x85
|
|
lsl r1, r1, #2
|
|
ldr r1, [r4, r1]
|
|
cmp r0, r1
|
|
beq _02086C48
|
|
mov r0, #0x22
|
|
lsl r0, r0, #4
|
|
ldr r0, [r4, r0]
|
|
bl sub_0200DC4C
|
|
_02086C48:
|
|
mov r0, #0x96
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200DC64
|
|
cmp r0, #3
|
|
beq _02086C76
|
|
mov r0, #0xdd
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
cmp r0, #1
|
|
bne _02086C6C
|
|
add r0, r5, #0
|
|
mov r1, #1
|
|
mov r2, #0
|
|
bl sub_02086AB4
|
|
b _02086C76
|
|
_02086C6C:
|
|
mov r1, #1
|
|
add r0, r5, #0
|
|
add r2, r1, #0
|
|
bl sub_02086AB4
|
|
_02086C76:
|
|
add r6, r6, #1
|
|
add r4, #0x1c
|
|
cmp r6, #3
|
|
blt _02086BE0
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
thumb_func_end sub_02086BB4
|
|
|
|
thumb_func_start sub_02086C80
|
|
sub_02086C80: ; 0x02086C80
|
|
push {r3, lr}
|
|
cmp r0, #0
|
|
beq _02086C8A
|
|
bl sub_020136B4
|
|
_02086C8A:
|
|
pop {r3, pc}
|
|
thumb_func_end sub_02086C80
|
|
|
|
thumb_func_start sub_02086C8C
|
|
sub_02086C8C: ; 0x02086C8C
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
add r5, r0, #0
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
add r4, r5, #0
|
|
_02086C96:
|
|
ldr r0, _02086D94 ; =0x0000036E
|
|
ldrb r1, [r5, r0]
|
|
add r0, r0, #1
|
|
ldrb r0, [r5, r0]
|
|
add r1, r1, r0
|
|
lsr r0, r1, #0x1f
|
|
add r0, r1, r0
|
|
lsl r0, r0, #0xf
|
|
asr r0, r0, #0x10
|
|
sub r0, #0x28
|
|
lsl r0, r0, #0x10
|
|
asr r7, r0, #0x10
|
|
mov r0, #0xdb
|
|
lsl r0, r0, #2
|
|
ldrb r1, [r5, r0]
|
|
add r0, r0, #1
|
|
ldrb r0, [r5, r0]
|
|
add r1, r1, r0
|
|
lsr r0, r1, #0x1f
|
|
add r0, r1, r0
|
|
lsl r0, r0, #0xf
|
|
asr r0, r0, #0x10
|
|
sub r0, r0, #7
|
|
lsl r0, r0, #0x10
|
|
asr r6, r0, #0x10
|
|
mov r0, #0x9a
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
cmp r0, #0
|
|
beq _02086CD8
|
|
cmp r0, #1
|
|
beq _02086CE2
|
|
b _02086D60
|
|
_02086CD8:
|
|
mov r0, #0xa
|
|
mov r1, #0
|
|
lsl r0, r0, #6
|
|
strb r1, [r4, r0]
|
|
b _02086D82
|
|
_02086CE2:
|
|
mov r0, #0xa
|
|
lsl r0, r0, #6
|
|
ldrb r0, [r4, r0]
|
|
add r1, r0, #1
|
|
mov r0, #0xa
|
|
lsl r0, r0, #6
|
|
strb r1, [r4, r0]
|
|
ldrb r0, [r4, r0]
|
|
cmp r0, #1
|
|
bne _02086D12
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
mov r1, #1
|
|
bl sub_0200DC4C
|
|
mov r0, #0xdf
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
add r1, r7, #0
|
|
add r2, r6, #0
|
|
bl sub_02086C80
|
|
b _02086D82
|
|
_02086D12:
|
|
cmp r0, #2
|
|
bne _02086D32
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
mov r1, #2
|
|
bl sub_0200DC4C
|
|
mov r0, #0xdf
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
add r1, r7, #0
|
|
sub r2, r6, #1
|
|
bl sub_02086C80
|
|
b _02086D82
|
|
_02086D32:
|
|
cmp r0, #0xa
|
|
bne _02086D82
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
mov r1, #0
|
|
bl sub_0200DC4C
|
|
mov r0, #0xdf
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
add r1, r7, #0
|
|
add r2, r6, #0
|
|
bl sub_02086C80
|
|
mov r0, #0x9a
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
add r1, r0, #1
|
|
mov r0, #0x9a
|
|
lsl r0, r0, #2
|
|
str r1, [r4, r0]
|
|
b _02086D82
|
|
_02086D60:
|
|
mov r0, #0x9d
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
mov r1, #0
|
|
bl sub_0200DC4C
|
|
mov r0, #0xdf
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
add r1, r7, #0
|
|
add r2, r6, #0
|
|
bl sub_02086C80
|
|
mov r0, #0x9a
|
|
mov r1, #0
|
|
lsl r0, r0, #2
|
|
str r1, [r4, r0]
|
|
_02086D82:
|
|
ldr r0, [sp]
|
|
add r5, r5, #4
|
|
add r0, r0, #1
|
|
add r4, #0x1c
|
|
str r0, [sp]
|
|
cmp r0, #2
|
|
blt _02086C96
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
nop
|
|
_02086D94: .word 0x0000036E
|
|
thumb_func_end sub_02086C8C
|
|
|
|
thumb_func_start sub_02086D98
|
|
sub_02086D98: ; 0x02086D98
|
|
mov r2, #0
|
|
cmp r1, #0
|
|
bne _02086DA0
|
|
mov r2, #0xb
|
|
_02086DA0:
|
|
add r0, r2, r0
|
|
bx lr
|
|
thumb_func_end sub_02086D98
|
|
|
|
thumb_func_start sub_02086DA4
|
|
sub_02086DA4: ; 0x02086DA4
|
|
push {r4, r5, r6, r7}
|
|
mov r1, #0x2d
|
|
lsl r1, r1, #4
|
|
ldr r1, [r0, r1]
|
|
mov r3, #0
|
|
cmp r1, #0
|
|
ble _02086DDE
|
|
mov r6, #0x2e
|
|
lsl r6, r6, #4
|
|
add r4, r0, #0
|
|
add r1, r3, #0
|
|
mov r2, #1
|
|
sub r7, r6, #4
|
|
_02086DBE:
|
|
ldr r5, [r0, r7]
|
|
cmp r3, r5
|
|
blt _02086DCE
|
|
ldr r5, [r0, r6]
|
|
cmp r3, r5
|
|
bge _02086DCE
|
|
str r2, [r4, #8]
|
|
b _02086DD0
|
|
_02086DCE:
|
|
str r1, [r4, #8]
|
|
_02086DD0:
|
|
mov r5, #0x2d
|
|
lsl r5, r5, #4
|
|
ldr r5, [r0, r5]
|
|
add r3, r3, #1
|
|
add r4, #0x1c
|
|
cmp r3, r5
|
|
blt _02086DBE
|
|
_02086DDE:
|
|
pop {r4, r5, r6, r7}
|
|
bx lr
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086DA4
|
|
|
|
thumb_func_start sub_02086DE4
|
|
sub_02086DE4: ; 0x02086DE4
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
sub sp, #0x10
|
|
str r1, [sp, #4]
|
|
mov r1, #0xb5
|
|
lsl r1, r1, #2
|
|
str r0, [sp]
|
|
ldr r0, [r0, r1]
|
|
mov r4, #0
|
|
lsl r2, r0, #1
|
|
ldr r0, [sp]
|
|
str r4, [sp, #8]
|
|
add r2, r0, r2
|
|
add r0, r1, #0
|
|
sub r0, #0x34
|
|
ldrsh r5, [r2, r0]
|
|
ldr r0, [sp]
|
|
sub r1, r1, #4
|
|
ldr r0, [r0, r1]
|
|
cmp r0, #0
|
|
bgt _02086E0E
|
|
b _02086F3E
|
|
_02086E0E:
|
|
ldr r7, [sp]
|
|
add r6, r7, #0
|
|
_02086E12:
|
|
mov r0, #0xb7
|
|
ldr r1, [sp]
|
|
lsl r0, r0, #2
|
|
ldr r0, [r1, r0]
|
|
cmp r4, r0
|
|
blt _02086E3E
|
|
add r2, r1, #0
|
|
mov r1, #0x2e
|
|
lsl r1, r1, #4
|
|
ldr r1, [r2, r1]
|
|
cmp r4, r1
|
|
bge _02086E3E
|
|
cmp r4, r0
|
|
bne _02086E36
|
|
add r5, #0x14
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
b _02086E50
|
|
_02086E36:
|
|
add r5, #0x20
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
b _02086E50
|
|
_02086E3E:
|
|
cmp r4, #0
|
|
bne _02086E4A
|
|
add r5, #0x14
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
b _02086E50
|
|
_02086E4A:
|
|
add r5, #8
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
_02086E50:
|
|
add r1, sp, #0xc
|
|
ldr r0, [r7, #0xc]
|
|
add r1, #2
|
|
add r2, sp, #0xc
|
|
bl sub_0200DE44
|
|
ldr r0, [sp, #4]
|
|
cmp r0, #0
|
|
bne _02086E72
|
|
add r3, sp, #0xc
|
|
mov r2, #0
|
|
ldrsh r2, [r3, r2]
|
|
ldr r0, [r7, #0xc]
|
|
add r1, r5, #0
|
|
bl sub_0200DDB8
|
|
b _02086E8E
|
|
_02086E72:
|
|
add r1, sp, #0xc
|
|
mov r0, #2
|
|
ldrsh r0, [r1, r0]
|
|
sub r1, r5, r0
|
|
lsr r0, r1, #0x1f
|
|
add r0, r1, r0
|
|
asr r0, r0, #1
|
|
strh r0, [r7, #0x14]
|
|
mov r0, #0
|
|
strh r0, [r7, #0x16]
|
|
mov r0, #2
|
|
strb r0, [r7, #0x18]
|
|
mov r0, #0
|
|
strb r0, [r7, #0x19]
|
|
_02086E8E:
|
|
mov r0, #7
|
|
lsl r0, r0, #6
|
|
ldr r0, [r6, r0]
|
|
cmp r4, r0
|
|
bne _02086F2C
|
|
mov r0, #0xfb
|
|
ldr r1, [sp]
|
|
lsl r0, r0, #2
|
|
ldr r1, [r1, r0]
|
|
ldr r0, [sp, #8]
|
|
cmp r0, r1
|
|
beq _02086F2C
|
|
mov r0, #0x73
|
|
lsl r0, r0, #2
|
|
add r1, sp, #0xc
|
|
ldr r0, [r6, r0]
|
|
add r1, #2
|
|
add r2, sp, #0xc
|
|
bl sub_0200DE44
|
|
ldr r1, [sp]
|
|
mov r0, #0x2e
|
|
lsl r0, r0, #4
|
|
ldr r0, [r1, r0]
|
|
add r2, r1, #0
|
|
mov r1, #0xb7
|
|
lsl r1, r1, #2
|
|
ldr r1, [r2, r1]
|
|
cmp r1, r0
|
|
bne _02086ED2
|
|
add r5, #8
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
b _02086EE8
|
|
_02086ED2:
|
|
cmp r4, r1
|
|
ble _02086EE2
|
|
cmp r4, r0
|
|
bge _02086EE2
|
|
add r5, #0x14
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
b _02086EE8
|
|
_02086EE2:
|
|
add r5, #8
|
|
lsl r0, r5, #0x10
|
|
asr r5, r0, #0x10
|
|
_02086EE8:
|
|
ldr r0, [sp, #4]
|
|
cmp r0, #0
|
|
bne _02086F02
|
|
mov r0, #0x73
|
|
lsl r0, r0, #2
|
|
add r3, sp, #0xc
|
|
mov r2, #0
|
|
ldrsh r2, [r3, r2]
|
|
ldr r0, [r6, r0]
|
|
add r1, r5, #0
|
|
bl sub_0200DDB8
|
|
b _02086F24
|
|
_02086F02:
|
|
add r1, sp, #0xc
|
|
mov r0, #2
|
|
ldrsh r0, [r1, r0]
|
|
sub r1, r5, r0
|
|
lsr r0, r1, #0x1f
|
|
add r0, r1, r0
|
|
asr r1, r0, #1
|
|
mov r0, #0x75
|
|
lsl r0, r0, #2
|
|
strh r1, [r6, r0]
|
|
mov r1, #0
|
|
add r0, r0, #2
|
|
strh r1, [r6, r0]
|
|
mov r0, #0x76
|
|
mov r1, #2
|
|
lsl r0, r0, #2
|
|
strb r1, [r6, r0]
|
|
_02086F24:
|
|
ldr r0, [sp, #8]
|
|
add r6, #0x1c
|
|
add r0, r0, #1
|
|
str r0, [sp, #8]
|
|
_02086F2C:
|
|
mov r0, #0x2d
|
|
ldr r1, [sp]
|
|
lsl r0, r0, #4
|
|
ldr r0, [r1, r0]
|
|
add r4, r4, #1
|
|
add r7, #0x1c
|
|
cmp r4, r0
|
|
bge _02086F3E
|
|
b _02086E12
|
|
_02086F3E:
|
|
add sp, #0x10
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086DE4
|
|
|
|
thumb_func_start sub_02086F44
|
|
sub_02086F44: ; 0x02086F44
|
|
push {r3, r4, r5, r6, r7, lr}
|
|
sub sp, #8
|
|
add r6, r0, #0
|
|
mov r0, #0x2d
|
|
lsl r0, r0, #4
|
|
ldr r0, [r6, r0]
|
|
mov r4, #0
|
|
cmp r0, #0
|
|
ble _02086FC8
|
|
add r5, r6, #0
|
|
_02086F58:
|
|
mov r0, #0xb7
|
|
lsl r0, r0, #2
|
|
ldr r0, [r6, r0]
|
|
cmp r4, r0
|
|
blt _02086F74
|
|
mov r0, #0x2e
|
|
lsl r0, r0, #4
|
|
ldr r0, [r6, r0]
|
|
cmp r4, r0
|
|
bge _02086F74
|
|
mov r0, #0x10
|
|
str r0, [sp]
|
|
add r7, r0, #0
|
|
b _02086F7A
|
|
_02086F74:
|
|
mov r0, #4
|
|
str r0, [sp]
|
|
mov r7, #8
|
|
_02086F7A:
|
|
add r2, sp, #4
|
|
ldr r0, [r5, #0xc]
|
|
add r1, sp, #4
|
|
add r2, #2
|
|
bl sub_0200DE44
|
|
add r1, sp, #4
|
|
mov r0, #2
|
|
ldrsh r0, [r1, r0]
|
|
add r4, r4, #1
|
|
sub r1, r0, r7
|
|
ldr r0, [r5, #0x10]
|
|
strb r1, [r0]
|
|
add r1, sp, #4
|
|
mov r0, #0
|
|
ldrsh r1, [r1, r0]
|
|
ldr r0, [sp]
|
|
sub r1, r1, r0
|
|
ldr r0, [r5, #0x10]
|
|
strb r1, [r0, #2]
|
|
add r1, sp, #4
|
|
mov r0, #2
|
|
ldrsh r0, [r1, r0]
|
|
add r1, r0, r7
|
|
ldr r0, [r5, #0x10]
|
|
strb r1, [r0, #1]
|
|
add r1, sp, #4
|
|
mov r0, #0
|
|
ldrsh r1, [r1, r0]
|
|
ldr r0, [sp]
|
|
add r1, r1, r0
|
|
ldr r0, [r5, #0x10]
|
|
add r5, #0x1c
|
|
strb r1, [r0, #3]
|
|
mov r0, #0x2d
|
|
lsl r0, r0, #4
|
|
ldr r0, [r6, r0]
|
|
cmp r4, r0
|
|
blt _02086F58
|
|
_02086FC8:
|
|
add sp, #8
|
|
pop {r3, r4, r5, r6, r7, pc}
|
|
thumb_func_end sub_02086F44
|
|
|
|
thumb_func_start sub_02086FCC
|
|
sub_02086FCC: ; 0x02086FCC
|
|
push {r4, lr}
|
|
add r4, r0, #0
|
|
mov r0, #2
|
|
mov r1, #0x6c
|
|
bl sub_02013534
|
|
mov r1, #0xde
|
|
lsl r1, r1, #2
|
|
str r0, [r4, r1]
|
|
mov r0, #2
|
|
mov r1, #0x6c
|
|
bl FontID_Alloc
|
|
pop {r4, pc}
|
|
thumb_func_end sub_02086FCC
|
|
|
|
thumb_func_start sub_02086FE8
|
|
sub_02086FE8: ; 0x02086FE8
|
|
push {r4, lr}
|
|
add r4, r0, #0
|
|
mov r0, #2
|
|
bl FontID_Release
|
|
mov r0, #0xdf
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
bl sub_02013660
|
|
mov r0, #0xe1
|
|
lsl r0, r0, #2
|
|
add r0, r4, r0
|
|
bl sub_02021B5C
|
|
mov r0, #0xe
|
|
lsl r0, r0, #6
|
|
ldr r0, [r4, r0]
|
|
bl sub_02013660
|
|
mov r0, #0x39
|
|
lsl r0, r0, #4
|
|
add r0, r4, r0
|
|
bl sub_02021B5C
|
|
mov r0, #0xde
|
|
lsl r0, r0, #2
|
|
ldr r0, [r4, r0]
|
|
bl sub_020135AC
|
|
pop {r4, pc}
|
|
.balign 4, 0
|
|
thumb_func_end sub_02086FE8
|
|
|
|
thumb_func_start sub_02087028
|
|
sub_02087028: ; 0x02087028
|
|
push {r4, lr}
|
|
sub sp, #0x18
|
|
add r3, r0, #0
|
|
mov r0, #0x10
|
|
str r0, [sp]
|
|
mov r0, #8
|
|
str r0, [sp, #4]
|
|
mov r0, #0
|
|
str r0, [sp, #8]
|
|
mov r0, #1
|
|
ldr r4, _02087060 ; =0x000003EB
|
|
str r0, [sp, #0xc]
|
|
str r0, [sp, #0x10]
|
|
add r0, r4, #0
|
|
add r2, r4, #0
|
|
str r4, [sp, #0x14]
|
|
sub r0, #0xef
|
|
sub r2, #0xfb
|
|
sub r4, #0xf7
|
|
ldr r0, [r3, r0]
|
|
ldr r2, [r3, r2]
|
|
ldr r3, [r3, r4]
|
|
mov r1, #2
|
|
bl sub_0200D644
|
|
add sp, #0x18
|
|
pop {r4, pc}
|
|
nop
|
|
_02087060: .word 0x000003EB
|
|
thumb_func_end sub_02087028
|
|
|
|
thumb_func_start sub_02087064
|
|
sub_02087064: ; 0x02087064
|
|
push {r3, r4, lr}
|
|
sub sp, #4
|
|
add r4, r0, #0
|
|
bl sub_02087028
|
|
mov r1, #0
|
|
add r0, r4, #0
|
|
mov r2, #0x4e
|
|
mov r3, #0xa5
|
|
str r1, [sp]
|
|
bl sub_02087090
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
add r0, r4, #0
|
|
mov r1, #1
|
|
mov r2, #0xac
|
|
mov r3, #0xa5
|
|
bl sub_02087090
|
|
add sp, #4
|
|
pop {r3, r4, pc}
|
|
thumb_func_end sub_02087064
|
|
|
|
thumb_func_start sub_02087090
|
|
sub_02087090: ; 0x02087090
|
|
push {r4, r5, r6, r7, lr}
|
|
sub sp, #0x5c
|
|
add r5, r0, #0
|
|
add r4, r1, #0
|
|
mov r0, #0
|
|
mov r1, #0x1b
|
|
mov r2, #0x26
|
|
mov r3, #0x6c
|
|
bl NewMsgDataFromNarc
|
|
add r1, r4, #2
|
|
str r0, [sp, #0x14]
|
|
bl NewString_ReadMsgData
|
|
str r0, [sp, #0x18]
|
|
add r0, sp, #0x1c
|
|
bl InitWindow
|
|
mov r0, #0
|
|
str r0, [sp]
|
|
str r0, [sp, #4]
|
|
mov r0, #0xbe
|
|
lsl r0, r0, #2
|
|
ldr r0, [r5, r0]
|
|
add r1, sp, #0x1c
|
|
mov r2, #0xa
|
|
mov r3, #2
|
|
bl AddTextWindowTopLeftCorner
|
|
ldr r1, [sp, #0x18]
|
|
mov r0, #2
|
|
mov r2, #0
|
|
mov r3, #0x50
|
|
bl FontID_String_GetCenterAlignmentX
|
|
mov r1, #0
|
|
add r3, r0, #0
|
|
str r1, [sp]
|
|
mov r0, #0xff
|
|
str r0, [sp, #4]
|
|
ldr r0, _020871BC ; =0x000F0D02
|
|
ldr r2, [sp, #0x18]
|
|
str r0, [sp, #8]
|
|
str r1, [sp, #0xc]
|
|
add r0, sp, #0x1c
|
|
mov r1, #2
|
|
bl AddTextPrinterParameterized2
|
|
add r0, sp, #0x1c
|
|
mov r1, #1
|
|
mov r2, #0x6c
|
|
bl sub_02013688
|
|
mov r3, #0xe1
|
|
lsl r3, r3, #2
|
|
mov r1, #0xc
|
|
add r6, r4, #0
|
|
mul r6, r1
|
|
mov r1, #1
|
|
add r3, r5, r3
|
|
add r2, r1, #0
|
|
add r3, r3, r6
|
|
bl sub_02021AC8
|
|
add r0, r4, #0
|
|
add r0, #0x1a
|
|
lsl r0, r0, #2
|
|
add r3, r5, r0
|
|
ldr r0, _020871C0 ; =0x00000306
|
|
add r2, r0, #1
|
|
ldrb r1, [r3, r0]
|
|
ldrb r2, [r3, r2]
|
|
add r2, r1, r2
|
|
lsr r1, r2, #0x1f
|
|
add r1, r2, r1
|
|
lsl r1, r1, #0xf
|
|
asr r7, r1, #0x10
|
|
sub r1, r0, #2
|
|
ldrb r2, [r3, r1]
|
|
sub r1, r0, #1
|
|
ldrb r1, [r3, r1]
|
|
add r2, r2, r1
|
|
lsr r1, r2, #0x1f
|
|
add r1, r2, r1
|
|
lsl r1, r1, #0xf
|
|
asr r1, r1, #0x10
|
|
str r1, [sp, #0x10]
|
|
add r1, r0, #0
|
|
add r1, #0x72
|
|
ldr r1, [r5, r1]
|
|
sub r0, #0x12
|
|
str r1, [sp, #0x2c]
|
|
add r1, sp, #0x1c
|
|
str r1, [sp, #0x30]
|
|
ldr r0, [r5, r0]
|
|
bl sub_0200E2B0
|
|
mov r1, #0xbd
|
|
lsl r1, r1, #2
|
|
str r0, [sp, #0x34]
|
|
ldr r0, [r5, r1]
|
|
add r1, #0xf7
|
|
bl sub_0200D934
|
|
str r0, [sp, #0x38]
|
|
mov r1, #0
|
|
mov r0, #0xe2
|
|
str r1, [sp, #0x3c]
|
|
add r2, r5, r6
|
|
lsl r0, r0, #2
|
|
ldr r2, [r2, r0]
|
|
sub r0, #0xc
|
|
add r5, r5, r0
|
|
sub r7, #0x28
|
|
str r2, [sp, #0x40]
|
|
lsl r2, r7, #0x10
|
|
asr r2, r2, #0x10
|
|
str r2, [sp, #0x44]
|
|
ldr r2, [sp, #0x10]
|
|
lsl r4, r4, #2
|
|
sub r2, r2, #7
|
|
lsl r2, r2, #0x10
|
|
asr r2, r2, #0x10
|
|
str r1, [sp, #0x4c]
|
|
str r1, [sp, #0x50]
|
|
mov r1, #1
|
|
str r1, [sp, #0x54]
|
|
mov r1, #0x6c
|
|
str r2, [sp, #0x48]
|
|
str r1, [sp, #0x58]
|
|
add r0, sp, #0x2c
|
|
bl sub_020135D8
|
|
str r0, [r5, r4]
|
|
ldr r0, [r5, r4]
|
|
ldr r1, [sp, #0x70]
|
|
bl sub_020138E0
|
|
ldr r0, [sp, #0x18]
|
|
bl String_Delete
|
|
ldr r0, [sp, #0x14]
|
|
bl DestroyMsgData
|
|
add r0, sp, #0x1c
|
|
bl RemoveWindow
|
|
add sp, #0x5c
|
|
pop {r4, r5, r6, r7, pc}
|
|
nop
|
|
_020871BC: .word 0x000F0D02
|
|
_020871C0: .word 0x00000306
|
|
thumb_func_end sub_02087090
|
|
|
|
thumb_func_start sub_020871C4
|
|
sub_020871C4: ; 0x020871C4
|
|
push {r4, r5, r6, r7, lr}
|
|
sub sp, #0x14
|
|
add r5, r1, #0
|
|
add r7, r0, #0
|
|
add r0, r5, #0
|
|
add r4, r2, #0
|
|
add r6, r3, #0
|
|
bl InitWindow
|
|
ldr r0, [sp, #0x28]
|
|
lsl r2, r4, #0x18
|
|
lsl r0, r0, #0x18
|
|
lsr r0, r0, #0x18
|
|
str r0, [sp]
|
|
ldr r0, [sp, #0x2c]
|
|
lsl r3, r6, #0x18
|
|
lsl r0, r0, #0x18
|
|
lsr r0, r0, #0x18
|
|
str r0, [sp, #4]
|
|
ldr r0, [sp, #0x30]
|
|
add r1, r5, #0
|
|
lsl r0, r0, #0x18
|
|
lsr r0, r0, #0x18
|
|
str r0, [sp, #8]
|
|
mov r0, #0xc
|
|
str r0, [sp, #0xc]
|
|
ldr r0, [sp, #0x34]
|
|
lsr r2, r2, #0x18
|
|
lsl r0, r0, #0x10
|
|
lsr r0, r0, #0x10
|
|
str r0, [sp, #0x10]
|
|
add r0, r7, #0
|
|
lsr r3, r3, #0x18
|
|
bl AddWindowParameterized
|
|
mov r1, #1
|
|
add r0, r5, #0
|
|
add r2, r1, #0
|
|
mov r3, #0xb
|
|
bl DrawFrameAndWindow2
|
|
add r0, r5, #0
|
|
mov r1, #0xf
|
|
bl FillWindowPixelBuffer
|
|
add r0, r5, #0
|
|
bl CopyWindowToVram
|
|
ldr r1, [sp, #0x38]
|
|
add r0, r5, #0
|
|
bl sub_02087230
|
|
add sp, #0x14
|
|
pop {r4, r5, r6, r7, pc}
|
|
thumb_func_end sub_020871C4
|
|
|
|
thumb_func_start sub_02087230
|
|
sub_02087230: ; 0x02087230
|
|
push {r3, r4, r5, r6, lr}
|
|
sub sp, #0xc
|
|
add r5, r1, #0
|
|
mov r1, #0xf
|
|
add r4, r0, #0
|
|
bl FillWindowPixelBuffer
|
|
mov r0, #0
|
|
mov r1, #0x1b
|
|
mov r2, #0x26
|
|
mov r3, #0x6c
|
|
bl NewMsgDataFromNarc
|
|
add r1, r5, #0
|
|
add r6, r0, #0
|
|
bl NewString_ReadMsgData
|
|
add r5, r0, #0
|
|
add r0, r4, #0
|
|
mov r1, #0xf
|
|
bl FillWindowPixelBuffer
|
|
mov r3, #0
|
|
str r3, [sp]
|
|
str r3, [sp, #4]
|
|
add r0, r4, #0
|
|
mov r1, #1
|
|
add r2, r5, #0
|
|
str r3, [sp, #8]
|
|
bl AddTextPrinterParameterized
|
|
add r0, r4, #0
|
|
bl CopyWindowToVram
|
|
add r0, r5, #0
|
|
bl String_Delete
|
|
add r0, r6, #0
|
|
bl DestroyMsgData
|
|
add sp, #0xc
|
|
pop {r3, r4, r5, r6, pc}
|
|
thumb_func_end sub_02087230
|
|
|
|
.rodata
|
|
|
|
_021027C8:
|
|
.byte 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00
|
|
.byte 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00
|
|
_021027DC:
|
|
.byte 0x60, 0x00, 0x00, 0x00
|
|
.byte 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
|
|
.byte 0x10, 0x00, 0x00, 0x00
|
|
_021027F4:
|
|
.byte 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
.byte 0x20, 0x00, 0x00, 0x00
|