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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xcc
mov ebx, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
call sym.allegro_5.0.10_monolith_mt.dll_al_get_new_display_adapter
lea edx, [esp + 0x40]
mov dword [esp + 4], edx
test eax, eax
js 0x64662a3c
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_al_get_monitor_info
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x44]
mov eax, dword [ebx + 0x88]
test ah, 2
je 0x646627f0
sub ecx, edx
cmp ecx, dword [esp + 0x24]
je 0x646627e8
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x180], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x184], eax
mov al, 1
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
ret
sub edi, esi
cmp edi, dword [esp + 0x28]
jne 0x646627c4
mov byte [ebx + 0x17e], 0
test al, 2
je 0x64662950
call sym.allegro_5.0.10_monolith_mt.dll_al_get_target_bitmap
test eax, eax
je 0x64662a8c
mov edx, dword [eax]
test edx, edx
je 0x64662a8c
mov al, byte [eax + 0xd0]
mov byte [esp + 0x2f], al
mov dword [esp + 4], 4
lea esi, [esp + 0x50]
mov dword [esp], esi
call sym.allegro_5.0.10_monolith_mt.dll__al_vector_init
mov eax, dword [ebx + 0x134]
test eax, eax
je 0x64662873
xor ebp, ebp
lea eax, [ebx + 0x12c]
mov dword [esp + 0x20], eax
nop
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll__al_vector_ref
mov edi, eax
mov dword [esp], esi
call sym.allegro_5.0.10_monolith_mt.dll__al_vector_alloc_back
mov edx, dword [edi]
mov dword [eax], edx
inc ebp
cmp dword [ebx + 0x134], ebp
ja 0x6466284c
mov byte [0x648739e8], 1
mov eax, ebx
call fcn.64660b94
mov byte [0x648739e8], 0
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x8c], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x90], eax
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
lea eax, [esp + 0x38]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_al_get_new_window_position
mov eax, dword [esp + 0x38]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x80], eax
mov dword [esp + 0x70], ebx
mov byte [esp + 0x74], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateEventA
sub esp, 0x10
mov dword [esp + 0x78], eax
lea eax, [esp + 0x70]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x64660ed0
call fcn.647d4404
mov dword [esp + 4], 0x2710
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
mov eax, dword [esp + 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push ebp
mov al, byte [esp + 0x74]
test al, al
je 0x64662a44
xor eax, eax
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x84], 0x3c
lea eax, [esp + 0x84]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x16c]
mov dword [esp], eax
call fcn.64762828
sub esp, 8
mov eax, dword [esp + 0xac]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov eax, dword [esp + 0xa8]
mov dword [esp + 4], eax
lea eax, [esp + 0x60]
mov dword [esp], eax
call fcn.64762858
sub esp, 0x10
mov dword [esp + 0x18], 6
mov eax, dword [esp + 0x6c]
sub eax, dword [esp + 0x64]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x60]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x16c]
mov dword [esp], eax
call fcn.64762860
sub esp, 0x1c
test eax, eax
je 0x646627da
mov eax, dword [esp + 0x24]
mov dword [ebx + 0x8c], eax
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x90], eax
test byte [ebx + 0x89], 2
jne 0x646627d8
jmp 0x646627c4
xor eax, eax
jmp 0x64662799
mov eax, ebx
call fcn.64661500
test al, al
je 0x64662943
cmp byte [esp + 0x2f], 0
je 0x64662a7f
jmp 0x64662a96
mov dword [esp], esi
call sym.allegro_5.0.10_monolith_mt.dll__al_vector_ref_back
mov eax, dword [eax]
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll__al_convert_to_display_bitmap
mov eax, dword [esp + 0x58]
dec eax
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.allegro_5.0.10_monolith_mt.dll__al_vector_delete_at
mov edi, dword [esp + 0x58]
test edi, edi
jne 0x64662a5c
jmp 0x646627d8
mov byte [esp + 0x2f], 0
jmp 0x64662820
mov dword [esp], ebx
call sym.allegro_5.0.10_monolith_mt.dll_al_get_backbuffer
mov dword [esp], eax
call sym.allegro_5.0.10_monolith_mt.dll_al_set_target_bitmap
jmp 0x64662a7f