Open 173210 opened 9 years ago
Thanks to Aliak and filpy, I got a dump of 0xFFFF097C which was hooked.
0xFFFF097C: e28f0010 add r0, pc, #16
0xFFFF0980: e28f1044 add r1, pc, #68 ; 0x44
I updated arm11.s with commit d503c0dc28fafcb88a31cbaf12914d59bbf324c4.
hook0 is completed with commit bdc6d0b8982843fb5134e40155ed54df5cb539b2.
I love you, marry me.
I like a person who can write code :) Anyway, I had a problem when I reversing Gateway 3DS. Offset 0xBFC0
void memcpy64(const int32_t *top, const int32_t *btm, int32_t *dst)
{
const int32_t *p;
size_t n;
n = (ptrdiff_t)btm - (ptrdiff_t)top;
if (n < 4)
return;
top--;
dst--;
if (n & (1 << 29)) {
*dst = *top;
top++;
dst++;
}
for (n >>= 3; n; n--) {
dst[1] = top[1];
dst[2] = top[2];
top += 2;
dst += 2;
}
}
I can't understand why "if (n & (1 << 29))" is needed.
Obfuscation ?
Maybe.
Nothing, was silly...
arm9.s was completed with commit bb81d9a2cc59942230549a361cb2684fddfc85a7. But it has not been confirmed yet.
It still freezes at executing code under arm11 Kernel, not clearing the screen.
I found a bug and fix with commit 17a5b206e7041b388e6bb345bb9e01052cbe1369.
arm9-kernel branch is open now on KARL repository. https://github.com/shinyquagsire23/bootstrap/tree/arm9-kernel
arm11.s includes hooks to enable to gain ARM9 access.
Yifan Lu reversed code is here. http://yifan.lu/2015/01/17/reversing-gateway-ultra-stage-3-owning-arm9-kernel/
Reversed code of Gateway 3Ds is here.