Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 18:21

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Recv Funktion nutzen in C++ [Problem]

Discussion on Recv Funktion nutzen in C++ [Problem] within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
MaxMilimeter's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 422
Received Thanks: 164
Exclamation Recv Funktion nutzen in C++ [Problem]

Hi,
ich will mal wieder n bisschen mit der RECV Funktion rumspielen.

Code:
0051F131   > 8B45 FC        MOV EAX,DWORD PTR SS:[EBP-4] (EBP-4 !?!?!?!? WAS MACH ICH DAMIT)
0051F134   . 8B40 34        MOV EAX,DWORD PTR DS:[EAX+34]
0051F137   . 8B55 F4        MOV EDX,DWORD PTR SS:[EBP-C] (<< MEIN PAKET PER DLL)
0051F13A   . E8 35A8FFFF    CALL NostaleX.00519974                   ;RECV
Hier wird das Recv Paket an die Recv Funktion übergeben, wie schreib ich EAX wenn EBP einen Wert hat der von meiner DLL selbst verwendet wird?
Sprich der EBP Wert lässt sich nicht mit inline ASM beeinflussen.

In EDX befindet sich mein eigenes Paket.

MfG,
Max
MaxMilimeter is offline  
Old 11/14/2013, 00:01   #2
 
elite*gold: 0
Join Date: Aug 2013
Posts: 154
Received Thanks: 166
if this can help you, it's the old function..

Code:
void RecvPacket(char * packet)
{
        __asm{
                mov eax,DWORD PTR DS:[0x647a4c]
                mov eax,DWORD PTR DS:[eax]
                mov eax, [eax + 0x34]          
                mov edx, packet              
                call RecvAddr
        }
}
i prefer if you learn how to do, so you don't need always ask to the community..

then i say 'see the old function, try to update it..' but if you don't know how to do this i can try to help..

NOTE: First you need try, release your code and say where is the problem..
Sm•ke is offline  
Thanks
1 User
Old 11/14/2013, 00:21   #3
 
elite*gold: 0
Join Date: Apr 2010
Posts: 2,832
Received Thanks: 4,152
Quote:
Originally Posted by Sm•ke View Post
i prefer if you learn how to do, so you don't need always ask to the community.


Can't get it to work - ask the community - found an old function - copy n paste - i did it!!!111



Serious? You're saying "LEARN HOW TO DO IT"? SERIOUS? YOU?
Elektrochemie is offline  
Thanks
1 User
Old 11/14/2013, 00:31   #4

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
ebp ist der Basepointer des Stackframes, ebp-4 wird ne lokale Variable sein, +034 dann wohl ein Offset in einer Klasse / in einem Struct. Evtl. wird der Zeiger nur in die Variable kopiert, musst du mal weiter oben im Code schauen.
snow is offline  
Thanks
2 Users
Old 11/14/2013, 01:08   #5
 
elite*gold: 0
Join Date: Aug 2013
Posts: 154
Received Thanks: 166
Quote:
Originally Posted by Elektrochemie View Post


Can't get it to work - ask the community - found an old function - copy n paste - i did it!!!111



Serious? You're saying "LEARN HOW TO DO IT"? SERIOUS? YOU?
If you seen the thread i release the part reversed by me, i tryed to make my function and.. i solved alone.. not ?


try so:

Code:
DWORD RecvAddr = 0x005197CC;

void RecvPacket(char *packet)
{
	__asm{
		mov eax, DWORD PTR DS:[0x66B0A0]
		mov eax, DWORD PTR DS:[eax]
		mov eax, [eax + 0x34]
		mov edx, packet
		call recvAddr
	}
}
first to move in edx the packet do the same of send func, i'm not sure that this work because i seen in 1m, tomorrow i see better ^^
Sm•ke is offline  
Thanks
1 User
Old 11/14/2013, 13:48   #6
 
MaxMilimeter's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 422
Received Thanks: 164
Thanks, but no, doesnt work.

How can I [EBP-4] subtract Pointers in Inline ASM?
[RECV_E - 0x04] doesnt work

RECV_E = 0x0018FC44

MfG,
Max
MaxMilimeter is offline  
Old 11/14/2013, 14:24   #7

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
0x0018FC44 seems to be a stack address. The stack does not store any data permanently and your function (-> your thread) has its own stack) thus you don't have any access to the address.

Again: Take another look at the function, either the this-pointer is stored in that variable (your functions 1st variable) -> copied from the functions arguments or copied from some global variable, or the function allocates memory and initialises a class-instance. You'll have to find that pointer, any registers won't help you a lot at runtime.
snow is offline  
Thanks
2 Users
Old 11/14/2013, 16:01   #8
 
MaxMilimeter's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 422
Received Thanks: 164
@snow911: Big thx to you for your help Sth from the Stack was copied into EAX, so i looked up where this value was pushed on the stack and reversed it till ive found the pointer. Now it works
MaxMilimeter is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[HOWTO] ImageSearch - Funktion in VB nutzen
04/22/2014 - Coding Tutorials - 15 Replies
Zuerst müsst ihr die Datei ImagSearch.dll herunterladen (siehe Anhang) und im /bin/debug Ordner eures Projektes ablegen oder auch in "C:\\Windows\System32". Danach müsst ihr folgenden Code zu eurem Projekt (am Besten in einem Modul) hinzufügen. Handhabung: Falls die Koordinaten der linken oberen Ecke des gefundenen Bildes benötigt werden:
[Video]Metin2 Chat Funktion finden & nutzen
11/01/2013 - Coding Tutorials - 66 Replies
Viel Spaß Edit: Video jetzt auch online ansehbar, kleiner Fehler im Script. :rolleyes:
DLL Injection -> Funktion aus externem Programm nutzen (c++)
11/03/2011 - C/C++ - 2 Replies
Huhu allerseits, ich habe da eine relativ simple Frage, auf die ich bei Google einfach keine Antwort finde. Undzwar möchte ich eine Funktion, die sich im Opferprogramm (das Programm in das die DLL injiziert wird) befindet, mit meinen eigenen Argumenten aufrufen. Ziel ist es in einem MMORPG die Send Funktion zu nutzen, ohne diese nachbauen zu müssen. Habe es mal mit inline ASM probiert, also mein Paket in das Register geschrieben und die entsprechende Funktion gecalled. Mein Spiel stürzte...
Folgen Funktion trotz Multiclient nutzen?
01/13/2010 - Shaiya - 1 Replies
Hallo Leute, wie Ihr sicher wisst, ist das bei Shaiya so, dass sobald man das spiele fenster verlässt, sprich mal kurz zum firefox wechseln o.ä. , dann funzt das mit dem folgen schon nich mehr... Ich habe nen Multiclient und würde gerne das der eine char dem anderen automatisch folgt... sonst muss man immer hin und her switchen und das nervt... gibts da ne möglichkeit? mfg
[Question] Hooking send() & recv() works, but recv hiding data for co???
05/06/2009 - CO2 Programming - 2 Replies
Hey guys, I've been making a DLL to allow another program to intercept the packets of conquer using windows pipes. (Then its the job of the main program to decrypt the packets, the DLL only gives a communication channel for the main program) (winsock functions btw) - hooking send() works fine for my internet browser - hooking recv() works fine for my internet browser - hooking send() works fine for conquer online



All times are GMT +1. The time now is 18:23.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.