First of all... I am a total noob with assembly. I understand almost nothing. But this code which you are gonna see below works fine in Visual Studio. I just need to compile this to .o file using a simple g++ command.
g++ -o fileName.o filename.cpp
I need to translate assembly code written inside brackets {} to assembly written inside parentheses (). When I am trying to compile below code it crashes. Compiler suggest to use ( instead of {
unsigned char decode5a[0x0dac];
unsigned char* srcbuf = new unsigned char[4000];
m_image = new unsigned char[4000];
unsigned char* dstbuf = m_image;
__asm
{
     lea eax, decode5a
     push srcbuf
     push dstbuf
     call eax
     add esp, 8
}
I tried something like that but it crash also. I think I am passing variable incorrectly.
__asm__(
     "lea eax, decode5a \n
     push srcbuf \n
     push dstbuf \n
     call eax \n
     add esp, 8 \n
");
 
     
    