PSP Coding

HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | 

 Hiding Stuff In Your Subroutines

Go down 

Posts : 247
Points : 397
Reputation : 4
Join date : 2010-09-29
Age : 25

PostSubject: Hiding Stuff In Your Subroutines   Wed Sep 29, 2010 2:41 am


This tutorail will teach you how to hide things you don't really want to release. The main way I do this is by using a hook to call my subroutine when I want (Like if I want to make a subroutine that has something to do with shooting you can use the shooting function call or the recoil function call ect.) Now there are arguments passed to these functions as the function call's delay slot, these arguments are passed in argument register (a0, a1, a2, & a3) Here is an exampe:


Jal $Address of the start of the function
Or a0, s0, zero

Now the jal calls the function and it execute the delay slot once it gets to the function, so a0 basically is equal to s0. So we can use the value of a0 to hide things like this:

Let's say a0 = 0x0901205C
We have a pointer we want to hide: 0x08E286E0

Those two subtracted equals 0x001E997C

So we do this at the start of are subroutine:


Lui t0, $001E
ori t0, t0, $997C
add t0, t0, a0

Now t0 holds are pointer.

This might make more since if I remind you that we are using the function call as are hook (This will also cancel the function it is calling to, so it's good to use a recoil function hook or something)

Now how do we find the value of are argument?

Make the function call hook to a subroutine like this:


Lui t0, $0880
Sw a0, $1000(t0)
Jr ra

If the argument regtister is something other than a0 then use what ever it is. Now you will need the function to call to get the value (So if it is a shooting function hook, shoot, or a running function hook, run ect.)

Then go to address 0x1000 and the value there is the value in the argument register. We can use this in are math forula.
Back to top Go down
View user profile
Hiding Stuff In Your Subroutines
Back to top 
Page 1 of 1
 Similar topics
» Trade: Xmas Holiday Stuff!
» Dalu's Stuff and Nonsense
» Free Fantage Stuff!!!
» Stop Animal Abuse Club
» Firefox 4 - Mybrute stuff

Permissions in this forum:You cannot reply to topics in this forum
PSP Coding :: PSP Section :: PSP Coding Tutorials :: MIPS-
Jump to: