
Iniciado por
stuCk
En que necesitas ayuda?
En como meter el 6EF191F9 en el asm o como adaptarlo al otro firm.
El asm que hice va asi:
Código:
include "x.inc"
patch equ 0x45652490
dir1 equ 0x454E5344 ;0x454DE6C8
dir2 equ 0x456172F8 ;0x45604480
dir3 equ 0x451D2011 ;0x453DFDE1
dir4 equ 0x455B3E0D ;0x455A12AD
hook1 equ 0x454EADDA ;0x454E416A
org hook1
DCD patch
org patch
sub_45652490:
MOV R1, 0
LDR R0, dword_456524B8
PUSH {R0-R7,LR}
LDR R0, off_456524B0
BL dir1
CMP R0, 0
BNE loc_456524AA
LDR R0, off_456524B4
BL dir1
CMP R0, 0
BEQ loc_456524AE
loc_456524AA:
BL dir2
loc_456524AE:
POP {R0-R7,PC}
align 4
off_456524B0 DCD dir3
off_456524B4 DCD dir4
dword_456524B8 DCD 0xE916
El Hook1 esta mal(Mande cualquiera porque no se como deberia ser) ¿Hay algo mas que este mal?.
En el link que pusiste dice para los BL:
"This field is calculated by subtracting the address of the instruction from the target address and dividing the result by 4 and b'00'. The result is then sign-extended to 32 bits and added to the address of this branch instruction."
Para BL sub_45652490 en el offset 13a416a con el valor 6EF191F9 ¿como seria esa cuenta?
El Address de la instruccion es 13a416a+4414000 = 454E416A
El Target Address debe ser = 45652490
Hay que restarlos y dividirlos por 4 pero no llego ni a palos a F991F16E ¿Como es esto?
Marcadores