Function at 0x4f7ae0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0047aee0
mov eax, dword [ebp + 8]
add esp, 8
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
call fcn.0047af20
push 0
push 0
push 0
mov dword [ebp - 8], eax
mov dword [ebp - 0x1c], esi
push 0
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push 0x4f8560
call fcn.005fcf3c
add esp, 0xc
push 0x2710
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x18], 0
je 0x4f7b91
push str.create_display_internals
push 0x39f
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6aa9f8]
call fcn.0048b2f0
add esp, 0x14
test al, al
je 0x4f7c54
push str.Failed_to_create_display._n
call fcn.0048b4d0
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x158]
mov byte [eax + 0x38], 0
push dword [esi + 0x260]
push esi
call fcn.004f9560
add esp, 8
test al, al
je 0x4f7c4b
push edi
push 0
push 0x21
call fcn.0048acf0
push 0
push 0x22
mov edi, eax
call fcn.0048acf0
mov ecx, dword [esi + 0x88]
add esp, 0x10
test cl, cl
js 0x4f7be6
test edi, edi
jne 0x4f7bf0
push dword [esi + 0x260]
call dword [sym.imp.OPENGL32.dll_wglCreateContext]
jmp 0x4f7c0a
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 + 0x260]
call fcn.004f8e50
add esp, 0x10
mov dword [esi + 0x264], eax
pop edi
test eax, eax
jne 0x4f7c5b
push str.create_display_internals
push 0x3bb
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6aa9f8]
call fcn.0048b2f0
add esp, 0x14
test al, al
je 0x4f7c4b
call fcn.004a3560
push eax
push str.Unable_to_create_a_render_context___s_n
call fcn.0048b4d0
add esp, 8
push esi
call fcn.004f8260
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push eax
push dword [esi + 0x260]
call dword [sym.imp.OPENGL32.dll_wglMakeCurrent]
test eax, eax
jne 0x4f7c9c
push str.create_display_internals
push 0x3c2
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 3
push dword [0x6aa9f8]
call fcn.0048b2f0
add esp, 0x14
test al, al
je 0x4f7c4b
call fcn.004a3560
push eax
push str.Unable_to_make_the_context_current___s_n
jmp 0x4f7c43
push esi
call fcn.004dd940
mov eax, dword [esi + 0x158]
push dword [eax + 4]
call fcn.004dff60
mov eax, dword [esi + 0x158]
add esp, 8
cmp dword [eax + 8], 0x1020000
jae 0x4f7d21
call fcn.0047ac60
mov eax, dword [eax]
and eax, 0x1000000
or eax, 0
je 0x4f7d17
push str.create_display_internals
push 0x3cd
push str.C:dev_allegro_winpkguniversal_allegro_srcwinwgl_disp.c
push 2
push dword [0x6aa9f8]
call fcn.0048b2f0
add esp, 0x14
test al, al
je 0x4f7c4b
push str.Allegro_requires_at_least_OpenGL_version_1.2_to_work._n
call fcn.0048b4d0
add esp, 4
push esi
call fcn.004f8260
add esp, 4
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x118], 0
mov eax, dword [esi + 0x158]
mov ecx, dword [eax + 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 ecx, dword [0x6b02dc]
test ecx, ecx
je 0x4f7d65
mov eax, dword [esi + 0x120]
cmp eax, 1
jne 0x4f7d5c
push eax
jmp 0x4f7d63
cmp eax, 2
jne 0x4f7d65
push 0
call ecx
push esi
mov dword [esi + 0x234], 0
mov byte [esi + 0x238], 0
mov byte [esi + 0x242], 0
call fcn.004efb40
add esp, 4
cmp dword [esi + 0x118], 0
je 0x4f7d98
push esi
call fcn.00505d10
add esp, 4
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret