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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x510d6d
shl eax, 3
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.00570bbc
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edi, dword [esi + 0x10]
mov edx, edi
shl edx, 4
push edx
call fcn.00570bbc
add esp, 8
cmp eax, ebx
je 0x51095a
lea edx, [edi - 1]
mov ecx, eax
cmp edx, ebx
jl 0x510954
inc edx
mov dword [ecx], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 4], ebx
mov dword [ecx + 0xc], ebx
add ecx, 0x10
dec edx
jne 0x510943
mov dword [esp + 0xc], eax
jmp 0x51095e
mov dword [esp + 0xc], ebx
mov eax, dword [esi + 0x10]
lea eax, [eax + eax*2]
shl eax, 2
push eax
call fcn.00570bbc
mov edx, dword [ebp + 8]
add esp, 4
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x68]
mov eax, dword [edx + 8]
push ecx
push eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
fld qword [esi + 0x38]
fadd qword [0x5af430]
sub esp, 8
fstp qword [esp]
call fcn.0053e2af
call fcn.0053e380
fld qword [esi + 0x30]
fadd qword [0x5af430]
mov ebx, eax
fstp qword [esp]
call fcn.0053e2af
call fcn.0053e380
fld qword [esi + 0x28]
fadd qword [0x5af430]
mov dword [esp + 0x30], eax
fstp qword [esp]
call fcn.0053e2af
call fcn.0053e380
fld qword [esi + 0x20]
fadd qword [0x5af430]
mov edi, eax
fstp qword [esp]
call fcn.0053e2af
add esp, 8
call fcn.0053e380
fld qword [esi + 0xa8]
fsub qword [esi + 0x98]
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x6c]
fabs
fld qword [esi + 0xa0]
fsub qword [esi + 0x90]
sub edx, ebx
mov dword [esp + 0x14], edi
add edx, edi
mov dword [esp + 0x10], eax
fabs
fmul qword [0x5af430]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
fadd qword [esi + 0x90]
fstp qword [esp + 0x40]
fmul qword [0x5af430]
fst qword [esp + 0x50]
fadd qword [esi + 0x98]
fst qword [esp + 0x48]
fld st(0)
fsub qword [esi + 0x88]
fld qword [esp + 0x40]
fsub qword [esi + 0x80]
fpatan
fstp qword [esp + 0x60]
fld qword [esp + 0x40]
fsub qword [esi + 0x80]
fld st(1)
fsub qword [esi + 0x88]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fsqrt
fstp qword [esp + 0x58]
mov eax, dword [esi + 0xb8]
mov ecx, dword [esi + 0xbc]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x10]
fstp st(0)
xor edi, edi
mov dword [esp + 0x34], ecx
test eax, eax
fstp st(0)
jle 0x510b79
fstp st(0)
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x510abe
mov eax, 0x5b21c8
jmp 0x510ac1
lea eax, [eax + edi*2]
mov ecx, dword [esp + 0x3c]
lea edx, [edi + edi*2]
lea ebx, [ecx + edx*4]
mov dx, word [eax]
mov eax, dword [ebp + 8]
push ebx
push edx
push eax
call fcn.0050b1d0
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
add esp, 0xc
add eax, edx
test edi, edi
mov dword [esp + 0x28], eax
jne 0x510af5
mov ecx, dword [esp + 0x3c]
cmp dword [ecx], 0
jl 0x510afb
add eax, dword [ebx]
mov dword [esp + 0x28], eax
mov al, byte [esi + 0xb0]
test al, al
je 0x510b16
mov eax, dword [esp + 0xc]
mov edx, edi
fild dword [esp + 0x14]
shl edx, 4
add eax, edx
jmp 0x510b26
mov edx, dword [esp + 0xc]
mov ecx, edi
fild dword [esp + 0x1c]
shl ecx, 4
lea eax, [ecx + edx]
fstp qword [eax + 8]
fild dword [esp + 0x28]
test edi, edi
fmul qword [esp + 0x30]
jne 0x510b53
fild dword [esp + 0x10]
fld st(1)
fmul qword [0x5af430]
mov eax, dword [esp + 0xc]
fadd st(1)
fstp qword [eax]
fadd st(1)
fstp qword [esp + 0x20]
fstp st(0)
jmp 0x510b69
fld st(0)
fmul qword [0x5af430]
fadd qword [esp + 0x20]
fstp qword [eax]
fadd qword [esp + 0x20]
fstp qword [esp + 0x20]
mov eax, dword [esi + 0x10]
inc edi
cmp edi, eax
jl 0x510ab0
fld qword [esp + 0x48]
fild dword [esp + 0x18]
fsub qword [esp + 0x20]
fst qword [esp + 0x28]
call fcn.0053e380
test eax, eax
je 0x510c3c
fild dword [esp + 0x10]
fst qword [esp + 0x10]
fsubr qword [esp + 0x20]
fst qword [esp + 0x20]
fcomp qword [0x5b3130]
fnstsw ax
test ah, 0x40
jne 0x510c3c
mov eax, dword [esi + 0x10]
mov dword [esp + 0x30], 0
fld qword [0x5b3130]
fld qword [esp + 0x10]
cmp eax, 1
mov dword [esp + 0x34], 0
jbe 0x510be1
fld qword [esp + 0x28]
fdiv qword [esp + 0x20]
fstp qword [esp + 0x30]
xor edx, edx
test eax, eax
jle 0x510c38
mov ebx, dword [esp + 0xc]
mov eax, ebx
fld qword [eax]
fsub st(1)
fmul qword [esp + 0x30]
fstp qword [esp + 0x20]
fstp st(0)
fadd qword [esp + 0x20]
fld qword [eax]
fld st(1)
fadd qword [eax]
fstp qword [eax]
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x510c15
mov ecx, 0x5b21c8
jmp 0x510c18
lea ecx, [ecx + edx*2]
cmp word [ecx], 0x20
jne 0x510c27
fld qword [esi + 0x78]
fsub qword [esp + 0x20]
faddp st(2)
mov ecx, dword [esi + 0x10]
inc edx
add eax, 0x10
cmp edx, ecx
jl 0x510bed
fstp st(0)
fstp st(0)
jmp 0x510c40
fstp st(0)
fstp st(0)
mov ebx, dword [esp + 0xc]
mov al, byte [esi + 0xb0]
test al, al
je 0x510cce
mov eax, dword [esi + 0x10]
xor ecx, ecx
test eax, eax
jle 0x510cce
mov eax, ebx
mov edx, eax
inc ecx
mov edi, dword [edx]
mov dword [esp + 0x10], edi
mov edi, dword [edx + 4]
mov dword [esp + 0x14], edi
mov edi, dword [edx + 8]
fld qword [esp + 0x10]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x18], edi
fsub qword [esp + 0x40]
mov dword [esp + 0x1c], edx
mov edx, eax
fld qword [esp + 0x18]
fsub st(2)
add eax, 0x10
fstp qword [esp + 0x18]
fchs
fld qword [esp + 0x18]
fchs
fstp qword [esp + 0x18]
fadd qword [esp + 0x40]
fstp qword [esp + 0x10]
fld qword [esp + 0x18]
mov edi, dword [esp + 0x10]
fadd st(1)
mov dword [edx], edi
mov edi, dword [esp + 0x14]
mov dword [edx + 4], edi
fstp qword [esp + 0x18]
mov edi, dword [esp + 0x18]
mov dword [edx + 8], edi
mov edi, dword [esp + 0x1c]
mov dword [edx + 0xc], edi
mov edx, dword [esi + 0x10]
cmp ecx, edx
jl 0x510c59
mov eax, dword [esi + 0x10]
xor ecx, ecx
test eax, eax
jle 0x510d20
fld qword [esp + 0x58]
fsub qword [esp + 0x50]
mov eax, ebx
fld st(1)
fsub qword [eax + 8]
inc ecx
add eax, 0x10
fadd qword [esp + 0x58]
fld qword [eax - 0x10]
fsub qword [esp + 0x40]
fdiv st(2)
fadd qword [esp + 0x60]
fld st(0)
fcos
fmul st(2)
fadd qword [esi + 0x80]
fstp qword [eax - 0x10]
fsin
fmul st(1)
fadd qword [esi + 0x88]
fstp qword [eax - 8]
cmp ecx, dword [esi + 0x10]
fstp st(0)
jl 0x510ce1
fstp st(0)
mov eax, dword [esi + 0x10]
xor edi, edi
test eax, eax
fstp st(0)
jbe 0x510d56
fld qword [ebx]
call fcn.0053e380
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [edx + edi*8], eax
fld qword [ebx + 8]
call fcn.0053e380
mov ecx, dword [ebp + 0xc]
inc edi
add ebx, 0x10
mov edx, dword [ecx]
mov dword [edx + edi*8 - 4], eax
mov eax, dword [esi + 0x10]
cmp edi, eax
jb 0x510d2b
mov eax, dword [esp + 0x3c]
push eax
call fcn.00570be5
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00570be5
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8