 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
serige
Joined: 26 Nov 2007 Posts: 35
|
Posted: Sat Jan 19, 2008 8:07 pm Post subject: wierd disagreement between the binary and the prxtool output |
|
|
hey guys,
Something was really bothering me yesterday when I was analyzing the assembly code of a decrypted eboot and compare to the output made by the prxtool.
Here is the disassembly code segment I was looking at
...
0x00003090: 0x27BDFFE0 '...'' - addiu $sp, $sp, -32
0x00003094: 0x24030001 '...$' - li $v1, 1
0x00003098: 0xAFB3000C '....' - sw $s3, 12($sp)
0x0000309C: 0x3C13002D '-..<' - lui $s3, 0x2D <-------
0x000030A0: 0xAFB20008 '....' - sw $s2, 8($sp)
0x000030A4: 0x00C09021 '!...' - move $s2, $a2
0x000030A8: 0xAFB10004 '....' - sw $s1, 4($sp)
0x000030AC: 0x00A08821 '!...' - move $s1, $a1
0x000030B0: 0xAFB00000 '....' - sw $s0, 0($sp)
0x000030B4: 0x00808021 '!...' - move $s0, $a0
0x000030B8: 0x240400AA '...$' - li $a0, 170
0x000030BC: 0xAFBF0010 '....' - sw $ra, 16($sp)
...
I guess because the binary file includes the header containing the info for the module (or something like that), the actual address in the binary differ by 0xc0 or 192 bytes, here is what the raw bytes look like in the eboot:
...
00003250h: E0FFBD27 01000324 0C00B3AF 1000133C <--------
00003260h: 0800B2AF 2190C000 0400B1AF 2188A000
00003270h: 0000B0AF 21808000 AA000424 1000BFAF
...
Take a look at the underlined instructions the two arrows are pointing at.
in disassembly output: 0x3C13002D
in the eboot: 1000133C
Clearly they are different! Ok, maybe I am missing something here, but I want to know why they are not the same. Can someone give me an explanation? |
|
| Back to top |
|
 |
serige
Joined: 26 Nov 2007 Posts: 35
|
Posted: Sat Jan 19, 2008 8:14 pm Post subject: |
|
|
=P
Last edited by serige on Sun Jan 20, 2008 3:30 am; edited 1 time in total |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Sat Jan 19, 2008 10:38 pm Post subject: |
|
|
First, game hacking is not supported in this forum.
Second, links to illegal stuff are not supported on the forum.
Third, read about relocations. This is why there is a difference. The register represents an address in the data section, and therefore is present in the relocations. prxtool applies the relocations before disassembling the file, that's the difference. |
|
| Back to top |
|
 |
serige
Joined: 26 Nov 2007 Posts: 35
|
Posted: Sun Jan 20, 2008 3:35 am Post subject: |
|
|
| oh, i see. Sorry for being too panic without taking a look at the rules. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|