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

Disassembly:
sub esp, 0x28
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x14]
mov ecx, edi
call fcn.00530260
mov ebp, eax
mov eax, dword [esp + 0x38]
push eax
mov ecx, esi
call fcn.00581960
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ax, word [esp + 0x3a]
movzx ecx, ax
mov dword [esp + 0xc], ecx
cmp ax, 8
jne 0x581f52
mov dword [esp + 0xc], 0x20
lea edx, [esp + 0x20]
push edx
push 1
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
test eax, eax
je 0x58220f
movzx eax, word [esp + 0xc]
lea ecx, [esp + 0x28]
push ecx
push eax
push eax
push ebp
call dword [sym.imp.GDI32.dll_GetCharABCWidthsFloatW]
test eax, eax
je 0x58220f
fld dword [esp + 0x2c]
call fcn.00613e80
fldz
fld dword [esp + 0x28]
mov ecx, eax
fcom st(1)
mov dword [esp + 0x20], ecx
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x581fd7
sub esp, 8
fstp qword [esp]
call fcn.006172f0
fstp dword [esp + 0x18]
add esp, 8
fld dword [esp + 0x10]
fstp dword [esp + 0x10]
fild dword [esp + 0x20]
fadd dword [esp + 0x10]
call fcn.00613e80
mov ecx, eax
mov dword [esp + 0x20], ecx
jmp 0x581fd9
fstp st(0)
fldz
fld dword [esp + 0x30]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
jne 0x582017
sub esp, 8
fstp qword [esp]
call fcn.006172f0
fstp dword [esp + 0x18]
add esp, 8
fld dword [esp + 0x10]
fstp dword [esp + 0x10]
fild dword [esp + 0x20]
fadd dword [esp + 0x10]
call fcn.00613e80
fld dword [esp + 0x30]
mov ecx, eax
fld dword [esp + 0x28]
push ebx
fadd dword [esp + 0x30]
inc ecx
sub esp, 8
mov dword [esp + 0x2c], ecx
faddp st(1)
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fstp qword [esp]
call fcn.006172f0
fstp dword [esp + 0x1c]
add esp, 8
fld dword [esp + 0x14]
call fcn.00613e80
mov ecx, edi
mov dword [esp + 0x20], eax
call fcn.005833f0
mov ebx, eax
mov ecx, edi
mov dword [esp + 0x18], ebx
call fcn.00542a70
mov edx, dword [esi + 0xb8]
add edx, dword [esp + 0x24]
dec ebx
cmp edx, ebx
mov dword [esp + 0x1c], eax
jl 0x5820c7
mov ecx, dword [esi + 0xc0]
inc ecx
add dword [esi + 0xbc], ecx
mov edx, dword [esi + 0xbc]
add edx, dword [esp + 0x28]
xor ebx, ebx
dec eax
cmp edx, eax
mov dword [esi + 0xc0], ebx
mov dword [esi + 0xb8], ebx
jl 0x5820c7
mov ecx, esi
call fcn.00581670
test al, al
je 0x5820b5
mov ecx, esi
call fcn.00581e50
test al, al
jne 0x5820c1
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x28
ret 4
mov dword [esi + 0xbc], ebx
mov ecx, dword [esi + 0xbc]
mov edx, dword [esi + 0xb8]
push 1
lea eax, [esp + 0x14]
push eax
push ecx
push edx
push ebp
call dword [sym.imp.GDI32.dll_TextOutW]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
mov ecx, edi
call fcn.005833f0
mov ecx, edi
mov dword [esp + 0x14], eax
call fcn.005833e0
mov ecx, dword [esi + 0xbc]
mov edx, dword [esp + 0x14]
imul ecx, edx
add ecx, dword [esi + 0xb8]
lea ecx, [eax + ecx*4]
test ebp, ebp
jle 0x582143
add edx, edx
add edx, edx
jmp 0x582120
xor eax, eax
test ebx, ebx
jle 0x58213c
movzx edi, byte [ecx + eax*4]
neg edi
sbb edi, edi
and edi, 0xffff
mov dword [ecx + eax*4], edi
inc eax
cmp eax, ebx
jl 0x582126
add ecx, edx
sub ebp, 1
jne 0x582120
fild dword [esp + 0x18]
lea edx, [esp + 0x3c]
fld1
push edx
fld st(0)
lea ecx, [esi + 0x78]
fdivrp st(2)
fxch st(1)
fstp dword [esp + 0x1c]
fidiv dword [esp + 0x20]
fstp dword [esp + 0x20]
call fcn.00581cc0
mov ecx, dword [esi + 0x70]
sub ecx, dword [esi + 0x6c]
sar ecx, 2
dec ecx
mov word [eax], cx
mov dx, word [esp + 0x24]
mov word [eax + 2], dx
mov cx, word [esp + 0x28]
mov word [eax + 4], cx
fild dword [esi + 0xb8]
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(1)
fstp dword [eax + 8]
fild dword [esi + 0xbc]
fld dword [esp + 0x1c]
fld st(0)
fmulp st(2)
fxch st(1)
fstp dword [eax + 0xc]
mov edx, dword [esi + 0xb8]
add edx, dword [esp + 0x24]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fmulp st(2)
fxch st(1)
fstp dword [eax + 0x10]
mov ecx, dword [esi + 0xbc]
add ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
fimul dword [esp + 0x1c]
fstp dword [eax + 0x14]
fild dword [esp + 0x20]
fstp dword [eax + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add dword [esi + 0xb8], edx
cmp dword [esi + 0xc0], ecx
jge 0x5821fe
mov dword [esi + 0xc0], ecx
pop ebx
pop edi
mov byte [esi + 0xc4], 1
pop esi
pop ebp
add esp, 0x28
ret 4
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x28
ret 4