cmp r0, #0x0
beq Abort
cmp r0, #0x3
bgt Abort
cmp r0, #0x1
bne StandardAbort
b Start
Abort:
ldr r1, .AbortAddr
bx r1
StandardAbort:
ldr r1, .StandardAbortAddr
bx r1
.align 2
.AbortAddr: .word 0x08137dc5
.StandardAbortAddr: .word 0x08137dc1
Start:
ldr r0, .ActiveMonPtr
ldr r1, .ActiveOffset
ldr r0, [r0, #0x0]
add r6, r0, r1
add sp, #-0x18
HPIV:
mov r0, r6
mov r1, #0x27
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x6
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
AtkIV:
mov r0, r6
mov r1, #0x28
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x17
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
DefIV:
mov r0, r6
mov r1, #0x29
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x24
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
SAtkIV:
mov r0, r6
mov r1, #0x2B
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x31
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
SDefIV:
mov r0, r6
mov r1, #0x2C
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x3E
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
SpeedIV:
mov r0, r6
mov r1, #0x2A
bl Decrypter
mov r5, r0
lsr r5, r5, #0x1
mov r0, #0x40
mul r5, r0, r5
mov r1, #0x80
str r1, [sp, #0x0]
str r1, [sp, #0x4]
#x, y position
mov r2, #0xC
str r2, [sp, #0x8]
mov r1, #0x4B
str r1, [sp, #0xc]
#x, y size
mov r2, #0x10
str r2, [sp, #0x10]
mov r1, #0x8
str r1, [sp, #0x14]
mov r0, #0x3
ldr r1, .GraphicAddr
add r1, r5
mov r2, #0x0
mov r3, #0x0
bl GraphicHandler
add sp, #0x18
b Abort
GraphicHandler:
ldr r4, .HandlerAddr
bx r4
Decrypter:
ldr r2, .DecrypterAddr
bx r2
.align 2
.GraphicAddr: .word 0x08XXXXXX
.HandlerAddr: .word 0x0800415d
.ActiveMonPtr: .word 0x0203b140
.ActiveOffset: .word 0x00003290
.MonIndex: .word 0x0203b16c
.DecrypterAddr: .word 0x0803fad5