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

Disassembly:
sub esp, 0x430
push ebx
push ebp
push esi
mov esi, dword [esp + 0x440]
lea eax, [esp + 0x24]
push edi
mov ebx, dword [esi + 0x30]
push eax
push 0xffffffffffffffff
mov dword [esp + 0x44], ebx
call dword [esi + 0x2c]
mov ecx, dword [sym.alleg40.dll_font]
push ecx
call sym.alleg40.dll_text_height
mov ecx, eax
mov eax, dword [esi + 0x10]
sub eax, 4
mov edi, dword [esp + 0x34]
cdq
idiv ecx
add esp, 0xc
xor ecx, ecx
cmp edi, eax
mov dword [esp + 0x34], eax
setg cl
test ecx, ecx
mov dword [esp + 0x38], ecx
je 0x10024f5f
mov edi, dword [esi + 0xc]
sub edi, 0xf
mov dword [esp + 0x10], edi
jmp 0x10024f6b
mov ecx, dword [esi + 0xc]
sub ecx, 3
mov dword [esp + 0x10], ecx
mov edi, ecx
test byte [esi + 0x20], 0x20
je 0x10024f7d
mov ecx, dword [sym.alleg40.dll_gui_mg_color]
mov dword [esp + 0x1c], ecx
jmp 0x10024f86
mov edx, dword [esi + 0x14]
mov dword [esp + 0x1c], edx
mov ecx, edx
xor ebp, ebp
test eax, eax
mov dword [esp + 0x2c], ebp
jle 0x1002514c
jmp 0x10024f9e
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 0x28]
mov edx, dword [esp + 0x28]
add eax, ebp
cmp eax, edx
jge 0x100251de
cmp eax, dword [esi + 0x24]
jne 0x10024fbd
mov edx, dword [esi + 0x18]
mov dword [esp + 0x20], edx
jmp 0x10024fe1
test ebx, ebx
je 0x10024fda
cmp byte [eax + ebx], 0
je 0x10024fda
mov ecx, dword [esi + 0x18]
mov edx, dword [sym.alleg40.dll_gui_mg_color]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], edx
jmp 0x10024fe5
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 0x18]
mov dword [esp + 0x18], ecx
push 0
push eax
call dword [esi + 0x2c]
push eax
lea edx, [esp + 0x4c]
push 0x400
push edx
call sym.alleg40.dll_ustrzcpy
mov eax, dword [sym.alleg40.dll_font]
mov ebx, dword [esi + 4]
push eax
add ebx, 2
call sym.alleg40.dll_text_height
imul eax, ebp
mov ecx, dword [esi + 8]
mov edi, dword [esp + 0x30]
push edi
lea ebp, [eax + ecx + 2]
call sym.alleg40.dll_text_mode
mov edx, dword [sym.alleg40.dll_font]
mov dword [esp + 0x40], eax
push edx
call sym.alleg40.dll_text_height
lea ecx, [eax + ebp - 1]
mov eax, dword [sym.alleg40.dll_screen]
push edi
push ecx
mov edx, dword [eax + 0x1c]
lea ecx, [ebx + 7]
push ecx
push ebp
push ebx
push eax
call dword [edx + 0x38]
lea edx, [esp + 0x78]
add ebx, 8
push edx
call sym.alleg40.dll_ustrlen
mov edi, dword [esp + 0x74]
add esp, 0x3c
neg edi
sbb edi, edi
mov dword [esp + 0x14], eax
and edi, 0xc
add edi, 0xa
mov eax, dword [esi + 0xc]
sub eax, edi
dec eax
cmp eax, 1
mov dword [esp + 0x30], eax
jg 0x10025081
mov dword [esp + 0x30], 1
mov edx, dword [sym.alleg40.dll_font]
lea ecx, [esp + 0x40]
push ecx
push edx
call sym.alleg40.dll_text_length
mov ecx, dword [esp + 0x38]
add esp, 8
cmp eax, ecx
jl 0x100250b8
mov eax, dword [esp + 0x14]
push 0
dec eax
mov dword [esp + 0x18], eax
push eax
lea eax, [esp + 0x48]
push eax
call sym.alleg40.dll_usetat
add esp, 0xc
jmp 0x1002506a
mov ecx, dword [esp + 0x20]
mov eax, dword [sym.alleg40.dll_font]
push ecx
mov ecx, dword [sym.alleg40.dll_screen]
push ebp
lea edx, [esp + 0x48]
push ebx
push edx
push eax
push ecx
call sym.alleg40.dll_textout
mov edx, dword [esp + 0x3c]
push edx
call sym.alleg40.dll_text_mode
mov ecx, dword [sym.alleg40.dll_font]
lea eax, [esp + 0x5c]
push eax
push ecx
call sym.alleg40.dll_text_length
mov edx, dword [esp + 0x34]
mov ecx, dword [esi + 4]
add ebx, eax
add edx, ecx
add esp, 0x24
cmp ebx, edx
jg 0x10025133
mov eax, dword [sym.alleg40.dll_font]
push eax
call sym.alleg40.dll_text_height
mov edi, dword [esp + 0x1c]
lea ecx, [eax + ebp - 1]
mov eax, dword [sym.alleg40.dll_screen]
push edi
mov edi, dword [esi + 4]
push ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax + 0x1c]
add ecx, edi
push ecx
push ebp
push ebx
push eax
call dword [edx + 0x38]
add esp, 0x1c
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x10]
inc ebp
cmp ebp, eax
mov dword [esp + 0x2c], ebp
jl 0x10024f96
mov ebx, dword [esi + 8]
mov edx, dword [esi + 0x10]
mov ecx, dword [sym.alleg40.dll_font]
lea eax, [edx + ebx - 3]
push ecx
mov dword [esp + 0x18], eax
call sym.alleg40.dll_text_height
imul eax, ebp
add esp, 4
lea edx, [eax + ebx + 2]
mov eax, dword [esp + 0x14]
cmp edx, eax
jg 0x100251b3
mov eax, dword [esi + 4]
mov ebx, dword [esi + 0x18]
add edi, eax
mov eax, dword [sym.alleg40.dll_font]
push eax
call sym.alleg40.dll_text_height
imul eax, ebp
mov ecx, dword [esi + 8]
push ebx
mov ebx, dword [esp + 0x1c]
lea ecx, [eax + ecx + 2]
mov eax, dword [sym.alleg40.dll_screen]
push ebx
push edi
mov edx, dword [eax + 0x1c]
push ecx
mov ecx, dword [esi + 4]
add ecx, 2
push ecx
push eax
call dword [edx + 0x38]
add esp, 0x1c
mov edx, dword [esi + 0x18]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
push edx
mov edx, dword [esi + 0x28]
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push eax
push esi
call sym.alleg40.dll__draw_scrollable_frame
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x430
ret
mov edx, dword [sym.alleg40.dll_font]
mov ebx, dword [esi + 0x18]
push edx
call sym.alleg40.dll_text_height
lea ecx, [ebp + 1]
mov edx, dword [esi + 8]
imul eax, ecx
mov ecx, dword [sym.alleg40.dll_font]
lea eax, [eax + edx + 1]
push ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 4]
add edi, eax
call sym.alleg40.dll_text_height
imul eax, ebp
mov edx, dword [esi + 8]
push ebx
mov ebx, dword [esp + 0x30]
lea ecx, [eax + edx + 2]
mov eax, dword [sym.alleg40.dll_screen]
push ebx
push edi
mov edx, dword [eax + 0x1c]
push ecx
mov ecx, dword [esi + 4]
add ecx, 2
push ecx
push eax
call dword [edx + 0x38]
add esp, 0x20
jmp 0x10025137