extern "C" __declspec( naked )
void __stdcall pglDrawPixels( GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid *pixels )
{
__asm
{
MOV EDX,DWORD PTR FS:[0x18]
MOV ECX, DWORD PTR DS:[DGL]
CMP DWORD PTR DS:[ECX+0xA102C],0x40
JNB jmp1
MOV EAX,EDX
ADD EDX,DWORD PTR DS:[ECX+0xA100C]
MOV EDX,DWORD PTR DS:[EDX]
JMP DWORD PTR DS:[EDX+0x404]
jmp1: PUSH DWORD PTR DS:[ECX+0xA102C]
CALL DWORD PTR DS:[TlsGetValue]
XCHG EAX,EDX
JMP DWORD PTR DS:[EDX+0x404]
}
}