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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push eax
push ecx
push edi
mov dword [esp + 0x30], 0
call fcn.0051ce80
add esp, 0xc
test eax, eax
jl 0x51e98d
mov esi, edi
call fcn.0051c490
test eax, eax
jne 0x51e98d
lea edx, [edi + 0x78]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51e77e
cmp dword [eax], 0
je 0x51e77e
push 0
lea esi, [esp + 0x3c]
call fcn.004133a0
add esp, 4
test eax, eax
jle 0x51e773
mov eax, dword [edi + 0x60]
mov ebx, dword [edi + 0x48]
shl eax, 5
add eax, ebx
mov edx, esi
call fcn.00519b30
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
jge 0x51e68b
cmp dword [esp + 0x10], 0
je 0x51e626
mov eax, dword [esp + 0x10]
cmp dword [eax], 0
je 0x51e626
push 1
xor esi, esi
call fcn.004133a0
add esp, 4
jmp 0x51e626
mov eax, dword [esp + 0x24]
test eax, eax
je 0x51e69f
add eax, esi
sar eax, 2
cdq
add dword [edi + 0x50], eax
adc dword [edi + 0x54], edx
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
je 0x51e6ab
mov eax, dword [ebx + 4]
jmp 0x51e6ae
or eax, 0xffffffff
add eax, esi
sar eax, 2
cdq
add eax, dword [edi + 0x50]
adc edx, dword [edi + 0x54]
cmp edx, dword [ebp + 0x10]
jg 0x51e884
jl 0x51e6ce
cmp eax, dword [ebp + 0xc]
jae 0x51e884
mov eax, dword [esp + 0x10]
test eax, eax
je 0x51e6eb
cmp dword [eax], 0
je 0x51e6eb
push 1
xor esi, esi
call fcn.004133a0
mov esi, dword [esp + 0x1c]
add esp, 4
lea ecx, [esp + 0x38]
lea ebx, [edi + 0x250]
push ecx
call fcn.00519bc0
add esp, 4
push ebx
lea ebx, [edi + 0x1e0]
call fcn.00519ec0
mov ecx, dword [esp + 0x50]
add esp, 4
cmp ecx, 0xffffffff
jl 0x51e76a
mov edx, dword [esp + 0x48]
jg 0x51e721
cmp edx, 0xffffffff
jbe 0x51e76a
mov esi, dword [edi + 0x60]
mov ebx, dword [edi + 0x44]
mov eax, esi
shl eax, 4
sub edx, dword [eax + ebx]
sbb ecx, dword [eax + ebx + 4]
mov dword [edi + 0x50], edx
mov dword [edi + 0x54], ecx
xor ecx, ecx
cmp dword [edi + 0x54], ecx
jg 0x51e74c
jl 0x51e746
cmp edx, ecx
jae 0x51e74c
mov dword [edi + 0x50], ecx
mov dword [edi + 0x54], ecx
cmp esi, ecx
jle 0x51e766
lea eax, [ebx + 8]
mov edx, dword [eax]
add dword [edi + 0x50], edx
mov edx, dword [eax + 4]
adc dword [edi + 0x54], edx
inc ecx
add eax, 0x10
cmp ecx, esi
jl 0x51e753
mov esi, dword [esp + 0x18]
mov dword [esp + 0x24], esi
jmp 0x51e626
jge 0x51e77e
cmp eax, 0xfffffffd
jne 0x51e884
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push 0xffffffffffffffff
push eax
call fcn.0051c060
add esp, 0xc
test edx, edx
jl 0x51e884
jg 0x51e7a1
test eax, eax
jb 0x51e884
mov esi, dword [esp + 0x28]
mov ebx, 2
test byte [esi + 5], bl
je 0x51e7d0
lea ecx, [edi + 0x1e0]
push ecx
call fcn.0051a940
lea edx, [edi + 0x250]
add esp, 4
push edx
call fcn.0051ad80
add esp, 4
mov dword [edi + 0x58], ebx
cmp dword [edi + 0x58], 3
jge 0x51e872
movzx edx, byte [esi + 0x11]
movzx eax, byte [esi + 0x10]
movzx ecx, byte [esi + 0xf]
mov ebx, dword [edi + 0x34]
shl edx, 8
or edx, eax
movzx eax, byte [esi + 0xe]
shl edx, 8
or edx, ecx
shl edx, 8
or edx, eax
xor eax, eax
test ebx, ebx
jle 0x51e811
mov ecx, dword [edi + 0x40]
cmp dword [ecx], edx
je 0x51e811
inc eax
add ecx, 4
cmp eax, ebx
jl 0x51e805
cmp eax, ebx
je 0x51e626
mov dword [edi + 0x60], eax
mov dword [edi + 0x58], 3
movzx ecx, byte [esi + 0x11]
movzx eax, byte [esi + 0x10]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xf]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xe]
mov esi, dword [esp + 0x10]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x5c], ecx
test esi, esi
je 0x51e85f
cmp dword [esi], 0
je 0x51e85f
mov eax, esi
call fcn.00413310
mov dword [esi + 0x150], edx
mov esi, edi
call fcn.0051c490
test eax, eax
jne 0x51e98d
mov dword [esp + 0x24], eax
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x28]
call fcn.00413000
jmp 0x51e626
fldz
mov ecx, dword [edi + 0x48]
mov eax, dword [ebp + 0xc]
fst qword [edi + 0x68]
fstp qword [edi + 0x70]
mov edx, dword [ecx + 0x1c]
mov esi, dword [edx + 0xe48]
mov edx, dword [ebp + 0x10]
mov ecx, esi
mov dword [esp + 0x24], esi
call fcn.004ec4c0
mov ecx, esi
call fcn.0051ed30
mov ecx, dword [edi + 0x54]
cmp ecx, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jg 0x51e98b
jl 0x51e8d6
mov edx, dword [edi + 0x50]
cmp edx, eax
jae 0x51e98b
jmp 0x51e8d6
mov esi, dword [esp + 0x24]
mov eax, dword [ebp + 0xc]
sub eax, dword [edi + 0x50]
mov edx, dword [ebp + 0x10]
sbb edx, dword [edi + 0x54]
mov ecx, esi
call fcn.004ec4c0
mov ecx, eax
mov eax, dword [edi + 0x1f8]
cmp eax, 0xffffffff
mov dword [esp + 0x10], ecx
mov ebx, edx
jle 0x51e90a
mov esi, dword [edi + 0x1f4]
cmp eax, esi
jge 0x51e90a
sub esi, eax
jmp 0x51e90c
xor esi, esi
mov eax, esi
cdq
cmp edx, ebx
jl 0x51e91b
jg 0x51e919
cmp eax, ecx
jbe 0x51e91b
mov esi, ecx
test esi, esi
je 0x51e92f
mov eax, dword [edi + 0x1f8]
add eax, esi
cmp eax, dword [edi + 0x1f4]
jg 0x51e935
add dword [edi + 0x1f8], esi
mov ecx, dword [esp + 0x24]
mov eax, esi
shl eax, cl
cdq
add dword [edi + 0x50], eax
mov eax, esi
adc dword [edi + 0x54], edx
cdq
cmp edx, ebx
jg 0x51e96f
jl 0x51e953
cmp eax, dword [esp + 0x10]
jae 0x51e96f
mov eax, edi
call fcn.0051d800
test eax, eax
jg 0x51e96f
push 0xffffffffffffffff
push edi
call fcn.0051bc50
add esp, 8
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], edx
mov ecx, dword [edi + 0x54]
cmp ecx, dword [esp + 0x1c]
jl 0x51e8d2
jg 0x51e98b
mov edx, dword [edi + 0x50]
cmp edx, dword [esp + 0x18]
jb 0x51e8d2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret