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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb8
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0xc]
push edi
cmp eax, 0x4f
jl 0x52078a
test ebx, ebx
je 0x520e4b
mov edx, dword [0xa39ba8]
lea eax, [esp + 0x28]
push eax
mov ecx, 0xa39ba8
mov dword [esp + 0x2c], ebx
call dword [edx + 0x10]
cmp eax, 0xffffffff
je 0x520779
push eax
mov ecx, 0xa39ba8
call fcn.005218f0
push ebx
call fcn.0076d2d5
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x10], 1
je 0x520e48
mov ecx, dword [0x821c8c]
lea eax, [esp + 0x88]
push eax
push ebx
call fcn.00697ec0
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x520950
push ebx
mov ecx, 0x81a800
call fcn.00545340
mov ecx, dword [eax + 0xec]
push 0x1a8
cmp ecx, 2
jne 0x52081e
call fcn.0076d5a7
add esp, 4
test eax, eax
je 0x520865
mov edx, dword [ebx + 8]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
add edx, 5
push 0
mov dword [esp + 0x24], edx
mov edx, dword [0x821b68]
push 0x600
push 1
lea ecx, [esp + 0x24]
push 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
push ecx
mov ecx, dword [edx + 0xa90]
mov edx, dword [edx + 0xa84]
mov ecx, dword [edx + ecx*4 - 4]
push ecx
jmp 0x52085e
call fcn.0076d5a7
add esp, 4
test eax, eax
je 0x520865
mov edx, dword [ebx + 8]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
mov ecx, dword [0x821b68]
add edx, 5
push 0
mov dword [esp + 0x24], edx
push 0x600
push 1
lea edx, [esp + 0x24]
push 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
push edx
mov edx, dword [ecx + 0x22c]
push edx
mov ecx, eax
call fcn.00420110
push 0x1a8
call fcn.0076d5a7
add esp, 4
test eax, eax
je 0x5208b1
mov edx, dword [ebx + 8]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
add edx, 5
push 0
mov dword [esp + 0x24], edx
mov edx, dword [0x821b68]
push 0x600
push 1
lea ecx, [esp + 0x24]
push 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
push ecx
mov ecx, dword [edx + 0x230]
push ecx
mov ecx, eax
call fcn.00420110
push ebx
mov ecx, 0x81a800
call fcn.00545340
mov ecx, dword [eax + 0x140]
test ch, 1
je 0x520902
mov eax, dword [ebx + 8]
mov ebp, dword [0xa39bc0]
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
add eax, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], eax
mov eax, dword [0x821b68]
mov dword [esp + 0x1c], edx
push 1
mov edx, dword [eax + 0xca8]
lea ecx, [esp + 0x1c]
push edx
mov edx, dword [eax + 0x3e8]
push 0
call fcn.0047dec0
mov eax, dword [0x821b68]
push 1
mov ecx, dword [eax + 0xca8]
mov edx, dword [eax + 0x3e8]
push ecx
push 0
mov ecx, ebx
call fcn.0047dec0
mov eax, dword [0x821b68]
push 0
push 0
mov edx, dword [eax + 0xca8]
mov ecx, dword [eax + 0x3e8]
sub esp, 0xc
mov eax, ebx
mov esi, esp
mov edi, dword [eax]
mov dword [esi], edi
mov edi, dword [eax + 4]
mov dword [esi + 4], edi
mov eax, dword [eax + 8]
mov dword [esi + 8], eax
call fcn.0047f220
mov eax, dword [ebx]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov word [esp + 0x64], ax
mov eax, dword [ebx + 4]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov word [esp + 0x66], ax
mov eax, 0xfffffffd
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x64]
mov edi, 0xfffffffd
add eax, ecx
mov dword [esp + 0x5c], edi
mov word [esp + 0x60], ax
mov edx, dword [esp + 0x66]
lea ecx, [esp + 0x10]
add edx, edi
push ecx
mov word [esp + 0x66], dx
mov eax, dword [esp + 0x64]
mov ecx, 0x81a800
mov dword [esp + 0x14], eax
call fcn.005453b0
mov esi, dword [eax + 0xe4]
test esi, esi
je 0x520e28
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x2c]
cmp eax, 0xf
je 0x5209e0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x2c]
cmp eax, 1
jne 0x520e19
lea edi, [esi + 0x88]
mov ecx, edi
mov edx, dword [ecx]
mov dword [esp + 0x90], edx
lea edx, [esp + 0x80]
mov eax, dword [ecx + 4]
push edx
mov dword [esp + 0x98], eax
lea eax, [esp + 0x94]
mov ecx, dword [ecx + 8]
push eax
mov dword [esp + 0xa0], ecx
mov ecx, dword [0x821c8c]
call fcn.00697ec0
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x88]
sub ecx, edx
mov edx, dword [esp + 0x84]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x8c]
fild dword [esp + 0x6c]
sub edx, ecx
sub esp, 8
mov dword [esp + 0x78], edx
fild dword [esp + 0x78]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fstp qword [esp]
fstp st(0)
fstp st(0)
call fcn.004b9f30
add esp, 8
call fcn.0076a6b0
add eax, 8
cmp eax, 0x80
jge 0x520e19
mov ecx, dword [ebx + 0xc]
mov edx, 0x40
add eax, 0x80
push edx
mov ecx, dword [ecx*4 + 0xa39a58]
push eax
mov ebp, dword [ecx]
call dword [ebp + 0x5c]
mov ebp, eax
cmp byte [ebp], 0
jle 0x520acb
mov edx, dword [esi]
push 0
push 0
mov ecx, esi
call dword [edx + 0x4c8]
movsx edx, byte [ebp]
lea ecx, [esp + 0xc0]
call fcn.00521430
mov eax, dword [eax + 4]
shl al, 1
mov byte [esi + 0x59e], al
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x80]
mov ecx, dword [eax + 0xb0]
test ecx, ecx
je 0x520e19
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x80]
mov eax, dword [eax + 0xb0]
cmp byte [eax], 0
jne 0x520e19
cmp byte [ebp], 0
jl 0x520e19
mov edx, dword [edi]
mov ecx, ebx
mov dword [esp + 0xa8], edx
mov edx, dword [edi + 4]
mov edi, dword [edi + 8]
mov eax, dword [ecx]
mov dword [esp + 0xb0], edi
mov edi, dword [esp + 0xa8]
mov ebp, dword [ecx + 4]
sub eax, edi
mov dword [esp + 0x10], eax
sub edx, ebp
fild dword [esp + 0x10]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0xb0]
fstp dword [esp + 0x50]
fild dword [esp + 0x10]
mov eax, dword [esp + 0x50]
sub ecx, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x44], eax
fstp dword [esp + 0x54]
fild dword [esp + 0x10]
mov ecx, dword [esp + 0x54]
lea eax, [esp + 0xb4]
mov dword [esp + 0x48], ecx
push eax
fstp dword [esp + 0x5c]
mov edx, dword [esp + 0x5c]
lea ecx, [esi + 0x2e0]
mov dword [esp + 0x50], edx
call fcn.004b8700
movsx ecx, word [eax]
sub ecx, 0x3fff
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
fmul qword [0x786620]
fstp qword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
push edi
push ebp
call fcn.004b9fa0
fstp dword [esp + 0x38]
push edi
push ebp
call fcn.004b9ff0
fstp dword [esp + 0x28]
fld dword [esp + 0x68]
fld dword [esp + 0x64]
fld dword [esp + 0x60]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
add esp, 8
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fstp qword [esp]
fstp st(0)
fstp st(0)
fstp st(0)
call fcn.004b9f30
fst dword [esp + 0x34]
fabs
fcomp qword [0x78f630]
add esp, 8
fnstsw ax
test ah, 0x41
jne 0x520e19
fld dword [esp + 0x48]
fmul dword [esp + 0x48]
fld dword [esp + 0x44]
fmul dword [esp + 0x44]
sub esp, 8
mov dword [esp + 0x54], 0
faddp st(1)
fstp qword [esp]
call fcn.004b9f30
fcom qword [0x786610]
add esp, 8
fnstsw ax
test ah, 0x40
jne 0x520c72
fld dword [esp + 0x44]
fdiv st(1)
fstp dword [esp + 0x74]
fld dword [esp + 0x48]
fdiv st(1)
mov edx, dword [esp + 0x74]
mov dword [esp + 0x38], edx
fstp dword [esp + 0x78]
mov eax, dword [esp + 0x78]
fdivr qword [0x786610]
mov dword [esp + 0x3c], eax
fstp dword [esp + 0x7c]
mov ecx, dword [esp + 0x7c]
jmp 0x520c88
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x38], edx
fstp st(0)
mov dword [esp + 0x3c], eax
fld dword [esp + 0x38]
fmul dword [esp + 0x18]
fld dword [esp + 0x3c]
fmul dword [esp + 0x30]
mov dword [esp + 0x40], ecx
sub esp, 8
faddp st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x48]
fmul dword [esp + 0x38]
fchs
fld dword [esp + 0x48]
fmul dword [esp + 0x20]
fstp dword [esp + 0xa8]
fld dword [esp + 0x40]
fmul dword [esp + 0x38]
fld dword [esp + 0x44]
fmul dword [esp + 0x20]
fsubp st(1)
fst dword [esp + 0xac]
fld dword [esp + 0xa8]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fstp qword [esp]
fstp st(0)
fstp st(0)
fstp st(0)
call fcn.004b9f30
fstp dword [esp + 0x2c]
fld dword [esp + 0x20]
fmul dword [esp + 0x18]
fld dword [esp + 0x38]
fmul dword [esp + 0x2c]
add esp, 8
fsubp st(1)
fsub dword [esp + 0x38]
fabs
fcomp qword [0x78f628]
fnstsw ax
test ah, 0x41
je 0x520d4d
fld dword [esp + 0x18]
fmul dword [esp + 0x24]
fld dword [esp + 0x30]
fmul dword [esp + 0x10]
faddp st(1)
fsub dword [esp + 0x3c]
fabs
fcomp qword [0x78f628]
fnstsw ax
test ah, 0x41
jne 0x520d57
fld dword [esp + 0x24]
fchs
fstp dword [esp + 0x24]
fld dword [esp + 0x2c]
fadd qword [0x78f5c0]
sub esp, 8
fstp qword [esp + 0x38]
fld dword [esp + 0x34]
fild dword [ebx + 0xc]
fmul qword [0xa39a38]
fsubp st(1)
fadd qword [0x78f620]
fmul qword [0x78f5b8]
fstp qword [esp]
call fcn.004b9fa0
fmul qword [0x78f618]
fadd qword [0x787a88]
fmul qword [0x78f5c0]
fstp qword [esp + 0xc0]
fld dword [esp + 0x34]
fild dword [ebx + 0xc]
fmul qword [0xa39a38]
fsubp st(1)
fadd qword [0x78f620]
fmul qword [0x78f5b8]
fstp qword [esp]
call fcn.004b9ff0
fmul qword [0x78f5b8]
add esp, 8
fmul qword [0x78f5c0]
fmul qword [0x78f618]
fmul qword [esp + 0x30]
fsub qword [esp + 0xb8]
fld qword [esp + 0x30]
fmul qword [esp + 0x30]
fdivp st(1)
fld dword [esp + 0x24]
fmul st(1)
fmul qword [0x78f5c8]
fstp dword [esi + 0x280]
fld dword [esp + 0x10]
fmul st(1)
fmul qword [0x78f5c8]
fchs
fstp dword [esi + 0x284]
fstp st(0)
mov esi, dword [esi + 0x30]
test esi, esi
jne 0x5209c4
mov edi, dword [esp + 0x5c]
inc edi
cmp edi, 4
mov dword [esp + 0x5c], edi
jl 0x520994
mov eax, dword [esp + 0x28]
inc eax
cmp eax, 4
mov dword [esp + 0x28], eax
jl 0x520980
inc dword [ebx + 0xc]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret