Well. I've got it logging to the console, but it's printing out stupid stuff like 8? and odd symbols. I'm positive there's a better way to do this, but I am a little shaky with C++. I think it's due to my casting directly to a char* instead of _ultoa(). I couldn't get the params right for that though...
Code:
void__declspec(naked) myEncryptPacket(DWORD packet)
{
__asm pushad;
__asm {
mov eax, [packet];
mov opcode, eax;
}
text = reinterpret_cast<char*>(opcode);
consoleOut(text, 1);
__asm popad;
__asm jmp encryptPacket;
}
text and opcode are global variables. char* and DWORD* respectively.
BTW: Cypher, I switched to a typedef'd call to consoleprint and it works like a charm <3