Function at 0x46fbe0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.0042d4b0
mov eax, dword [ebp - 4]
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
call fcn.0042d4f0
mov esi, dword [ebp + 0xc]
push 0
push 0
push 0
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], esi
push 0
mov byte [ebp - 0x1c], 1
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0x470660
call fcn.0058557d
add esp, 0xc
push 0x2710
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x1c], 0
je 0x46fc91
push str.create_display_internals
push 0x393
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6390c0]
call fcn.004320f0
add esp, 0x14
test al, al
je 0x46fd5a
push str.Failed_to_create_display._n
call fcn.004322d0
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x150]
mov byte [eax + 0x38], 0
push dword [esi + 0x258]
push esi
push dword [ebp + 8]
call fcn.004715c0
add esp, 0xc
test al, al
je 0x46fd51
push edi
push 0
push 0x21
call fcn.0042b990
push 0
push 0x22
mov edi, eax
call fcn.0042b990
mov ecx, dword [esi + 0x88]
add esp, 0x10
test cl, cl
js 0x46fce9
test edi, edi
jne 0x46fcf3
push dword [esi + 0x258]
call dword [sym.imp.OPENGL32.dll_wglCreateContext]
jmp 0x46fd10
test edi, edi
mov edx, 3
cmove edi, edx
push eax
shr ecx, 8
and cl, 1
push edi
movzx eax, cl
push eax
push dword [esi + 0x258]
push dword [ebp + 8]
call fcn.00470ef0
add esp, 0x14
mov dword [esi + 0x25c], eax
pop edi
test eax, eax
jne 0x46fd61
push str.create_display_internals
push 0x3af
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6390c0]
call fcn.004320f0
add esp, 0x14
test al, al
je 0x46fd51
call fcn.00445490
push eax
push str.Unable_to_create_a_render_context___s_n
call fcn.004322d0
add esp, 8
push esi
call fcn.00470360
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push eax
push dword [esi + 0x258]
call dword [sym.imp.OPENGL32.dll_wglMakeCurrent]
test eax, eax
jne 0x46fda2
push str.create_display_internals
push 0x3b6
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6390c0]
call fcn.004320f0
add esp, 0x14
test al, al
je 0x46fd51
call fcn.00445490
push eax
push str.Unable_to_make_the_context_current___s_n
jmp 0x46fd49
push esi
call fcn.00455ab0
mov eax, dword [esi + 0x150]
push dword [eax + 4]
call fcn.004580d0
mov ecx, dword [esi + 0x150]
add esp, 8
cmp dword [ecx + 8], 0x1020000
jae 0x46fe2d
call fcn.0042d280
mov eax, dword [eax]
and eax, 0x1000000
or eax, 0
je 0x46fe1d
push str.create_display_internals
push 0x3c1
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 2
push dword [0x6390c0]
call fcn.004320f0
add esp, 0x14
test al, al
je 0x46fd51
push str.Allegro_requires_at_least_OpenGL_version_1.2_to_work._n
call fcn.004322d0
add esp, 4
push esi
call fcn.00470360
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x118], 0
mov ecx, dword [esi + 0x150]
mov ecx, dword [ecx + 8]
mov eax, ecx
sar eax, 0x18
movzx eax, al
sar ecx, 0x10
mov dword [esi + 0x13c], eax
movzx eax, cl
mov dword [esi + 0x140], eax
mov eax, dword [0x63fefc]
test eax, eax
je 0x46fe6a
mov ecx, dword [esi + 0x120]
cmp ecx, 1
jne 0x46fe61
push ecx
jmp 0x46fe68
cmp ecx, 2
jne 0x46fe6a
push 0
call eax
push esi
mov dword [esi + 0x22c], 0
mov byte [esi + 0x230], 0
mov byte [esi + 0x23a], 0
call fcn.00467c40
add esp, 4
cmp dword [esi + 0x118], 0
je 0x46fe9d
push esi
call fcn.0049b820
add esp, 4
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret