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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0xffffffffffffffff
push edi
call fcn.0051bc50
add esp, 8
cmp dword [edi + 0x58], 2
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
jl 0x51d609
cmp dword [edi + 4], 0
jne 0x51cec1
mov eax, 0xffffff76
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
test esi, esi
jl 0x51d609
mov ecx, dword [ebp + 0xc]
jg 0x51ced9
test ecx, ecx
jb 0x51d609
cmp esi, edx
jg 0x51d609
jl 0x51ceeb
cmp ecx, eax
ja 0x51d609
mov ebx, dword [edi + 0x34]
sub ebx, 1
mov dword [esp + 0x34], ebx
js 0x51cf2c
mov esi, dword [edi + 0x44]
mov ecx, ebx
shl ecx, 4
lea ecx, [esi + ecx + 8]
mov esi, dword [ecx]
sub eax, esi
mov esi, dword [ecx + 4]
sbb edx, esi
cmp dword [ebp + 0x10], edx
jg 0x51cf20
jl 0x51cf18
cmp dword [ebp + 0xc], eax
jae 0x51cf20
dec ebx
sub ecx, 0x10
test ebx, ebx
jge 0x51cf03
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
mov edx, dword [edi + 0x38]
mov eax, dword [edx + ebx*8 + 8]
mov esi, dword [edx + ebx*8 + 4]
lea ecx, [edx + ebx*8]
mov edx, dword [ecx + 0xc]
mov dword [esp + 0x28], eax
mov eax, dword [ecx]
mov ecx, dword [edi + 0x44]
shl ebx, 4
add ecx, ebx
mov ebx, dword [ecx + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
add ebx, eax
mov dword [esp + 0x2c], edx
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 0xc]
adc ecx, edx
mov dword [esp + 0x5c], ecx
mov ecx, eax
sub ecx, dword [esp + 0x38]
mov dword [esp + 0x50], eax
mov eax, edx
sbb eax, dword [esp + 0x3c]
add ecx, dword [ebp + 0xc]
mov dword [esp + 0x54], edx
adc eax, dword [ebp + 0x10]
cmp esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x58], ebx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], esi
jg 0x51d361
jl 0x51cfb4
mov eax, dword [esp + 0x28]
cmp edx, eax
jae 0x51d361
mov ecx, dword [esp + 0x28]
sub ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
sbb eax, esi
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], eax
test eax, eax
jg 0x51cfe0
jl 0x51d05b
cmp ecx, 0x10000
jb 0x51d05b
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x54]
mov ebx, dword [esp + 0x4c]
sub edx, eax
sbb ebx, ecx
mov dword [esp + 0x80], edx
mov edx, dword [esp + 0x58]
sub edx, eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x84], ebx
fild qword [esp + 0x80]
sbb eax, ecx
fild qword [esp + 0x78]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], eax
fmulp st(1)
fild qword [esp + 0x68]
fdivp st(1)
call fcn.004e7da6
mov ecx, dword [esp + 0x18]
add eax, ecx
mov ebx, edx
adc ebx, esi
sub eax, 0x10000
sbb ebx, 0
mov dword [esp + 0x20], eax
add ecx, 0x10000
mov eax, esi
adc eax, 0
cmp ebx, eax
jg 0x51d065
jl 0x51d05b
cmp dword [esp + 0x20], ecx
jae 0x51d065
mov ecx, dword [esp + 0x18]
mov ebx, esi
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x20]
cmp edx, dword [edi + 8]
jne 0x51d073
cmp ebx, dword [edi + 0xc]
je 0x51d0d5
mov ecx, dword [edi]
test ecx, ecx
je 0x51d0bf
mov eax, dword [edi + 0x2c4]
test eax, eax
je 0x51d0b8
mov edx, dword [esp + 0x20]
push 0
push ebx
push edx
push ecx
call eax
add esp, 0x10
cmp eax, 0xffffffff
je 0x51d0b8
mov eax, dword [esp + 0x20]
mov dword [edi + 8], eax
xor eax, eax
mov dword [edi + 0xc], ebx
cmp dword [edi + 0x1c], eax
jl 0x51d0c4
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], eax
mov dword [edi + 0x30], eax
jmp 0x51d0c4
mov eax, 0xffffff80
jmp 0x51d0c4
mov eax, 0xffffff7f
cdq
mov dword [esp + 0x10], eax
or eax, edx
jne 0x51d5d0
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
sub ecx, dword [edi + 8]
mov edx, dword [esp + 0x2c]
sbb edx, dword [edi + 0xc]
lea eax, [esp + 0x88]
push edx
push ecx
push eax
call fcn.0051c060
add esp, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
cmp eax, 0xffffff80
jne 0x51d10f
cmp edx, 0xffffffff
je 0x51d5d0
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x14], 0
jg 0x51d1d2
jl 0x51d127
cmp dword [esp + 0x10], 0
jae 0x51d1d2
mov ecx, dword [esp + 0x18]
add ecx, 1
mov eax, esi
adc eax, 0
cmp ebx, eax
jl 0x51d361
jg 0x51d147
cmp dword [esp + 0x20], ecx
jbe 0x51d361
mov edx, dword [esp + 0x20]
or edx, ebx
je 0x51d5d0
mov esi, dword [esp + 0x20]
add esi, 0xffff0000
adc ebx, 0xffffffff
cmp ebx, dword [esp + 0x1c]
mov dword [esp + 0x20], esi
jg 0x51d17a
jl 0x51d172
cmp esi, dword [esp + 0x18]
ja 0x51d17a
mov esi, ecx
mov dword [esp + 0x20], esi
mov ebx, eax
mov ecx, dword [edi]
test ecx, ecx
je 0x51d1c8
mov eax, dword [edi + 0x2c4]
test eax, eax
je 0x51d1be
push 0
push ebx
push esi
push ecx
call eax
add esp, 0x10
cmp eax, 0xffffffff
je 0x51d1be
xor eax, eax
mov dword [edi + 8], esi
mov dword [edi + 0xc], ebx
cmp dword [edi + 0x1c], eax
jl 0x51d307
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], eax
mov dword [edi + 0x30], eax
jmp 0x51d307
mov eax, 0xffffff80
jmp 0x51d307
mov eax, 0xffffff7f
jmp 0x51d307
mov eax, dword [esp + 0x88]
movzx ecx, byte [eax + 0x11]
movzx edx, byte [eax + 0x10]
shl ecx, 8
or ecx, edx
movzx edx, byte [eax + 0xf]
movzx eax, byte [eax + 0xe]
shl ecx, 8
or ecx, edx
mov edx, dword [edi + 0x40]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x34]
cmp ecx, dword [edx + eax*4]
jne 0x51d318
lea eax, [esp + 0x88]
call fcn.00412b60
mov ecx, eax
and ecx, edx
cmp ecx, 0xffffffff
je 0x51d318
cmp edx, dword [esp + 0x4c]
jg 0x51d282
jl 0x51d22f
cmp eax, dword [esp + 0x48]
jae 0x51d282
mov ecx, dword [esp + 0x10]
mov ebx, dword [edi + 8]
mov esi, dword [edi + 0xc]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x48]
sub ecx, eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x4c]
sbb eax, edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x54], edx
test eax, eax
jg 0x51d347
jl 0x51d277
cmp ecx, 0xac44
ja 0x51d347
mov dword [esp + 0x20], ebx
mov ebx, esi
jmp 0x51d318
mov ecx, dword [esp + 0x18]
add ecx, 1
mov dword [esp + 0x60], ecx
mov ecx, esi
adc ecx, 0
cmp ebx, ecx
mov dword [esp + 0x64], ecx
jl 0x51d361
jg 0x51d2ae
mov ecx, dword [esp + 0x60]
cmp dword [esp + 0x20], ecx
jbe 0x51d361
mov ecx, dword [esp + 0x28]
cmp ecx, dword [edi + 8]
jne 0x51d333
mov ecx, dword [esp + 0x2c]
cmp ecx, dword [edi + 0xc]
jne 0x51d333
add dword [esp + 0x20], 0xffff0000
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
adc ebx, 0xffffffff
cmp ebx, esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
jg 0x51d2f7
jl 0x51d2eb
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x18]
ja 0x51d2f7
mov edx, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x20]
push ebx
push eax
mov esi, edi
call fcn.0051bf80
add esp, 8
cdq
mov dword [esp + 0x10], eax
or eax, edx
jne 0x51d5d0
mov esi, dword [esp + 0x1c]
cmp esi, dword [esp + 0x2c]
jg 0x51d361
jl 0x51d0d5
mov ecx, dword [esp + 0x28]
cmp dword [esp + 0x18], ecx
jae 0x51d361
jmp 0x51d0d5
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
cmp esi, dword [esp + 0x2c]
jl 0x51cfb4
jg 0x51d361
mov edx, dword [esp + 0x28]
cmp dword [esp + 0x18], edx
jb 0x51cfb4
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push eax
push ecx
mov esi, edi
call fcn.0051bf80
cdq
or ecx, 0xffffffff
add esp, 8
mov dword [esp + 0x10], eax
or eax, edx
mov dword [edi + 0x50], ecx
mov dword [edi + 0x54], ecx
jne 0x51d5d0
push ecx
push ecx
lea edx, [esp + 0x70]
push edx
call fcn.0051c060
add esp, 0xc
mov dword [esp + 0x10], eax
test edx, edx
jl 0x51d5d0
jg 0x51d3b0
test eax, eax
jb 0x51d5d0
mov ebx, dword [esp + 0x34]
cmp ebx, dword [edi + 0x60]
je 0x51d3d3
call fcn.0051bf00
mov eax, dword [edi + 0x40]
mov dword [edi + 0x60], ebx
mov ecx, dword [eax + ebx*4]
mov dword [edi + 0x5c], ecx
mov dword [edi + 0x58], 3
jmp 0x51d3de
lea eax, [edi + 0x1e0]
call fcn.0051a8e0
mov edx, dword [edi + 0x5c]
lea ebx, [edi + 0x78]
push edx
mov edx, ebx
call fcn.00413370
add esp, 4
lea eax, [esp + 0x68]
mov esi, ebx
call fcn.00413000
lea ebx, [ebx]
test ebx, ebx
je 0x51d409
cmp dword [ebx], 0
jne 0x51d40d
xor eax, eax
jmp 0x51d420
push 0
lea esi, [esp + 0x8c]
mov eax, ebx
call fcn.004133a0
add esp, 4
cdq
mov ecx, eax
or ecx, edx
je 0x51d46d
test edx, edx
jl 0x51d545
jg 0x51d439
test eax, eax
jb 0x51d545
mov esi, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
mov eax, esi
and eax, edx
cmp eax, 0xffffffff
jne 0x51d54f
test ebx, ebx
je 0x51d409
cmp dword [ebx], 0
je 0x51d400
push 1
xor esi, esi
mov eax, ebx
call fcn.004133a0
add esp, 4
jmp 0x51d400
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push ecx
push edx
mov esi, edi
call fcn.0051bf80
cdq
add esp, 8
mov dword [esp + 0x10], eax
test edx, edx
jl 0x51d5d0
jg 0x51d498
test eax, eax
jb 0x51d5d0
lea ebx, [esp + 0x68]
mov eax, edi
call fcn.0051cd00
mov esi, edx
mov ebx, eax
mov dword [esp + 0x10], ebx
test esi, esi
jl 0x51d5d0
jg 0x51d4c0
test ebx, ebx
jb 0x51d5d0
lea ecx, [ecx]
mov eax, dword [esp + 0x68]
movzx ecx, byte [eax + 0x11]
movzx edx, byte [eax + 0x10]
shl ecx, 8
or ecx, edx
movzx edx, byte [eax + 0xf]
movzx eax, byte [eax + 0xe]
shl ecx, 8
or ecx, edx
shl ecx, 8
or ecx, eax
cmp ecx, dword [edi + 0x5c]
jne 0x51d507
lea eax, [esp + 0x68]
call fcn.00412b60
cmp edx, 0xffffffff
jg 0x51d52f
jl 0x51d4fd
cmp eax, 0xffffffff
ja 0x51d52f
mov ecx, dword [esp + 0x68]
test byte [ecx + 5], 1
je 0x51d52f
mov dword [edi + 8], ebx
lea ebx, [esp + 0x68]
mov eax, edi
mov dword [edi + 0xc], esi
call fcn.0051cd00
mov esi, edx
mov ebx, eax
test esi, esi
jg 0x51d4c0
jl 0x51d526
test ebx, ebx
jae 0x51d4c0
mov dword [esp + 0x10], ebx
jmp 0x51d5d0
push esi
push ebx
push edi
mov dword [esp + 0x1c], ebx
call fcn.0051c110
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x10], 0xffffff78
jmp 0x51d5c8
mov eax, dword [edi + 0x60]
mov ecx, dword [edi + 0x44]
shl eax, 4
sub esi, dword [eax + ecx]
sbb edx, dword [eax + ecx + 4]
xor eax, eax
cmp edx, eax
mov dword [edi + 0x50], esi
mov dword [edi + 0x54], edx
jg 0x51d577
jl 0x51d571
cmp esi, eax
jae 0x51d577
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
mov edx, dword [esp + 0x38]
add dword [edi + 0x50], edx
mov eax, dword [esp + 0x3c]
mov esi, dword [ebp + 0x10]
adc dword [edi + 0x54], eax
mov ecx, dword [edi + 0x54]
cmp ecx, esi
jg 0x51d5c0
jl 0x51d599
mov edx, dword [edi + 0x50]
cmp edx, dword [ebp + 0xc]
ja 0x51d5c0
push 0xffffffffffffffff
push edi
call fcn.0051bc50
add esp, 8
cmp esi, edx
jg 0x51d5c0
jl 0x51d5af
cmp dword [ebp + 0xc], eax
ja 0x51d5c0
fldz
xor eax, eax
fst qword [edi + 0x68]
fstp qword [edi + 0x70]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x10], 0xffffff7f
mov dword [esp + 0x14], 0xffffffff
or eax, 0xffffffff
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
lea eax, [edi + 0x1e0]
push eax
call fcn.0051a940
lea ecx, [edi + 0x250]
add esp, 4
push ecx
call fcn.0051ad80
mov eax, dword [esp + 0x14]
add esp, 4
mov dword [edi + 0x58], 2
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