Function at 0x4017c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov eax, dword [esp + 0xc4]
mov ebx, dword [esp + 0xc0]
mov ecx, dword [esp + 0xc8]
mov edi, dword [esp + 0xcc]
cmp eax, 1
je 0x401850
cmp eax, 2
jne 0x401820
mov dword [esp], 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
mov dword [0x40c074], eax
xor eax, eax
sub esp, 4
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xc8], ecx
mov dword [esp + 0xc4], eax
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
jmp dword [sym.imp.USER32.dll_DefWindowProcA]
mov dword [esp], ebx
lea eax, [esp + 0x70]
mov dword [esp + 4], eax
call dword [sym.imp.USER32.dll_GetWindowRect]
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 8
mov edx, dword [esp + 0x70]
fmul st(1)
fxch st(1)
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
sub eax, edx
mov edx, dword [esp + 0x7c]
fstp xword [esp + 0x40]
mov dword [esp + 0x3c], eax
fstp qword [esp]
sub edx, ecx
mov dword [esp + 0x5c], edx
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d810]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
mov esi, dword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x4c]
mov eax, 0x50000002
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 0xc], eax
mov eax, str.GL_Vendor:
mov dword [esp + 8], eax
mov eax, str.STATIC
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x14], esi
mov esi, dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d830]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d840]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x2c], edx
mov eax, dword [edi + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov ebp, 0x50820800
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [0x40c068]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, str.EDIT
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d810]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40d7e8]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov edx, str.STATIC
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x40]
mov eax, 0x50000002
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 0xc], eax
mov eax, str.GL_Renderer:
mov dword [esp + 4], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 8], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d830]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [esp + 0x40]
fld xword [0x40d850]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d840]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, 0x50820800
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [0x40c064]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp], 0
mov dword [esp + 8], eax
mov eax, str.EDIT
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d810]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40d7ec]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov edx, 0x50000002
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov ebp, str.STATIC
mov dword [esp + 0x18], ecx
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x40]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], ecx
mov ecx, str.GL_Version:
mov dword [esp + 8], ecx
mov dword [esp + 4], ebp
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d830]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [esp + 0x40]
fld xword [0x40d860]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d840]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, 0x50820800
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [0x40c060]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp], 0
mov dword [esp + 8], eax
mov eax, str.EDIT
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d810]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [0x40d810]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
xor edx, edx
mov eax, dword [edi + 4]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov ebp, str.GLSL_version:
mov dword [esp + 0x28], eax
mov eax, str.STATIC
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x40]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 8], ebp
mov dword [esp + 0x14], ecx
mov ecx, 0x50000002
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d830]
mov ebp, dword [esp + 0x4c]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [0x40d810]
fld xword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d840]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
sub eax, ecx
mov dword [esp + 0x18], eax
mov eax, 0x50820800
mov ecx, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [0x40c05c]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp], 0
mov dword [esp + 8], eax
mov eax, str.EDIT
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
call esi
mov eax, dword [0x410040]
mov edx, 0x40d05f
sub esp, 0x30
mov dword [esp + 4], edx
lea ecx, [esp + 0x80]
mov dword [esp], ecx
mov dword [esp + 8], eax
call sym._sprintf.constprop.0
fld dword [0x40c06c]
fld xword [0x40d800]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x60]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld xword [0x40d810]
fmul st(1)
fxch st(1)
fstp xword [esp + 0x50]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld dword [0x40d7f0]
fld xword [esp + 0x60]
mov ebp, dword [esp + 0x40]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x4c]
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x40]
mov eax, 0x50000002
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 0xc], eax
mov eax, str.GL_extensions:
mov dword [esp + 8], eax
mov eax, str.STATIC
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld xword [0x40d800]
sub esp, 0x30
fmul st(1)
fxch st(1)
fstp xword [esp + 0x40]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [esp + 0x40]
fld xword [0x40d870]
mov ebp, dword [esp + 0x4c]
fmulp st(1)
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [0x40d840]
fmul dword [0x40c070]
fstp qword [esp]
call sym._ceil
xor eax, eax
mov ecx, 0x64
mov dword [esp + 0x2c], eax
xor edx, edx
mov eax, dword [edi + 4]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x1c], ebp
mov ebp, 0x50000800
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov eax, str.STATIC
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x80]
mov dword [esp + 8], ecx
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp + 0x20], ebx
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov dword [esp], 0
call esi
fld dword [0x40c06c]
fld st(0)
sub esp, 0x30
fstp xword [esp + 0x40]
fmul dword [0x40d7f4]
fstp qword [esp]
call sym._ceil
fnstcw word [esp + 0x6e]
movzx eax, word [esp + 0x6e]
or ax, 0xc00
mov word [esp + 0x6c], ax
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld dword [0x40c070]
fld st(0)
mov ebp, dword [esp + 0x4c]
fstp xword [esp + 0x50]
fmul dword [0x40d7f8]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x4c]
fldcw word [esp + 0x6e]
fld xword [esp + 0x40]
fmul dword [0x40d7fc]
fstp qword [esp]
call sym._ceil
fldcw word [esp + 0x6c]
fistp dword [esp + 0x40]
fldcw word [esp + 0x6e]
fld xword [0x40d820]
fld xword [esp + 0x50]
fmulp st(1)
fstp qword [esp]
call sym._ceil
xor eax, eax
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x20], ebx
sub edx, ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x28], eax
xor eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x4c]
fldcw word [esp + 0x6c]
fistp dword [esp + 0x10]
fldcw word [esp + 0x6e]
mov dword [esp], 0
sub eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
mov eax, 0x50a008c4
mov dword [esp + 0xc], eax
mov eax, dword [0x40c058]
mov dword [esp + 8], eax
mov eax, str.EDIT
mov dword [esp + 4], eax
call esi
xor eax, eax
sub esp, 0x30
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret 0x10