Advertising
I'll leave this small utility I wrote to help me RE PSP kernel modules. Only useful to people reverse engineering modules.It's quite simple: it takes prxtool standard disassembly output and gives it a nicer and more direct look. Here's an example:
PRXTOOL bare output:
- Code: Select all
module_start:
0x00000000: 0x27BDFFF0 '...'' - addiu $sp, $sp, -16
0x00000004: 0x00A02021 '! ..' - move $a0, $a1
0x00000008: 0xAFBF0000 '....' - sw $ra, 0($sp)
0x0000000C: 0x0C0024F6 '.$..' - jal sub_000093D8
0x00000010: 0x00C02821 '!(..' - move $a1, $a2
0x00000014: 0x0C000C29 ')...' - jal sceMSstor_driver_714782D6
0x00000018: 0x00002021 '! ..' - move $a0, $zr
0x0000001C: 0x8FBF0000 '....' - lw $ra, 0($sp)
0x00000020: 0x03E00008 '....' - jr $ra
0x00000024: 0x27BD0010 '...'' - addiu $sp, $sp, 16
0x00000028: 0x27BDFFF0 '...'' - addiu $sp, $sp, -16
0x0000002C: 0xAFB00000 '....' - sw $s0, 0($sp)
After being processed by popseco utility:
- Code: Select all
module_start:
0x00000000: $sp = $sp + (-16);
0x00000004: $a0 = $a1;
0x00000008: 0($sp) = $ra;
0x0000000C: sub_000093D8();
0x00000010: $a1 = $a2;
0x00000014: sceMSstor_driver_714782D6();
0x00000018: $a0 = $zr;
0x0000001C: $ra = 0($sp);
0x00000020: ($ra)();
0x00000024: $sp = $sp + (16);
0x00000028: $sp = $sp + (-16);
0x0000002C: 0($sp) = $s0;
Personally I find it easier to understand.
It's a Perl script, so you'll need a Perl interpreter to run it. It receives the file to process as an argument and spits the result to standard output. Recommended standard usage is:
- Code: Select all
perl popseco.pl prxtool_output > prxtool_output_transformed
PS: be easy on me, it was my first Perl script, I was just starting to learn it
EDIT: added bug fixes by bluemimmosa, thanks!

