Key binding

Status
Not open for further replies.
Initiate Mage
Joined
Jun 10, 2010
Messages
3
Reaction score
0
Hi, i don't know is it best place to ask that, but i will ask, is it possible to bind keys in Mu Online, if exact, u know when u press down Ctrl button u can kill other player, is it possible to bind that i can push down Tab key and it do the same as Ctrl?

Sorry for my bad eng.
 
Hi, i don't know is it best place to ask that, but i will ask, is it possible to bind keys in Mu Online, if exact, u know when u press down Ctrl button u can kill other player, is it possible to bind that i can push down Tab key and it do the same as Ctrl?

Sorry for my bad eng.

they are defined in main.exe already, should be editable tho
 
Upvote 0
As Shatter said key bindings are hard coded inside main.exe, so if you want to change them you have to change some bytes in main.exe.

And using a hex editor is useless if you don't know what offset you must change, so you need to use a debugger like OllyDBG.

So, use OllyDBG and open main.exe with it. Then do CTRL+N and find GetAsyncKeyState API (this is the API that MuOnline uses for get in-game keys), do right click and click in "Follow import in Disassembler". Then copy the offset on top with CTRL+C.

Then go to the "main module" pressing the "-" key at least 2 times. Then right click "Search for>All sequences" and write there this.

Code:
PUSH 11
CALL YYY

Where YYY is the offset of GetAsyncKeyState that you copied.
PUSH 11 is because is the control key (it says it in the MSDN ^^)

And then in the offsets that you have found change PUSH 11 for PUSH 9, and control key should be changed for TAB key.
Code:
VK_TAB 0x09
TAB key


If you have a question just tell me ^^
 
Last edited:
Upvote 0
Ok everything gose fine until i need to change PUSH 11 to PUSH 9 i cant understand where i have to do that, cause when i search for sequence, i get 1 founded, and i dont know what to do next... can u help me?
 
Upvote 0
ive tried this with the T key and cant find any reference to it

Push 54
CALL 7E42A787

any hints?

If T key is "Push 54" and "CALL 7E42A787" is the call for GetAsyncKeyState API.

Then it is possible that the T key is not called with a CALL Offset, maybe with a CALL EBP, CALL EDI, or CALL ESI (at least in my main.exe I see those registers that are used for call GetAsyncKeyState API.

So search those:

Code:
Push 54
CALL EBP

Code:
Push 54
CALL ESI

Code:
Push 54
CALL EDI
 
Last edited:
Upvote 0
Here you have a little algorithm that can search for any kind of that sequences:

Code:
PUSH BYTE
CALL REG32

Code:
SearchAlgo Proc AddrToSearch:Dword, pEndOfSearch:Dword
   mov eax, AddrToSearch
   .Repeat
      .If (Byte ptr [eax] == 6Ah)    ;PUSH opcode prefix
         movsx edx, byte ptr [eax+1] 
         and edx, 7Fh
         .If (edx > 0)
            .If (Byte ptr [eax+3] == 0FFh) ; CALL REG32 prefix
              .If (Byte ptr [eax+4] >= 0D0h) || (Byte ptr [eax+4] <= 0D7h)
                 jmp @End
              .Endif
            .Endif
          .Endif
       .Endif
       add eax, 1
    .Until (eax == pEndOfSearch)
    xor eax, eax
  @End:
    Retn
SearchAlgo EndP

You should be able to compile it or pass the idea to C++, just need to input the address to start search and the end of it.

It will return if founded in EAX register (default C++ return) the address of where is some code block like:

Code:
PUSH BYTE8 (Till 7Fh)
CALL REG32

Enjoy :lol::lol:
 
Upvote 0
Status
Not open for further replies.
Back