Need help with ASM analysis

Started by _Vuze_, October 17, 2009, 03:25:36 PM

Previous topic - Next topic

_Vuze_

Hey guys,
I want to make a file replacement code for Monster Hunter 3 [RMHJ08] like the one for SS:BB by Phantom Wings, but as I saw that the code was made by using ASM I was lost :D
So, here is the code (PAL version):
[spoiler=SSBB File replacement by Phantom Wings, ported by Y.S.]225683EC 00000000
C201C3A8 00000017
38A00067 38810020
3862E8F8 3D80803F
618CD148 7D8903A6
4E800421 38A0007F
3883FFE8 38610020
3D80803F 618CD148
7D8903A6 4E800421
38A00068 3882E8F8
38610020 9421FF80
BC410008 38610088
3D808001 618CCE7C
7D8903A6 4E800421
7C7C1B78 2C030000
4082000C 38210080
48000034 B8410008
38210080 3D80803F
618CD148 7D8903A6
4E800421 38610008
3D808001 618CC50C
7D8903A6 4E800421
7C7C1B78 3D808001
618CC3AC 7D8903A6
4E800420 00000000
C201CF94 00000007
2C030000 41820018
3D808002 618C5BFC
7D8903A6 4E800421
48000008 8078000C
3D808001 618CCF98
7D8903A6 4E800420
60000000 00000000
043EEE04 48000014
043EF000 48000014
043D8FC8 48000018
043E9F78 38600000
043EA164 38600000
043D90AC 60000000
80000000 80409728
80000001 805A99C0
8A001001 00000000
065A99D0 00000008
2F525342 502F7066
E0000000 80008000[/spoiler]

What WiiRD <-> ASM says:
[spoiler=Adress 8001CF94]cmpwi r3,0
beq- 0x18
lis r12,-32766
ori r12,r12,23548
mtctr r12
bctrl
b 0x08
lwz r3,12(r24)
lis r12,-32767
ori r12,r12,53144
mtctr r12
bctr
nop
[/spoiler]

[spoiler= at adress 8001CF94]cmpwi r3,0
beq- 0x18
lis r12,-32766
ori r12,r12,23548
mtctr r12
bctrl
b 0x08
lwz r3,12(r24)
lis r12,-32767
ori r12,r12,53144
mtctr r12
bctr
nop[/spoiler]

Any help or explanation on how to continue?

kind regards
I\\\'m a beginner to hacking~
Sorry if I ask n00bish questions :X

paprika_killer

try sending a PM to phantom wings.
[SIGPIC][/SIGPIC]

Almas

The File Replacement Code for SSBB works because and only because SSBB has built in features to load files from the SD Card. The code hijacks the code which loads normal files and coerces it into running certain sections from the code which loads from the SD Card when it would not normally.

If you game does not have the functionality to load files from the SD Card, there is no chance of a File Replacement Code working for it in this way. Even if it does, a simple copy of Phantom Wings' code for SSBB will not work. You must copy the method, not the code.