• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mw2 Functions Injection - DLL
#1
In this toturial you will learn how to inject some commands to the game Functions

1) how to inject Command to Game console ?

this code will do it (C++ & Assembly)

PHP Code:
void SendToConsole(charCommand,bool Cmd){
    
int ConsoleAddress 0x4393E0;
    
int ConsoleOffset2 0x4F8120;
    if(
Cmd == 0){
        
_asm{
                
push Command
                push 0
                push 0
                call 
[ConsoleAddress]
                
add esp,0x0c
        
}
    }
    else if(
Cmd == 1){
        
_asm{
                
push Command
                push 0
                call 
[ConsoleOffset2]
                
add esp,0x8
        
}
    }


Explanation -
the next code will inject commands to console
for some commands you need to use the first Assembly code
for more commands the game will crash .. so you will need to use the Other ASM code

here a Example

SendToConsole("xpartygo",1);
and here a Other Example
SendToConsole("say \"Code By NieXrlaM X_X\"",0);


2) how to inject Text to Console Textbox ?

this code will do it (C++ & Assembly)

PHP Code:
void  SendTextToConsole(charText){
    
int Address 0x4D1D90;
    
_asm{
        
PUSH [Text]
        
CALL [Address]
        
add esp,0x04
    
}


here a Example -

SendTextToConsole("\n Code By NieXrlaM X_X \n");

here what its does -

[Image: examplekz.png]

3) how to inject Text to Chat Display Function ?

this code will do it (C++ & Assembly)

