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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x20
mov edx, dword [esi + 0x1c]
push ebx
push edi
mov edi, eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x30]
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x34]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
lea edx, [ecx + 0x13ef]
mov eax, 0x335c49d5
imul edx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], edi
mov ebx, 1
cmp eax, 1
jl 0x51c742
mov ebx, eax
mov eax, ecx
cdq
idiv ebx
lea ecx, [edi + 0x1b67]
mov dword [esi + 0x30], eax
mov eax, 0x255d1e11
imul ecx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, 1
cmp eax, 1
jl 0x51c76d
mov ecx, eax
mov eax, edi
cdq
idiv ecx
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [esi + 0x34], eax
xor eax, eax
cmp dword [esi + 8], eax
jle 0x51c970
jmp 0x51c796
mov edi, dword [esp + 0xc]
xor eax, eax
mov ecx, dword [esi + 4]
lea edi, [edi + edi*8]
add edi, edi
mov dword [ecx + edi*8 + 0x24], eax
mov edx, dword [esi + 4]
mov dword [edx + edi*8 + 0x28], eax
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x30]
mov dword [ecx + edi*8 + 0x2c], edx
mov ecx, dword [esi + 4]
mov dword [ecx + edi*8 + 0x30], eax
mov edx, dword [esi + 4]
mov dword [edx + edi*8 + 0x34], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x34]
mov dword [eax + edi*8 + 0x38], ecx
mov edx, dword [esi + 4]
mov ecx, dword [edx + edi*8 + 0x3c]
mov eax, dword [edx + edi*8 + 0x44]
lea ebx, [edx + edi*8]
mov dword [esp + 0x10], ecx
cmp ecx, eax
jl 0x51c7e5
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x4c]
cmp dword [esp + 0x10], eax
jl 0x51c7f2
mov dword [esp + 0x10], eax
mov ecx, dword [ebx + 0x40]
mov eax, dword [ebx + 0x48]
mov dword [esp + 0x14], ecx
cmp ecx, eax
jl 0x51c804
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x50]
cmp dword [esp + 0x14], eax
jl 0x51c811
mov dword [esp + 0x14], eax
fild dword [ebx + 0x28]
fmul qword [ebx + 0x60]
fild dword [ebx + 0x24]
fmul qword [ebx + 0x58]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x3c], eax
mov eax, dword [esi + 4]
fild dword [eax + edi*8 + 0x28]
lea ebx, [eax + edi*8]
fmul qword [ebx + 0x78]
fild dword [ebx + 0x24]
fmul qword [ebx + 0x70]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x40], eax
mov ecx, dword [esi + 4]
fild dword [ecx + edi*8 + 0x30]
lea ebx, [ecx + edi*8]
fmul qword [ebx + 0x60]
fild dword [ebx + 0x2c]
fmul qword [ebx + 0x58]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x44], eax
mov edx, dword [esi + 4]
fild dword [edx + edi*8 + 0x30]
lea ebx, [edx + edi*8]
fmul qword [ebx + 0x78]
fild dword [ebx + 0x2c]
fmul qword [ebx + 0x70]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x48], eax
mov eax, dword [esi + 4]
fild dword [eax + edi*8 + 0x38]
lea ebx, [eax + edi*8]
fmul qword [ebx + 0x60]
fild dword [ebx + 0x34]
fmul qword [ebx + 0x58]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x4c], eax
mov ecx, dword [esi + 4]
fild dword [ecx + edi*8 + 0x38]
lea ebx, [ecx + edi*8]
fmul qword [ebx + 0x78]
fild dword [ebx + 0x34]
fmul qword [ebx + 0x70]
faddp st(1)
call fcn.00505d50
mov dword [ebx + 0x50], eax
mov edx, dword [esi + 4]
mov ecx, dword [edx + edi*8 + 0x44]
lea eax, [edx + edi*8]
mov edx, dword [eax + 0x3c]
cmp edx, ecx
jge 0x51c8cb
mov ecx, edx
mov edx, dword [eax + 0x4c]
cmp ecx, edx
jl 0x51c8d4
mov ecx, edx
mov edx, dword [eax + 0x48]
mov ebx, dword [eax + 0x40]
cmp ebx, edx
jl 0x51c8e0
mov ebx, edx
mov eax, dword [eax + 0x50]
cmp ebx, eax
jl 0x51c8e9
mov ebx, eax
mov edi, dword [esp + 0xc]
cmp edi, 1
jne 0x51c976
cmp dword [esi + 0x2c], 0x23bc
je 0x51c983
sub dword [esp + 0x10], ecx
sub dword [esp + 0x14], ebx
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esi + 4]
lea eax, [edi + edi*8]
add eax, eax
add dword [ebx + eax*8 + 0x3c], ecx
lea ebx, [ebx + eax*8 + 0x3c]
mov ebx, dword [esi + 4]
add dword [ebx + eax*8 + 0x40], edx
lea ebx, [ebx + eax*8 + 0x40]
mov ebx, dword [esi + 4]
add dword [ebx + eax*8 + 0x44], ecx
lea ebx, [ebx + eax*8 + 0x44]
mov ebx, dword [esi + 4]
add dword [ebx + eax*8 + 0x48], edx
lea ebx, [ebx + eax*8 + 0x48]
mov ebx, dword [esi + 4]
add dword [ebx + eax*8 + 0x4c], ecx
mov ecx, dword [esi + 4]
add dword [ecx + eax*8 + 0x50], edx
lea ebx, [ebx + eax*8 + 0x4c]
lea eax, [ecx + eax*8 + 0x50]
push esi
mov ecx, edi
call fcn.0051be30
inc edi
mov dword [esp + 0xc], edi
cmp edi, dword [esi + 8]
jl 0x51c790
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x51c903
cmp dword [esi + 0x2c], 0x23bc
je 0x51c903
mov eax, dword [esp + 0x20]
sub eax, dword [esi + 0x30]
mov edx, dword [esp + 0x14]
sub eax, dword [esp + 0x18]
sub eax, ecx
add eax, dword [esi + 0x18]
mov ecx, dword [esp + 0x10]
add ecx, eax
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x34]
sub eax, dword [esp + 0x1c]
sub eax, ebx
add eax, dword [esp + 0x24]
add edx, eax
jmp 0x51c913