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

Disassembly:
sub esp, 0x6c
push esi
push edi
mov edi, dword [esp + 0x78]
xor esi, esi
cmp edi, esi
je 0x52ba8e
push edi
call fcn.005265d0
mov eax, dword [esp + 0x80]
add esp, 4
cmp eax, esi
je 0x52ba7c
mov edx, dword [esp + 0x80]
cmp edx, esi
je 0x52ba7c
mov eax, dword [esp + 0x84]
sub eax, 0x1100
je 0x52b4e3
dec eax
je 0x52b4dc
dec eax
je 0x52b4cd
mov ecx, 4
mov dword [esp + 8], 2
jmp 0x52b4ec
mov ecx, 2
mov dword [esp + 8], 1
jmp 0x52b4ec
mov ecx, 2
jmp 0x52b4e8
mov ecx, 1
mov dword [esp + 8], ecx
mov eax, edx
xor edx, edx
div ecx
push ebx
push ebp
mov ebp, dword [edi + 0x38]
mov dword [esp + 0x28], ebp
cmp eax, 0xbb80
mov dword [esp + 0x14], eax
jb 0x52b50e
mov dword [esp + 0x14], 0xbb80
mov eax, dword [esp + 0x14]
mov edi, 0x6c5400
mov dword [esp + 0x34], esi
lea edx, [eax*8]
xor eax, eax
mov ecx, edx
mov ebx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
mov edi, 0x667800
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x80]
cmp dword [eax + 0x3c], esi
jbe 0x52b925
mov ebx, dword [esp + 0x20]
mov eax, dword [ebp + 0xe08]
xor edi, edi
cmp eax, 0x1012
jne 0x52b900
cmp edi, dword [esp + 0x14]
jae 0x52b900
lea ecx, [esp + 0x18]
lea edx, [esp + 0x4c]
push ecx
lea eax, [esp + 0x48]
push edx
push eax
push 2
push ebp
call fcn.0052ad10
fld dword [esp + 0x58]
fcomp dword [0x5a83e4]
add esp, 0x14
fnstsw ax
test ah, 0x44
jp 0x52b5ba
fld dword [esp + 0x48]
fcomp dword [0x5a83e4]
fnstsw ax
test ah, 0x44
jnp 0x52b900
mov ecx, dword [ebp + 0xe0]
cmp ecx, esi
mov dword [esp + 0x3c], ecx
je 0x52b83a
mov edx, dword [ecx + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
cmp edx, 0x1100
je 0x52b5ea
cmp edx, 0x1102
mov ebx, 0x10
jne 0x52b5ef
mov ebx, 8
mov eax, dword [ecx + 8]
cmp edx, 0x1100
je 0x52b60a
cmp edx, 0x1101
mov dword [esp + 0x1c], 2
jne 0x52b612
mov dword [esp + 0x1c], 1
mov ecx, dword [ecx + 0xc]
mov edx, dword [esp + 0x80]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], esi
mov ecx, dword [edx + 0x48]
xor edx, edx
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x1c]
imul ecx, ebx
fild qword [esp + 0x54]
fmul dword [esp + 0x18]
shr ecx, 3
mov dword [esp + 0x60], esi
mov ebx, dword [ebp + 0xe10]
fidiv dword [esp + 0x5c]
div ecx
mov esi, dword [ebp + 0xe0c]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x74], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x64], eax
xor eax, eax
fstp dword [esp + 0x18]
mov dword [esp + 0x68], eax
mov dword [esp + 0x70], eax
fild qword [esp + 0x64]
fild qword [esp + 0x6c]
mov dword [esp + 0x78], eax
fmul dword [0x5ad384]
fild qword [esp + 0x74]
faddp st(1)
fsubp st(1)
fdiv dword [esp + 0x18]
call fcn.0050a970
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, edi
cmp ecx, eax
jb 0x52b6ac
mov ecx, eax
imul esi, dword [esp + 0x1c]
fld dword [esp + 0x18]
fmul dword [0x5ad380]
mov edx, dword [esp + 0x30]
push ecx
fstp dword [esp]
lea esi, [edx + esi*2]
call fcn.0052aba0
add esp, 4
mov dword [esp + 0x30], eax
test ecx, ecx
je 0x52b815
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x1c]
mov eax, ebx
mov edx, ebx
shr eax, 0xe
and edx, 0x3fff
dec ecx
je 0x52b783
dec ecx
jne 0x52b7fb
movsx ecx, word [esi + eax*4 + 4]
movsx ebp, word [esi + eax*4]
imul ecx, edx
mov ebx, 0x4000
sub ebx, edx
imul ebp, ebx
add ecx, ebp
shr ecx, 0xe
movsx ecx, cx
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fld dword [esp + 0x44]
fmul st(1)
fadd dword [edi*8 + 0x6c5400]
fstp dword [edi*8 + 0x6c5400]
fmul dword [esp + 0x4c]
fadd dword [edi*8 + 0x667800]
fstp dword [edi*8 + 0x667800]
movsx ecx, word [esi + eax*4 + 6]
imul ecx, edx
movsx edx, word [esi + eax*4 + 2]
imul edx, ebx
add ecx, edx
mov ebx, dword [esp + 0x20]
shr ecx, 0xe
movsx eax, cx
mov dword [esp + 0x38], eax
fild dword [esp + 0x38]
fld dword [esp + 0x48]
fmul st(1)
fadd dword [edi*8 + 0x6c5404]
fstp dword [edi*8 + 0x6c5404]
jmp 0x52b7e5
movsx ecx, word [esi + eax*2]
movsx eax, word [esi + eax*2 + 2]
mov ebp, 0x4000
imul eax, edx
sub ebp, edx
imul ecx, ebp
add ecx, eax
shr ecx, 0xe
movsx ecx, cx
mov dword [esp + 0x38], ecx
fild dword [esp + 0x38]
fld dword [esp + 0x44]
fmul st(1)
fadd dword [edi*8 + 0x6c5400]
fstp dword [edi*8 + 0x6c5400]
fld dword [esp + 0x48]
fmul st(1)
fadd dword [edi*8 + 0x6c5404]
fstp dword [edi*8 + 0x6c5404]
fld dword [esp + 0x4c]
fmul st(1)
fadd dword [edi*8 + 0x667800]
fstp dword [edi*8 + 0x667800]
fmul dword [esp + 0x50]
mov ebp, dword [esp + 0x28]
fadd dword [edi*8 + 0x667804]
fstp dword [edi*8 + 0x667804]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
add ebx, edx
inc edi
dec eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], eax
jne 0x52b6de
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov edx, ebx
and ebx, 0x3fff
shr edx, 0xe
add eax, edx
mov dword [ebp + 0xe10], ebx
mov dword [ebp + 0xe0c], eax
xor esi, esi
jmp 0x52b83e
mov eax, dword [esp + 0x24]
add ebx, dword [esp + 0x30]
mov edx, ebx
and ebx, 0x3fff
shr edx, 0xe
add eax, edx
cmp ecx, esi
mov dword [esp + 0x24], eax
je 0x52b861
cmp eax, dword [esp + 0x40]
jb 0x52b8f0
mov eax, dword [ebp + 0xe14]
cmp eax, esi
je 0x52b8ce
mov ecx, dword [ebp + 0xe18]
mov edx, dword [ebp + 0xa8]
dec ecx
cmp dword [ebp + 0xe2c], ecx
jae 0x52b8ce
xor ecx, ecx
cmp eax, esi
je 0x52b894
cmp edx, esi
jne 0x52b891
mov dword [eax + 4], 2
mov eax, dword [eax + 0xc]
inc ecx
cmp ecx, dword [ebp + 0xe2c]
jbe 0x52b882
cmp edx, esi
jne 0x52b8a7
inc dword [ebp + 0xe1c]
cmp eax, esi
je 0x52b8b3
mov edx, dword [eax]
mov dword [ebp + 0xe0], edx
mov eax, dword [ebp + 0xe2c]
mov dword [ebp + 0xe0c], esi
inc eax
mov dword [ebp + 0xe10], esi
mov dword [ebp + 0xe2c], eax
jmp 0x52b8f0
push ebp
call fcn.0052a7b0
mov eax, dword [ebp + 0xa8]
add esp, 4
cmp eax, esi
je 0x52b8f0
push ebp
call fcn.0052a860
push ebp
call fcn.0052a6f0
add esp, 8
cmp dword [ebp + 0xe08], 0x1012
je 0x52b570
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x34]
mov ebp, dword [ebp + 0xe64]
inc eax
mov edx, dword [ecx + 0x3c]
mov dword [esp + 0x28], ebp
cmp eax, edx
mov dword [esp + 0x34], eax
jb 0x52b55d
mov eax, dword [esp + 0x8c]
xor edx, edx
xor ecx, ecx
pop ebp
sub eax, 0x1100
pop ebx
je 0x52ba32
dec eax
je 0x52b9e3
dec eax
mov eax, dword [esp + 0x80]
je 0x52b998
div dword [esp + 8]
mov edx, eax
cmp edx, esi
jbe 0x52ba7c
mov eax, ecx
mov esi, ecx
shr eax, 1
and esi, 1
push ecx
lea eax, [esi + eax*2]
shl eax, 2
fld dword [eax + 0x667800]
fadd dword [eax + 0x6c5400]
fstp dword [esp]
call fcn.0052abc0
mov esi, dword [esp + 0x80]
add esp, 4
mov word [esi + ecx*2], ax
inc ecx
cmp ecx, edx
jb 0x52b95c
jmp 0x52ba7c
div dword [esp + 8]
mov edx, eax
cmp edx, esi
jbe 0x52ba7c
mov eax, ecx
mov esi, ecx
shr eax, 1
and esi, 1
push ecx
lea eax, [esi + eax*2]
shl eax, 2
fld dword [eax + 0x667800]
fadd dword [eax + 0x6c5400]
fstp dword [esp]
call fcn.0052abc0
mov esi, dword [esp + 0x80]
add al, 0x80
add esp, 4
mov byte [ecx + esi], al
inc ecx
cmp ecx, edx
jb 0x52b9a6
jmp 0x52ba7c
mov eax, dword [esp + 0x80]
div dword [esp + 8]
mov edx, eax
cmp edx, esi
jbe 0x52ba7c
fld dword [ecx*8 + 0x667804]
fadd dword [ecx*8 + 0x6c5404]
push ecx
fadd dword [ecx*8 + 0x667800]
fadd dword [ecx*8 + 0x6c5400]
fstp dword [esp]
call fcn.0052abc0
mov esi, dword [esp + 0x80]
add esp, 4
mov word [esi + ecx*2], ax
inc ecx
cmp ecx, edx
jb 0x52b9f8
jmp 0x52ba7c
mov eax, dword [esp + 0x80]
div dword [esp + 8]
mov edx, eax
cmp edx, esi
jbe 0x52ba7c
fld dword [ecx*8 + 0x667804]
fadd dword [ecx*8 + 0x6c5404]
push ecx
fadd dword [ecx*8 + 0x667800]
fadd dword [ecx*8 + 0x6c5400]
fstp dword [esp]
call fcn.0052abc0
mov esi, dword [esp + 0x80]
add al, 0x80
add esp, 4
mov byte [ecx + esi], al
inc ecx
cmp ecx, edx
jb 0x52ba43
call fcn.00526530
mov ecx, dword [esp + 0x78]
push ecx
call fcn.005265e0
add esp, 4
pop edi
pop esi
add esp, 0x6c
ret