Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .thumb
- .global EverstoneBreeding
- .equ EVERSTONE, 0xC3
- .equ rom, 0x08000001
- .equ offset, 0xXXXXXX
- .org 0x46208
- push {r4-r7, lr}
- .org 0x46216
- mov r7, r2
- .org 0x46224
- add r4, r7, r1
- .org 0x46234
- ldr r4, jump
- bx r4
- .align 2
- jump: .word main + rom
- .org 0x4629E
- pop {r4-r7}
- @sp+4 = PID
- @r7 = mother ptr (+0x8C = father ptr)
- .org offset
- main:
- mov r4, #0x0
- str r4, [sp, #0x8]
- str r4, [sp, #0xC]
- checkmother:
- mov r0, r7
- mov r1, #0xC
- bl getattr
- cmp r0, #EVERSTONE
- bne checkfather
- getmothernature:
- mov r0, r7
- mov r1, #0x0
- bl getattr
- bl getnature
- mov r7, r0
- b natureloop
- checkfather:
- mov r0, r7
- add r0, r0, #0x8C
- mov r1, #0xC
- bl getattr
- cmp r0, #EVERSTONE
- bne return
- getfathernature:
- mov r0, r7
- add r0, r0, #0x8C
- mov r1, #0x0
- bl getattr
- bl getnature
- mov r7, r0
- natureloop:
- ldr r0, [sp, #0x4]
- add r0, r0, #0x18
- str r0, [sp, #0x4]
- bl getnature
- cmp r0, r7
- bne natureloop
- return:
- mov r0, r6
- ldr r1, =(0x0804623C|1)
- bx r1
- getattr:
- ldr r3, =(0x0803FBE8|1)
- bx r3
- getnature:
- ldr r1, =(0x08042EB4|1)
- bx r1
- .align 2
- .pool
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement