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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x23c
movzx esi, byte [esp + 0x254]
movzx ecx, byte [esp + 0x258]
mov eax, esi
test al, al
jne 0x49f120
mov eax, dword [esp + 0x250]
mov ebx, dword [eax + 0x14]
mov eax, dword [0x5219b8]
mov word [0xa3f8e0], 0x28
mov word [0xa3f8e2], 1
mov edx, eax
and edx, 2
cmp edx, 1
sbb edx, edx
add edx, 0x25
mov edi, edx
or edi, 2
test ah, 1
cmovne edx, edi
test al, 1
mov dword [0xa3f8e4], edx
jne 0x49ef20
mov edx, eax
and edx, 8
mov byte [0xa3f8e8], 0
mov byte [0xa3f8ea], 8
mov byte [0xa3f8ec], 8
mov byte [0xa3f8ee], 8
mov byte [0xa3f8f0], dl
mov edx, eax
shr edx, 2
and edx, 1
test ah, 0x80
mov byte [0xa3f8f2], dl
mov edx, 4
mov byte [0xa3f8e9], 0x18
mov byte [0xa3f8eb], 0
mov byte [0xa3f8ed], 0
mov byte [0xa3f8ef], 0
mov byte [0xa3f8f1], 0
mov byte [0xa3f8f3], 0
mov byte [0xa3f8f4], 0
mov byte [0xa3f8f5], 0
mov byte [0xa3f8f6], 0
mov byte [0xa3f8f7], 0x18
mov byte [0xa3f8f8], 8
je 0x49ef48
mov byte [0xa3f8f9], dl
mov byte [0xa3f8fa], cl
mov byte [0xa3f8fb], 0
mov dword [0xa3f8fc], 0
mov dword [0xa3f900], 0
mov dword [0xa3f904], 0
mov dword [esp + 4], 0xc
mov dword [esp], ebx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
sub esp, 8
mov byte [0xa3f8e9], al
mov dword [esp + 4], 0xa3f8e0
mov dword [esp], ebx
call dword [sym.imp.GDI32.dll_ChoosePixelFormat]
sub esp, 8
mov ebp, eax
test dword [0x5219b8], 0x1080
jne 0x49ef80
test ebp, ebp
je 0x49ef07
mov edx, esi
mov edi, 1
test dl, dl
je 0x49f158
mov dword [esp], ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, edi
sub esp, 4
add esp, 0x23c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, esi
xor edi, edi
test dl, dl
jne 0x49eeee
add esp, 0x23c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [0xa3f8e8], 1
mov byte [0xa3f8ea], 0
mov byte [0xa3f8ec], 0
mov byte [0xa3f8ee], 0
mov byte [0xa3f8f0], 0
jmp 0x49ee02
test ah, 0x40
mov edx, 3
jne 0x49ee6b
test ah, 0x20
mov edx, 2
jne 0x49ee6b
xor edx, edx
test ah, 0x10
je 0x49ee6b
movzx edx, byte [0x521a30]
jmp 0x49ee6b
call dword [sym.imp.OPENGL32.DLL_wglGetCurrentContext]
mov dword [esp + 0x4c], eax
call dword [sym.imp.OPENGL32.DLL_wglGetCurrentDC]
lea edx, [esp + 0x78]
mov ecx, 0xa
mov edi, edx
mov dword [esp + 0x50], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.USER32.dll_DefWindowProcA]
mov dword [esp], edx
mov dword [esp + 0x78], 0x23
mov dword [esp + 0x9c], str.FREEGLUT_dummy
mov dword [esp + 0x7c], eax
mov eax, dword [0xa3f820]
mov dword [esp + 0x88], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
mov edi, dword [0xa3f820]
sub esp, 4
call fcn.0043d8f1
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
imul eax, eax, 0xcf0000
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
or eax, 0x6cb0000
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x551251
mov dword [esp + 4], str.FREEGLUT_dummy
mov dword [esp], 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
sub esp, 0x30
mov dword [esp + 0x44], eax
mov dword [esp], eax
call dword [sym.imp.USER32.dll_GetDC]
sub esp, 4
mov edi, eax
mov dword [esp + 8], 0xa3f8e0
mov dword [esp + 4], ebp
mov dword [esp], eax
call dword [sym.imp.GDI32.dll_SetPixelFormat]
sub esp, 0xc
mov dword [esp], edi
call dword [sym.imp.OPENGL32.DLL_wglCreateContext]
mov edx, dword [sym.imp.OPENGL32.DLL_wglMakeCurrent]
sub esp, 4
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], eax
mov dword [esp + 4], eax
mov dword [esp], edi
call edx
mov edx, str.WGL_ARB_multisample
mov eax, edi
sub esp, 8
call fcn.0049e730
test eax, eax
jne 0x49f184
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call dword [esp + 0x40]
sub esp, 8
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call dword [sym.imp.OPENGL32.DLL_wglDeleteContext]
sub esp, 4
mov eax, dword [esp + 0x44]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
sub esp, 8
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call dword [sym.imp.USER32.dll_DestroyWindow]
mov eax, dword [0xa3f820]
sub esp, 4
mov dword [esp + 4], eax
mov dword [esp], str.FREEGLUT_dummy
call dword [sym.imp.USER32.dll_UnregisterClassA]
sub esp, 8
jmp 0x49eedb
mov byte [esp + 0x3c], cl
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.DISPLAY
call dword [sym.imp.GDI32.dll_CreateDCA]
sub esp, 0x10
mov ebx, eax
movzx ecx, byte [esp + 0x3c]
jmp 0x49ed9e
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 8], 0xa3f8e0
call dword [sym.imp.GDI32.dll_SetPixelFormat]
sub esp, 0xc
test eax, eax
setne al
add esp, 0x23c
mov edi, eax
pop ebx
mov eax, edi
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.wglChoosePixelFormatARB
call dword [sym.imp.OPENGL32.DLL_wglGetProcAddress]
sub esp, 4
test eax, eax
mov ecx, eax
je 0x49f0b1
movzx eax, byte [0xa3f8e9]
mov edx, dword [0x5219b8]
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0xbc], eax
movzx eax, byte [0xa3f8f0]
mov dword [esp + 0xa0], 0x2001
mov dword [esp + 0xa4], 1
mov dword [esp + 0xa8], 0x2010
mov dword [esp + 0xc4], eax
movzx eax, byte [0xa3f8f7]
mov dword [esp + 0xac], 1
mov dword [esp + 0xb0], 0x2003
mov dword [esp + 0xb4], 0x2027
mov dword [esp + 0xcc], eax
movzx eax, byte [0xa3f8f8]
mov dword [esp + 0xb8], 0x2014
mov dword [esp + 0xc0], 0x201b
mov dword [esp + 0xc8], 0x2022
mov dword [esp + 0xd4], eax
mov eax, edx
shr eax, 1
and eax, 1
and dh, 0x10
mov dword [esp + 0xd0], 0x2023
mov dword [esp + 0xd8], 0x2011
mov dword [esp + 0xdc], eax
je 0x49f350
mov dword [esp + 0xe0], 0x20a9
mov edx, 0x4c
mov dword [esp + 0xe4], 1
mov dword [esp + 0x5c], 0x58
mov dword [esp + 0x58], 0x54
mov dword [esp + 0x38], 0x50
mov dword [esp + 0x54], 0x48
mov eax, dword [esp + 0x54]
mov dword [esp + eax + 0xa0], 0x2041
mov eax, dword [0x521a34]
mov dword [esp + edx + 0xa0], 1
mov edx, dword [esp + 0x38]
mov dword [esp + edx + 0xa0], 0x2042
mov edx, dword [esp + 0x58]
mov dword [esp + edx + 0xa0], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + eax + 0xa0], 0
lea eax, [esp + 0x6c]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x70]
mov dword [esp + 8], eax
lea eax, [esp + 0xa0]
mov dword [esp + 0xc], 1
mov dword [esp + 4], eax
mov dword [esp], edi
call ecx
sub esp, 0x18
test eax, eax
je 0x49f0b1
mov eax, dword [esp + 0x6c]
test eax, eax
cmovne ebp, dword [esp + 0x68]
jmp 0x49f0b1
mov dword [esp + 0x5c], 0x50
mov edx, 0x44
mov dword [esp + 0x58], 0x4c
mov dword [esp + 0x38], 0x48
mov dword [esp + 0x54], 0x40
jmp 0x49f2b7