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

Disassembly:
sub esp, 0x44
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
mov edi, eax
lea ecx, [ecx]
cmp dword [edi + 0x58], 3
jne 0x51d825
mov esi, edi
call fcn.0051c490
test eax, eax
jl 0x51dbc7
mov esi, 4
cmp dword [edi + 0x58], esi
jne 0x51d89d
mov eax, dword [edi + 0x48]
mov ecx, dword [eax + 0x1c]
mov edx, dword [ecx + 0xe48]
mov dword [esp + 0x10], edx
nop
lea eax, [edi + 0x78]
test eax, eax
je 0x51d84c
cmp dword [eax], 0
jne 0x51d850
xor eax, eax
jmp 0x51d85e
push 1
lea esi, [esp + 0x34]
call fcn.004133a0
add esp, 4
cmp eax, 0xffffffff
je 0x51da20
test eax, eax
jle 0x51d898
mov esi, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
lea eax, [esp + 0x30]
push eax
lea eax, [edi + 0x250]
mov dword [esp + 0x1c], esi
call fcn.00519ca0
add esp, 4
test eax, eax
je 0x51da2d
mov ebp, dword [esp + 0x20]
jmp 0x51d840
mov esi, 4
mov ebx, 2
cmp dword [edi + 0x58], ebx
jl 0x51d959
jmp 0x51d8b0
push 0xffffffffffffffff
lea ecx, [esp + 0x24]
push 0xffffffffffffffff
push ecx
call fcn.0051c060
add esp, 0xc
test edx, edx
jl 0x51dbc2
jg 0x51d8d3
test eax, eax
jb 0x51dbc2
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
lea eax, [edx*8]
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
fadd qword [edi + 0x68]
fstp qword [edi + 0x68]
cmp dword [edi + 0x58], esi
jne 0x51d963
movzx ecx, byte [ebp + 0x11]
movzx edx, byte [ebp + 0x10]
movzx eax, byte [ebp + 0xf]
shl ecx, 8
or ecx, edx
movzx edx, byte [ebp + 0xe]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
cmp dword [edi + 0x5c], ecx
je 0x51d959
test byte [ebp + 5], bl
je 0x51d8b0
lea eax, [edi + 0x1e0]
push eax
call fcn.0051a940
lea ecx, [edi + 0x250]
add esp, 4
push ecx
call fcn.0051ad80
add esp, 4
cmp dword [edi + 4], 0
mov dword [edi + 0x58], ebx
jne 0x51d973
mov edx, dword [edi + 0x48]
push edx
call fcn.0051b190
mov esi, dword [edi + 0x4c]
add esp, 4
call fcn.0051b410
cmp dword [edi + 0x58], 4
je 0x51da0f
cmp dword [edi + 0x58], 3
jge 0x51da0f
cmp dword [edi + 4], 0
je 0x51d9de
movzx eax, byte [ebp + 0x11]
movzx ecx, byte [ebp + 0x10]
movzx edx, byte [ebp + 0xf]
mov esi, dword [edi + 0x34]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp + 0xe]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
xor ecx, ecx
test esi, esi
jle 0x51d9ac
mov edx, dword [edi + 0x40]
mov edi, edi
cmp dword [edx], eax
je 0x51d9ac
inc ecx
add edx, 4
cmp ecx, esi
jl 0x51d9a0
cmp ecx, esi
je 0x51d810
push eax
lea edx, [edi + 0x78]
mov dword [edi + 0x5c], eax
mov dword [edi + 0x60], ecx
call fcn.00413370
add esp, 4
lea esi, [edi + 0x78]
lea eax, [esp + 0x20]
mov dword [edi + 0x58], 3
call fcn.00413000
jmp 0x51d810
mov edx, dword [edi + 0x4c]
mov eax, dword [edi + 0x48]
push 0
push 0
push edx
push eax
push edi
lea eax, [esp + 0x34]
call fcn.0051c650
add esp, 0x14
test eax, eax
jne 0x51dbc7
mov ecx, dword [edi + 0x1c8]
inc dword [edi + 0x60]
mov ebp, dword [esp + 0x20]
mov dword [edi + 0x5c], ecx
lea esi, [edi + 0x78]
lea eax, [esp + 0x20]
call fcn.00413000
jmp 0x51d810
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov ecx, dword [edi + 0x1f8]
cmp ecx, 0xffffffff
lea ebx, [edi + 0x1e0]
jle 0x51da58
mov eax, dword [ebx + 0x14]
cmp ecx, eax
jge 0x51da58
sub eax, ecx
test eax, eax
je 0x51da58
mov eax, 0xffffff7f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
lea edx, [edi + 0x250]
push edx
call fcn.00519ec0
mov ecx, dword [edi + 0x1f8]
add esp, 4
cmp ecx, 0xffffffff
jle 0x51da82
mov eax, dword [edi + 0x1f4]
cmp ecx, eax
jge 0x51da82
sub eax, ecx
xor ebx, ebx
jmp 0x51da86
xor ebx, ebx
xor eax, eax
mov ecx, dword [esp + 0x10]
shl eax, cl
mov dword [esp + 0x10], eax
fild dword [esp + 0x10]
mov eax, dword [esp + 0x34]
lea edx, [eax*8]
mov dword [esp + 0x10], edx
fadd qword [edi + 0x70]
mov eax, esi
and eax, ebp
fstp qword [edi + 0x70]
fild dword [esp + 0x10]
fadd qword [edi + 0x68]
fstp qword [edi + 0x68]
cmp eax, 0xffffffff
je 0x51dbb5
cmp dword [esp + 0x3c], ebx
jne 0x51dbb5
mov edx, dword [edi + 4]
cmp edx, ebx
je 0x51dada
mov eax, dword [edi + 0x60]
mov dword [esp + 0x10], eax
jmp 0x51dae0
mov dword [esp + 0x10], ebx
mov eax, ebx
cmp edx, ebx
je 0x51daf9
cmp eax, ebx
jle 0x51daf9
mov edx, dword [edi + 0x44]
shl eax, 4
sub esi, dword [eax + edx]
sbb ebp, dword [eax + edx + 4]
mov dword [esp + 0x18], esi
cmp ebp, ebx
jg 0x51db0b
jl 0x51db05
cmp dword [esp + 0x18], ebx
jae 0x51db0b
mov dword [esp + 0x18], ebx
xor ebp, ebp
mov edx, dword [edi + 0x1f8]
cmp edx, 0xffffffff
jle 0x51db24
mov eax, dword [edi + 0x1f4]
cmp edx, eax
jge 0x51db24
sub eax, edx
jmp 0x51db26
xor eax, eax
shl eax, cl
mov ecx, dword [esp + 0x10]
xor esi, esi
mov dword [esp + 0x20], ebx
cdq
sub dword [esp + 0x18], eax
mov dword [esp + 0x24], ebx
sbb ebp, edx
xor eax, eax
cmp ecx, 2
mov dword [esp + 0x1c], ebp
jl 0x51db86
mov eax, dword [edi + 0x44]
add ecx, 0xfffffffe
shr ecx, 1
add eax, 0x18
inc ecx
lea edx, [ecx + ecx]
mov dword [esp + 0x14], edx
mov edx, dword [eax - 0x10]
add dword [esp + 0x20], edx
mov edx, dword [eax - 0xc]
adc dword [esp + 0x24], edx
mov edx, dword [eax]
add esi, edx
mov edx, dword [eax + 4]
adc ebx, edx
add eax, 0x20
sub ecx, 1
jne 0x51db5b
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
cmp eax, ecx
jge 0x51dba1
mov ecx, dword [edi + 0x44]
shl eax, 4
mov ecx, dword [eax + ecx + 8]
add dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x44]
mov edx, dword [eax + ecx + 0xc]
adc ebp, edx
add esi, dword [esp + 0x20]
adc ebx, dword [esp + 0x24]
add esi, dword [esp + 0x18]
adc ebx, ebp
mov dword [edi + 0x50], esi
mov dword [edi + 0x54], ebx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret