🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.asm
3 messages
3 total messages Started by lemkat Sat, 20 May 2006 13:14
problem z asm w c++
#263
Author: lemkat
Date: Sat, 20 May 2006 13:14
65 lines
1816 bytes
Mam funkcje ktora jest wywolywana przez aplikacje ktore wywoluja send(),
( inject dll to another process ) niestety problem polega na tym iz 
aplikacje te wykonuja nieprawidlowa operacje i zostaja zamkniete, w 
miejscu iBytes powinno byc __LOCAL_SIZE ale c++ builder nie rozpoznaje 
__LOCAL_SIZE, jakies sugestie co jest nie tak i co moge zmienic aby dzialalo

void custom_sendto(void)

{

// send params

BYTE *buf;

int len;

int iBytes;



iBytes = sizeof( iBytes ) + sizeof( buf ) + sizeof( len );



_asm

     {

     push  ebp

     mov   ebp, esp

     sub   esp, iBytes



     mov   eax, [ebp + MAGIC_STACKFRAME_SIZE + 4]

     mov   [buf], eax

     mov   eax, [ebp + MAGIC_STACKFRAME_SIZE + 8]

     mov   [len], eax

     }



some code here...



_asm

     {

     mov     esp, ebp

     pop     ebp

     ret

     }

};
Re: problem z asm w c++
#264
Author: Bogdan (bogdro)
Date: Sat, 20 May 2006 14:13
35 lines
1816 bytes
lemkat napisał(a):
> Mam funkcje ktora jest wywolywana przez aplikacje ktore wywoluja send(),
> ( inject dll to another process ) niestety problem polega na tym iz
> aplikacje te wykonuja nieprawidlowa operacje i zostaja zamkniete, w
> miejscu iBytes powinno byc __LOCAL_SIZE ale c++ builder nie rozpoznaje
> __LOCAL_SIZE, jakies sugestie co jest nie tak i co moge zmienic aby
> dzialalo
> 
> void custom_sendto(void)
> 
> {
> 
> // send params
> 
> BYTE *buf;
> 
> int len;
> 
> int iBytes;
> 
> 
> 
> iBytes = sizeof( iBytes ) + sizeof( buf ) + sizeof( len );

 iBytes = 4 + 4 + 4;

>     sub   esp, iBytes

 sub esp, 12

-- 
Pozdrawiam, Bogdan                                  (Linux i FreeDOS)
Kurs assemblera x86 (DOS i Linuks): http://rudy.mif.pg.gda.pl/~bogdro
Grupy dyskusyjne o asm:  pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
Prawdziwy, bezpieczny komunikator:                   www.JabberPL.org
Re: problem z asm w c++
#265
Author: lemkat
Date: Sat, 20 May 2006 15:05
37 lines
1746 bytes
thx, pomoglo ;)

Bogdan (bogdro) napisał(a):
> lemkat napisał(a):
> 
>>Mam funkcje ktora jest wywolywana przez aplikacje ktore wywoluja send(),
>>( inject dll to another process ) niestety problem polega na tym iz
>>aplikacje te wykonuja nieprawidlowa operacje i zostaja zamkniete, w
>>miejscu iBytes powinno byc __LOCAL_SIZE ale c++ builder nie rozpoznaje
>>__LOCAL_SIZE, jakies sugestie co jest nie tak i co moge zmienic aby
>>dzialalo
>>
>>void custom_sendto(void)
>>
>>{
>>
>>// send params
>>
>>BYTE *buf;
>>
>>int len;
>>
>>int iBytes;
>>
>>
>>
>>iBytes = sizeof( iBytes ) + sizeof( buf ) + sizeof( len );
> 
> 
>  iBytes = 4 + 4 + 4;
> 
> 
>>    sub   esp, iBytes
> 
> 
>  sub esp, 12
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads