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

Disassembly:
sub esp, 0x13c
xor edx, edx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14c]
cmp esi, edx
push edi
mov ebp, ecx
je 0x4c83c7
mov eax, dword [esp + 0x154]
cmp eax, edx
je 0x4c83c7
mov cl, byte [esp + 0x158]
mov dword [ebp + 0x340], esi
mov byte [ebp + 0x35c], cl
mov dword [ebp + 0x348], edx
mov dword [ebp + 0x344], eax
mov ecx, dword [0x5c989c]
cmp ecx, 4
jne 0x4c8079
pop edi
mov byte [ebp + 4], 1
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x13c
ret 0xc
mov ecx, dword [esi + 0x764]
dec eax
cmp eax, edx
mov ebx, dword [ecx + 0x48]
mov dword [esp + 0x14], ebx
jl 0x4c80a2
cmp eax, dword [ebx + 0x1204]
jge 0x4c80a2
lea ecx, [eax + eax*8]
shl ecx, 4
mov ecx, dword [ecx + ebx + 0x8c]
jmp 0x4c80a4
xor ecx, ecx
cmp eax, edx
mov dword [ebp + 0x974], ecx
mov dword [ebp + 0x360], 0x3f800000
jl 0x4c80dd
cmp eax, dword [ebx + 0x1204]
jge 0x4c80dd
lea eax, [eax + eax*8]
shl eax, 4
mov eax, dword [eax + ebx + 0x8c]
cmp eax, 0x28
mov dword [esp + 0x20], eax
jle 0x4c80e3
mov eax, 0x400
jmp 0x4c80f2
mov dword [esp + 0x20], edx
jmp 0x4c80ed
cmp eax, 0x14
mov eax, 0x200
jg 0x4c80f2
mov eax, 0x100
add esi, 0x690
mov ecx, 0x35
lea edi, [esp + 0x78]
mov dword [ebp + 0x358], eax
mov dword [ebp + 0x354], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0xd0]
cmp ecx, eax
mov dword [esp + 0x18], ecx
jle 0x4c8168
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
mov dword [ebp + 0x358], eax
mov dword [ebp + 0x354], eax
fidiv dword [esp + 0x18]
fstp dword [ebp + 0x360]
fild dword [esp + 0x20]
fmul dword [ebp + 0x360]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esp + 0x154]
push eax
push ecx
mov ecx, ebx
call fcn.004ad810
mov dword [esp + 0x154], eax
mov edx, dword [esp + 0x154]
mov ebx, dword [ebx + 0x1208]
lea eax, [edx - 1]
test eax, eax
jl 0x4c8198
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx + 0x1204]
jge 0x4c8198
lea eax, [eax + eax*8]
shl eax, 4
mov ecx, dword [eax + ecx + 4]
mov dword [esp + 0x14], ecx
jmp 0x4c81a0
mov dword [esp + 0x14], 0
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push ebx
call esi
mov edx, dword [ebp + 0x354]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x358]
push 1
push 0x1a
push eax
mov eax, dword [esp + 0x15c]
push edx
lea ecx, [ebp + 0xc]
push eax
call fcn.004e7b20
test al, al
jne 0x4c81e2
push str.A3DFont::Init_failed_to_create_new_texture.
jmp 0x4c83b1
mov edx, dword [ebp + 0x354]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x4c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x358]
push 0
lea ecx, [esp + 0x30]
mov dword [esp + 0x54], edx
push 0
push ecx
lea edx, [esp + 0x58]
push 0
neg eax
push edx
push ebx
mov dword [esp + 0x64], 0x28
mov dword [esp + 0x6c], eax
mov word [esp + 0x70], 1
mov dword [esp + 0x74], 0
mov word [esp + 0x72], 0x20
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push ebx
mov dword [esp + 0x40], eax
call esi
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x354]
push 0xffffff
push ebx
lea eax, [eax*4 + 3]
and al, 0xfc
mov dword [esp + 0x44], eax
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0
push ebx
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0
push ebx
call dword [sym.imp.GDI32.dll_SetTextAlign]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x40], eax
push ecx
push eax
call esi
xor esi, esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
mov byte [esp + 0x1f], 0
mov byte [esp + 0x13], 0x20
lea edi, [ebp + 0x368]
mov dl, byte [esp + 0x13]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x22]
push 1
push ecx
push ebx
mov byte [esp + 0x2e], dl
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 0x354]
lea eax, [edx + esi + 2]
cmp eax, ecx
jle 0x4c82ec
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
xor esi, esi
lea eax, [edx + ecx + 1]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x22]
push 1
push ecx
push 0
push 2
push edx
push esi
push ebx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
fild dword [esp + 0x18]
mov edx, dword [esp + 0x14]
add edi, 0x10
fidiv dword [ebp + 0x354]
fstp dword [edi - 0x14]
fild dword [esp + 0x14]
fidiv dword [ebp + 0x358]
fstp dword [edi - 0x10]
mov eax, dword [esp + 0x24]
add eax, esi
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fidiv dword [ebp + 0x354]
fstp dword [edi - 0xc]
mov ecx, dword [esp + 0x28]
add ecx, edx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fidiv dword [ebp + 0x358]
fstp dword [edi - 8]
mov eax, dword [esp + 0x24]
lea esi, [esi + eax + 2]
mov al, byte [esp + 0x13]
inc al
mov dword [esp + 0x18], esi
cmp al, 0x7f
mov byte [esp + 0x13], al
jl 0x4c82a9
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x40]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edi, dword [esp + 0x2c]
push 0
lea edx, [esp + 0x48]
push 0
lea eax, [esp + 0x28]
push edx
push eax
push 0
lea ecx, [ebp + 0xc]
call fcn.004e7bf0
test al, al
jne 0x4c83d6
push str.A3DFont::Init_failed_to_lock_texture.
mov ecx, dword [0x5e062c]
push ecx
call fcn.004c6d70
add esp, 8
mov ecx, ebp
call fcn.004c8850
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x13c
ret 0xc
mov eax, dword [ebp + 0x358]
mov dword [esp + 0x14], 0
test eax, eax
jle 0x4c8451
mov eax, dword [ebp + 0x354]
mov ecx, dword [esp + 0x20]
xor edx, edx
mov esi, edi
test eax, eax
jle 0x4c842a
mov eax, dword [esi]
shr eax, 4
and al, 0xf
jbe 0x4c8414
movzx ax, al
shl eax, 0xc
or eax, 0xfff
mov word [ecx], ax
jmp 0x4c8419
mov word [ecx], 0
mov eax, dword [ebp + 0x354]
inc edx
add ecx, 2
add esi, 4
cmp edx, eax
jl 0x4c83fa
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x3c]
add eax, ecx
mov ecx, dword [ebp + 0x358]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
add edi, esi
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x4c83e8
lea ecx, [ebp + 0xc]
call fcn.004e7c70
test al, al
jne 0x4c846e
mov edx, dword [0x5e062c]
push str.A3DFont::Init_failed_to_unlock_texture.
push edx
jmp 0x4c83b8
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x30]
push ecx
push ebx
call esi
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, ebp
call fcn.004c85a0
pop edi
pop esi
test al, al
pop ebp
pop ebx
setne al
add esp, 0x13c
ret 0xc