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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1b4
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x58]
cmp eax, 2
jl 0x51c478
cmp dword [edi + 4], 0
jne 0x51c140
mov eax, 0xffffff76
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
test esi, esi
jl 0x51c478
mov ebx, dword [ebp + 0xc]
jg 0x51c158
test ebx, ebx
jb 0x51c478
cmp esi, dword [edi + 0x14]
jg 0x51c478
jl 0x51c16c
cmp ebx, dword [edi + 0x10]
ja 0x51c478
cmp eax, 3
jl 0x51c19c
mov eax, dword [edi + 0x60]
mov ecx, dword [edi + 0x38]
cmp esi, dword [ecx + eax*8 + 4]
lea eax, [ecx + eax*8]
jl 0x51c192
jg 0x51c186
cmp ebx, dword [eax]
jb 0x51c192
cmp esi, dword [eax + 0xc]
jl 0x51c19c
jg 0x51c192
cmp ebx, dword [eax + 8]
jb 0x51c19c
mov esi, edi
call fcn.0051bf00
mov esi, dword [ebp + 0x10]
or eax, 0xffffffff
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
mov eax, dword [edi + 0x5c]
lea edx, [edi + 0x78]
push eax
call fcn.00413370
add esp, 4
lea eax, [edi + 0x1e0]
call fcn.0051a8e0
push esi
push ebx
mov esi, edi
call fcn.0051bf80
add esp, 8
test eax, eax
je 0x51c1f4
or eax, 0xffffffff
lea esi, [esp + 0x58]
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
call fcn.00412ca0
mov esi, edi
call fcn.0051bf00
mov eax, 0xffffff77
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0x5c]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], eax
push ecx
lea eax, [esp + 0x5c]
call fcn.00412c20
add esp, 4
lea eax, [esp + 0x58]
call fcn.00413310
mov ebx, 3
cmp dword [edi + 0x58], ebx
jl 0x51c2d2
cmp dword [esp + 0x58], 0
je 0x51c2d2
push 1
lea esi, [esp + 0x3c]
lea eax, [esp + 0x5c]
call fcn.004133a0
add esp, 4
test eax, eax
jle 0x51c2d2
mov edx, dword [edi + 0x60]
mov eax, dword [edi + 0x48]
shl edx, 5
add eax, edx
cmp dword [eax + 0x1c], 0
je 0x51c2c8
mov edx, esi
call fcn.00519b30
mov ebx, eax
test ebx, ebx
jge 0x51c27e
xor esi, esi
lea eax, [edi + 0x78]
call fcn.004134b0
xor ebx, ebx
jmp 0x51c2aa
cmp dword [esp + 0x1c], 0
je 0x51c298
cmp dword [esp + 0x10], 0
jne 0x51c298
xor esi, esi
lea eax, [edi + 0x78]
call fcn.004134b0
jmp 0x51c2aa
mov eax, dword [esp + 0x14]
test eax, eax
je 0x51c2aa
lea ecx, [ebx + eax]
sar ecx, 2
add dword [esp + 0x18], ecx
mov esi, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, esi
and edx, ecx
cmp edx, 0xffffffff
jne 0x51c3f0
mov dword [esp + 0x14], ebx
jmp 0x51c21f
xor esi, esi
lea eax, [edi + 0x78]
call fcn.004134b0
cmp dword [esp + 0x14], 0
jne 0x51c455
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push 0xffffffffffffffff
push eax
call fcn.0051c060
add esp, 0xc
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
test edx, edx
jl 0x51c445
jg 0x51c308
test eax, eax
jb 0x51c445
cmp dword [edi + 0x58], ebx
jl 0x51c33e
lea eax, [esp + 0x28]
call fcn.00412bf0
cmp dword [edi + 0x5c], eax
je 0x51c335
mov ecx, dword [esp + 0x28]
test byte [ecx + 5], 2
je 0x51c335
mov esi, edi
call fcn.0051bf00
lea esi, [esp + 0x58]
call fcn.00412ca0
cmp dword [edi + 0x58], ebx
jge 0x51c3c3
lea eax, [esp + 0x28]
call fcn.00412bf0
mov ecx, dword [edi + 0x34]
xor esi, esi
mov ebx, eax
test ecx, ecx
jle 0x51c361
mov eax, dword [edi + 0x40]
cmp dword [eax], ebx
je 0x51c361
inc esi
add eax, 4
cmp esi, ecx
jl 0x51c355
cmp esi, ecx
je 0x51c21f
push ebx
lea edx, [edi + 0x78]
mov dword [edi + 0x60], esi
mov dword [edi + 0x5c], ebx
call fcn.00413370
add esp, 4
cmp dword [esp + 0x58], 0
je 0x51c392
lea eax, [esp + 0x58]
call fcn.00413310
mov dword [esp + 0x1a8], ebx
mov eax, dword [edi + 0x3c]
mov edx, dword [esp + 0x24]
mov dword [edi + 0x58], 3
cmp edx, dword [eax + esi*8 + 4]
jg 0x51c3bb
jl 0x51c3b1
mov ecx, dword [esp + 0x20]
cmp ecx, dword [eax + esi*8]
ja 0x51c3bb
mov dword [esp + 0x10], 1
jmp 0x51c3c3
mov dword [esp + 0x10], 0
lea eax, [esp + 0x28]
lea esi, [edi + 0x78]
call fcn.00413000
lea eax, [esp + 0x28]
lea esi, [esp + 0x58]
call fcn.00413000
mov edx, dword [esp + 0x28]
movzx eax, byte [edx + 5]
and eax, 4
mov dword [esp + 0x1c], eax
jmp 0x51c21f
mov ebx, dword [edi + 0x60]
mov edx, dword [edi + 0x44]
mov eax, ebx
shl eax, 4
sub esi, dword [eax + edx]
sbb ecx, dword [eax + edx + 4]
test ecx, ecx
jg 0x51c410
jl 0x51c40c
test esi, esi
jae 0x51c410
xor esi, esi
xor ecx, ecx
test ebx, ebx
jle 0x51c428
lea eax, [edx + 8]
mov edx, dword [eax]
add esi, edx
mov edx, dword [eax + 4]
adc ecx, edx
add eax, 0x10
sub ebx, 1
jne 0x51c417
mov eax, dword [esp + 0x18]
cdq
sub esi, eax
sbb ecx, edx
xor eax, eax
cmp ecx, eax
mov dword [edi + 0x50], esi
mov dword [edi + 0x54], ecx
jg 0x51c45e
jl 0x51c458
cmp esi, eax
jae 0x51c45e
jmp 0x51c458
push 0xffffffffffffffff
push edi
call fcn.0051bc50
add esp, 8
mov dword [edi + 0x54], edx
jmp 0x51c45b
or eax, 0xffffffff
mov dword [edi + 0x54], eax
mov dword [edi + 0x50], eax
lea esi, [esp + 0x58]
call fcn.00412ca0
fldz
fst qword [edi + 0x68]
xor eax, eax
fstp qword [edi + 0x70]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffff7d
pop ebx
mov esp, ebp
pop ebp
ret