PHP Code:
void SendTextToChat(charText){
        
charTypes "chat message";
         
int ChatOffset 0x594830;
        
_asm{
        
push [Types]
        
push 0x3A83B201
        push 0x96
        push 
[Text]
        
push [Text]
        
mov esi,[Text]
        
mov ecx,esi
        call 
[ChatOffset]
        
add esp,0x14
        
}


here a Example -

SendTextToChat("^3Code By NieXrlaM X_X");

here what it does -

[Image: example2t.png]

Enjoy !
(and sorry for my english) Tongue
[Image: 14y48rc.png]
There are 10 types of people in the world, those who know binary code and those who not understand the joke ,,
[-] The following 2 users say Thank You to NieXrlaM for this post:
  • aosma8, deadIce
  Reply
#2
Nice one niexrlam will be interesting to test
  Reply
#3
If only I'd seen this post earlier today, I wouldn't have spent the time messing around trying to do this myself Tongue
  Reply
#4
could you quickly tell us how to find the offsets? looked around the net but dont see how to find sendtexttochat and console offsets, could you tell us how you found them?
  Reply
#5
(07-28-2011, 09:47)Baber786 Wrote: could you quickly tell us how to find the offsets? looked around the net but dont see how to find sendtexttochat and console offsets, could you tell us how you found them?

there are 2 or 3 tuts here posted on how to find offsets using odbg

http://www.itsmods.com/forum/Thread-Vide...nning.html
http://www.itsmods.com/forum/Thread-Sign...nning.html
http://www.itsmods.com/forum/Thread-Byte...anner.html

also a few offsets that are needed are always updated in this thread:
http://www.itsmods.com/forum/Thread-BO-M...-post.html
  Reply
#6
(07-28-2011, 10:58)d0h! Wrote:
(07-28-2011, 09:47)Baber786 Wrote: could you quickly tell us how to find the offsets? looked around the net but dont see how to find sendtexttochat and console offsets, could you tell us how you found them?

there are 2 or 3 tuts here posted on how to find offsets using odbg

http://www.itsmods.com/forum/Thread-Vide...nning.html
http://www.itsmods.com/forum/Thread-Sign...nning.html
http://www.itsmods.com/forum/Thread-Byte...anner.html

also a few offsets that are needed are always updated in this thread:
http://www.itsmods.com/forum/Thread-BO-M...-post.html

yes, but none of them show how to find sendtextoconsole or sendtexttochat offsets, havennt seen any tuts which show how to find sendtexttoconsole or sendtexttochat
  Reply
#7
@Baber786

Have a look at this thread: http://www.itsmods.com/forum/Thread-How-...fsets.html
  Reply
#8
(07-29-2011, 10:51)aosma8 Wrote: @Baber786

Have a look at this thread: http://www.itsmods.com/forum/Thread-How-...fsets.html

still dont see how to find sendtextoconsole or sendtexttochat offset :L well if knew like whats strings to search for or how to locate the offset

  Reply
#9
(07-30-2011, 20:12)Baber786 Wrote:
(07-29-2011, 10:51)aosma8 Wrote: @Baber786

Have a look at this thread: http://www.itsmods.com/forum/Thread-How-...fsets.html

still dont see how to find sendtextoconsole or sendtexttochat offset :L well if knew like whats strings to search for or how to locate the offset
@Baber786

It's in the thread...

SendCommandToConsole:
Code:
Search for string "stoprecord" or "screenshot silent" or "quit" or "pb_sv_guidrelax".
Code:
0046C90F   68 400E6D00    PUSH iw3mp.006D0E40  ; ASCII "screenshot silent"
0046C914   6A 00                PUSH 0
0046C916   6A 00                PUSH 0
0046C918   E8 93D10800    CALL iw3mp.004F9AB0 '<<<--- SendCommandToConsole function offset'
0046C91D   83C4 0C                ADD ESP,0C

#define OFFSET_SENDCOMMAND 0x4F9AB0

  Reply
#10
(07-31-2011, 08:11)aosma8 Wrote:
(07-30-2011, 20:12)Baber786 Wrote:
(07-29-2011, 10:51)aosma8 Wrote: @Baber786

Have a look at this thread: http://www.itsmods.com/forum/Thread-How-...fsets.html

still dont see how to find sendtextoconsole or sendtexttochat offset :L well if knew like whats strings to search for or how to locate the offset
@Baber786

It's in the thread...

SendCommandToConsole:
Code:
Search for string "stoprecord" or "screenshot silent" or "quit" or "pb_sv_guidrelax".
Code:
0046C90F   68 400E6D00    PUSH iw3mp.006D0E40  ; ASCII "screenshot silent"
0046C914   6A 00                PUSH 0
0046C916   6A 00                PUSH 0
0046C918   E8 93D10800    CALL iw3mp.004F9AB0 '<<<--- SendCommandToConsole function offset'
0046C91D   83C4 0C                ADD ESP,0C

#define OFFSET_SENDCOMMAND 0x4F9AB0

isnt that different? sends a command to console like as if it was a dvar or a command ... not to like display text in the console text box as it shows in the first post
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] Matrix Functions Yamato 1 1,069 07-29-2013, 20:14
Last Post: Rendflex
  [Release] nCr and Factorial Functions Yamato 2 949 06-18-2013, 17:24
Last Post: Nekochan
  [Release] Random Functions 1.1 Yamato 22 4,975 04-20-2013, 10:13
Last Post: Dominator56
Question [Request] Help on dll Injection code! barata 8 2,576 12-15-2012, 18:52
Last Post: kokole
  Functions surtek 14 5,430 09-19-2012, 07:57
Last Post: Pozzuh
Information [Solved] Info about functions, events and etc. Nerus 2 1,013 09-09-2012, 20:57
Last Post: surtek
  Seldom required functions Phl3x_ 3 1,333 06-03-2012, 10:53
Last Post: RaZ
  Help WinSock DLL Injection JariZ 6 2,579 05-05-2012, 23:15
Last Post: Pozzuh
  Help I find This functions and i need your help. Bloodfocus 5 1,659 04-23-2012, 01:43
Last Post: House
  Help Functions iPrintLnBold() [Z00MBY] Alex 7 2,750 04-16-2012, 08:44
Last Post: [Z00MBY] Alex

Forum Jump:


Users browsing this thread: 1 Guest(s)