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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5bdee8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x61dc40]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x30], ebx
mov eax, dword [ebp + 8]
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 0x74]
xor esi, esi
mov dword [esp + 0x34], esi
cmp eax, esi
je 0x52a8ea
call fcn.00519d52
mov eax, dword [eax + 4]
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x5c]
push eax
mov dword [esp + 0x14], esi
call fcn.00440517
lea eax, [esp + 0x44]
push eax
mov dword [esp + 0x84], esi
call fcn.00440517
mov byte [esp + 0x80], 1
push dword [ebx + 0x14]
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.USER32.dll_GetDC]
push dword [ebx + 0x18]
mov dword [esp + 0x28], eax
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x38], eax
lea eax, [ebx + 0x2c]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov dword [esp + 0x1c], esi
sar ecx, 2
mov dword [esp + 0x18], eax
test ecx, ecx
jbe 0x52aa1f
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
call fcn.004750c1
mov edi, dword [eax]
xor eax, eax
cmp dword [edi + 0x4c], eax
je 0x52aa04
lea ecx, [esp + 0x3c]
push ecx
push dword [esp + 0x28]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x14]
mov edx, dword [edi]
add ecx, eax
push ecx
mov ecx, dword [esp + 0x40]
add ecx, esi
push ecx
push eax
push esi
mov ecx, edi
call dword [edx + 0xc]
add esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
jg 0x52a9c5
mov dword [esp + 0x10], eax
cmp dword [edi + 0x108], 3
jne 0x52aa04
cmp dword [edi + 0x6c], 0
lea ebx, [esp + 0x1c]
je 0x52a9ed
lea esi, [esp + 0x44]
call fcn.0049ea51
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
add dword [esp + 0x20], eax
jmp 0x52aa00
lea esi, [esp + 0x5c]
call fcn.0049ea51
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
add dword [esp + 0x2c], eax
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
inc dword [esp + 0x1c]
sar ecx, 2
cmp dword [esp + 0x1c], ecx
jb 0x52a95e
push dword [esp + 0x38]
push dword [esp + 0x28]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [esp + 0x24]
push dword [ebx + 0x14]
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebx + 0x58]
test eax, eax
jne 0x52aa4b
mov eax, dword [esp + 0x34]
cmp eax, dword [esp + 0x10]
jle 0x52aa4f
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x48]
add eax, dword [ebx + 0x50]
sub dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
sub eax, dword [ebx + 0x4c]
sub eax, dword [esp + 0x14]
mov dword [esp + 0x24], eax
test eax, eax
jle 0x52ab8c
mov eax, dword [esp + 0x6c]
and dword [esp + 0x14], 0
mov esi, eax
sub esi, dword [esp + 0x68]
sar esi, 2
dec esi
mov dword [esp + 0x1c], esi
js 0x52acb9
jmp 0x52aa96
mov eax, dword [esp + 0x6c]
mov esi, dword [esp + 0x1c]
sub eax, dword [esp + 0x68]
sar eax, 2
cmp esi, eax
jb 0x52aaa6
call fcn.005908ee
mov eax, dword [esp + 0x68]
lea eax, [eax + esi*4]
mov edi, dword [eax]
mov esi, dword [esp + 0x18]
call fcn.004750c1
cmp dword [esp + 0x1c], 0
mov edi, dword [eax]
jne 0x52aacb
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x14]
jmp 0x52aaf6
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fidiv dword [esp + 0x2c]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
fimul dword [esp + 0x24]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
call fcn.005969a0
mov esi, dword [edi + 0xc]
sub esi, dword [edi + 4]
mov ecx, edi
add esi, eax
mov eax, dword [edi]
call dword [eax + 0x84]
mov dword [esp + 0x38], eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x88]
mov ecx, dword [esp + 0x38]
test ecx, ecx
jle 0x52ab35
cmp esi, ecx
jge 0x52ab35
mov eax, dword [edi + 4]
sub eax, dword [edi + 0xc]
add eax, ecx
add dword [esp + 0x14], eax
mov eax, dword [edi + 4]
add ecx, eax
jmp 0x52ab6e
test eax, eax
jle 0x52ab58
cmp esi, eax
jle 0x52ab58
push dword [edi + 0x10]
mov ecx, eax
sub ecx, dword [edi + 0xc]
add ecx, dword [edi + 4]
add dword [esp + 0x18], ecx
mov ecx, dword [edi + 4]
add eax, ecx
push eax
push dword [edi + 8]
push ecx
jmp 0x52ab76
test esi, esi
jle 0x52ab7d
mov eax, dword [edi + 4]
sub eax, dword [edi + 0xc]
add eax, esi
add dword [esp + 0x14], eax
mov eax, dword [edi + 4]
lea ecx, [eax + esi]
push dword [edi + 0x10]
push ecx
push dword [edi + 8]
push eax
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0xc]
dec dword [esp + 0x1c]
jns 0x52aa8e
jmp 0x52acb9
jge 0x52acb9
mov eax, dword [esp + 0x54]
and dword [esp + 0x14], 0
mov esi, eax
sub esi, dword [esp + 0x50]
sar esi, 2
dec esi
mov dword [esp + 0x1c], esi
js 0x52acb9
jmp 0x52abb9
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x1c]
sub eax, dword [esp + 0x50]
sar eax, 2
cmp esi, eax
jb 0x52abc9
call fcn.005908ee
mov eax, dword [esp + 0x50]
lea eax, [eax + esi*4]
mov edi, dword [eax]
mov esi, dword [esp + 0x18]
call fcn.004750c1
mov edi, dword [eax]
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
cmp dword [esp + 0x20], 0
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fstp dword [esp + 0x2c]
jle 0x52ac02
fld dword [esp + 0x2c]
fidiv dword [esp + 0x20]
fstp dword [esp + 0x2c]
cmp dword [esp + 0x1c], 0
jne 0x52ac13
mov eax, dword [esp + 0x24]
sub eax, dword [esp + 0x14]
jmp 0x52ac28
fild dword [esp + 0x24]
fmul dword [esp + 0x2c]
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
call fcn.005969a0
mov esi, dword [edi + 0xc]
sub esi, dword [edi + 4]
mov ecx, edi
add esi, eax
mov eax, dword [edi]
call dword [eax + 0x84]
mov dword [esp + 0x38], eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x88]
mov ecx, dword [esp + 0x38]
test ecx, ecx
jle 0x52ac67
cmp esi, ecx
jge 0x52ac67
mov eax, dword [edi + 4]
sub eax, dword [edi + 0xc]
add eax, ecx
add dword [esp + 0x14], eax
mov eax, dword [edi + 4]
add ecx, eax
jmp 0x52aca0
test eax, eax
jle 0x52ac8a
cmp esi, eax
jle 0x52ac8a
mov ecx, dword [edi + 4]
sub ecx, dword [edi + 0xc]
push dword [edi + 0x10]
add ecx, eax
add dword [esp + 0x18], ecx
mov ecx, dword [edi + 4]
add eax, ecx
push eax
push dword [edi + 8]
push ecx
jmp 0x52aca8
test esi, esi
jle 0x52acaf
mov eax, dword [edi + 4]
sub eax, dword [edi + 0xc]
add eax, esi
add dword [esp + 0x14], eax
mov eax, dword [edi + 4]
lea ecx, [eax + esi]
push dword [edi + 0x10]
push ecx
push dword [edi + 8]
push eax
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 0xc]
dec dword [esp + 0x1c]
jns 0x52abb1
mov eax, dword [ebx + 0x44]
and dword [esp + 0x24], 0
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
sar ecx, 2
test ecx, ecx
jbe 0x52ad3c
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
call fcn.004750c1
mov ecx, dword [eax]
cmp dword [ecx + 0x4c], 0
je 0x52ad25
mov esi, dword [ecx + 0x10]
sub esi, dword [ecx + 8]
mov eax, dword [esp + 0x10]
mov edi, dword [ecx + 0xc]
sub edi, dword [ecx + 4]
sub eax, esi
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add eax, dword [esp + 0x28]
add edi, edx
mov edx, dword [ecx]
add esi, eax
push esi
push edi
push eax
push dword [esp + 0x20]
call dword [edx + 0xc]
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
inc dword [esp + 0x24]
sar ecx, 2
cmp dword [esp + 0x24], ecx
jb 0x52acdd
mov eax, dword [ebx + 0x4c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
add eax, dword [esp + 0x14]
add ecx, edx
add ecx, dword [ebx + 0x50]
cmp eax, dword [ebp + 0x10]
jl 0x52ad58
mov eax, dword [ebp + 0x10]
mov edx, dword [ebx + 4]
add edx, eax
cmp ecx, dword [ebp + 0x14]
mov dword [ebx + 0xc], edx
jl 0x52ad68
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebx + 8]
add eax, ecx
mov ecx, dword [ebx + 0x28]
mov dword [ebx + 0x10], eax
test ecx, ecx
je 0x52ad7d
mov eax, dword [ecx]
push ebx
call dword [eax + 0x18]
lea esi, [esp + 0x44]
call fcn.0047509e
lea esi, [esp + 0x5c]
call fcn.0047509e
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14