Created
June 2, 2018 01:32
-
-
Save SciresM/4d7ca8861af1245aecb187b2250562d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xbc100: ; save start | |
mov x19, x0 | |
mov x0, #0xC0000000 | |
adrp x1, #0x15000 | |
ldr x1, [x1, #0x730] | |
ldr x1, [x1] | |
add x0, x1, x0 | |
adrp x1, #0x15000 | |
ldr x1, [x1, #0x668] | |
ldr x1, [x1] | |
sub x0, x0, x1 | |
mov x2, #0xCFCF | |
ldr x1, [x19, #0x8] | |
cmp x1, x2 | |
beq arbread | |
ldr x1, [x0] | |
cmp x1, x2 | |
beq initialized | |
str x2, [x0] | |
add x1, x0, #0x40 | |
str x1, [x0, #0x8] | |
initialized: | |
ldr x1, [x0, #0x8] | |
ldp x2, x3, [x19] | |
stp x2, x3, [x1] | |
ldp x2, x3, [x19, #0x10] | |
stp x2, x3, [x1, #0x10] | |
ldp x2, x3, [x19, #0x20] | |
stp x2, x3, [x1, #0x20] | |
ldp x2, x3, [x19, #0x30] | |
stp x2, x3, [x1, #0x30] | |
add x1, x1, #0x40 | |
str x1, [x0, #0x8] | |
b #-0x4DD4 | |
arbread: | |
ldr x0, [x19, #0x10] | |
adrp x1, #0x15000 | |
ldr x1, [x1, #0x730] | |
ldr x1, [x1] | |
add x0, x1, x0 | |
adrp x1, #0x15000 | |
ldr x1, [x1, #0x668] | |
ldr x1, [x1] | |
sub x0, x0, x1 | |
ldr x1, [x0] | |
mov x0, #0x0 | |
stp x0, x1, [x19] | |
ldp x20, x19, [sp],#0x10 | |
ret | |
0xbc200 : ; save after | |
stp x0, x1, [x19, #0x00] | |
stp x2, x3, [x19, #0x10] | |
stp x4, x5, [x19, #0x20] | |
stp x6, x7, [x19, #0x30] | |
mov x19, #0xC0000000 | |
adrp x20, #0x15000 | |
ldr x20, [x20, #0x730] | |
ldr x20, [x20] | |
add x19, x20, x19 | |
adrp x20, #0x15000 | |
ldr x20, [x20, #0x668] | |
ldr x20, [x20] | |
sub x19, x19, x20 | |
ldr x20, [x19, #0x8] | |
stp x0, x1, [x20, #0x00] | |
stp x2, x3, [x20, #0x10] | |
stp x4, x5, [x20, #0x20] | |
stp x6, x7, [x20, #0x30] | |
add x20, x20, #0x40 | |
str x20, [x19, #0x8] | |
ldp x20, x19, [sp],#0x10 | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome !