wierd disagreement between the binary and the prxtool output

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
serige
Posts: 34
Joined: Mon Nov 26, 2007 8:41 am

wierd disagreement between the binary and the prxtool output

Post by serige »

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?
serige
Posts: 34
Joined: Mon Nov 26, 2007 8:41 am

Post by serige »

=P
Last edited by serige on Sun Jan 20, 2008 3:30 am, edited 1 time in total.
adrahil
Posts: 274
Joined: Thu Mar 16, 2006 1:55 am

Post by adrahil »

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.
serige
Posts: 34
Joined: Mon Nov 26, 2007 8:41 am

Post by serige »

oh, i see. Sorry for being too panic without taking a look at the rules.
Post Reply