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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x94
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0x2c], esi
mov eax, dword [esi + 0x134]
mov dword [esp + 0x28], eax
cmp dword [esi + 0x24], eax
jle 0x5095ad
cmp dword [esi + 0x28], eax
jle 0x5095ad
mov al, 1
jmp 0x5095af
xor al, al
cmp byte [esi + 0x144], 0
je 0x5095c0
test al, al
je 0x5095c0
mov cl, 1
jmp 0x5095c2
xor cl, cl
cmp byte [esi + 0x145], 0
mov byte [esp + 0x16], cl
je 0x5095d7
test al, al
je 0x5095d7
mov ch, 1
jmp 0x5095d9
xor ch, ch
mov edx, dword [esi + 0x120]
mov byte [esp + 0x17], ch
mov dword [esp + 0x3c], 2
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
test cl, cl
je 0x509618
mov eax, dword [esi + 0x94]
cmp byte [eax + 0xf6], 0
jne 0x509618
mov bl, 1
jmp 0x50961a
xor bl, bl
mov byte [esp + 0x34], bl
test ch, ch
je 0x509635
mov eax, dword [esi + 0x90]
cmp byte [eax + 0xf6], 0
jne 0x509635
mov bh, 1
jmp 0x509637
xor bh, bh
mov ecx, dword [esi + 0x24]
mov edi, dword [esi + 0x28]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], edi
movaps xmm0, xmmword [esp + 0x80]
movaps xmmword [esp + 0x60], xmm0
mov eax, dword [esp + 0x64]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x60]
mov byte [esp + 0x38], bh
mov dword [esp + 0x40], eax
test edx, edx
je 0x509864
mov edx, dword [edx + 8]
test edx, edx
je 0x509864
movups xmm0, xmmword [edx + 0x1c]
movd eax, xmm0
movaps xmmword [esp + 0x90], xmm0
mov dword [esp + 0x50], eax
test eax, eax
js 0x5096ca
cmp dword [esp + 0x94], 0
jl 0x5096ca
mov eax, dword [esp + 0x98]
add eax, dword [esp + 0x50]
cmp ecx, eax
jl 0x5096ca
mov eax, dword [esp + 0x9c]
add eax, dword [esp + 0x94]
mov esi, dword [esp + 0x2c]
cmp edi, eax
jge 0x509864
cmp byte [esp + 0x16], 0
je 0x5096e9
test bl, bl
jne 0x5096e5
cmp dword [edx + 0x1c], 0
jl 0x5096e5
mov eax, dword [edx + 0x24]
add eax, dword [edx + 0x1c]
cmp eax, ecx
jle 0x5096e9
mov bl, 1
jmp 0x5096eb
xor bl, bl
cmp byte [esp + 0x17], 0
mov byte [esp + 0x34], bl
je 0x509714
test bh, bh
jne 0x50970a
cmp dword [edx + 0x20], 0
jl 0x50970a
mov eax, dword [edx + 0x28]
add eax, dword [edx + 0x20]
cmp eax, edi
jle 0x509714
mov eax, dword [esp + 0x28]
mov bh, 1
sub ecx, eax
jmp 0x50971e
mov ecx, dword [esp + 0x68]
xor bh, bh
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov byte [esp + 0x38], bh
test bl, bl
je 0x50972e
sub edi, eax
jmp 0x509732
mov edi, dword [esp + 0x6c]
movups xmm0, xmmword [edx + 0x1c]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x2c]
movd dword [esp + 0x50], xmm0
movaps xmmword [esp + 0x90], xmm0
cmp eax, dword [esp + 0x50]
jg 0x509790
mov esi, dword [esp + 0x30]
cmp esi, dword [esp + 0x94]
mov esi, dword [esp + 0x2c]
jg 0x509790
add ecx, eax
mov eax, dword [esp + 0x98]
add eax, dword [esp + 0x50]
cmp ecx, eax
jl 0x509790
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x9c]
add ecx, edi
add eax, dword [esp + 0x94]
cmp ecx, eax
jge 0x509872
cmp byte [esp + 0x16], 0
mov ecx, dword [esp + 0x18]
je 0x5097ad
test bl, bl
jne 0x5097a9
mov eax, dword [edx + 0x24]
add eax, dword [edx + 0x1c]
cmp eax, ecx
jle 0x5097ad
mov bl, 1
jmp 0x5097af
xor bl, bl
cmp byte [esp + 0x17], 0
mov byte [esp + 0x34], bl
je 0x5097dd
test bh, bh
jne 0x5097c8
mov eax, dword [edx + 0x28]
add eax, dword [edx + 0x20]
cmp eax, edi
jle 0x5097dd
mov ecx, dword [esi + 0x24]
mov bh, 1
mov eax, dword [esp + 0x28]
sub ecx, eax
mov byte [esp + 0x38], bh
mov dword [esp + 0x18], ecx
jmp 0x5097e7
xor bh, bh
mov byte [esp + 0x38], bh
mov eax, dword [esp + 0x28]
test bl, bl
je 0x5097f0
mov edi, dword [esi + 0x28]
sub edi, eax
cmp byte [esi + 0x14a], 0
mov edx, dword [esp + 0x40]
jne 0x509806
test bh, bh
cmovne edx, eax
mov dword [esp + 0x40], edx
cmp byte [esi + 0x14b], 0
jne 0x50981e
mov eax, dword [esp + 0x30]
test bl, bl
cmovne eax, dword [esp + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x120]
test eax, eax
je 0x5098e3
mov eax, dword [eax + 8]
test eax, eax
je 0x5098e3
movups xmm0, xmmword [eax + 0x1c]
push edi
push ecx
push dword [esp + 0x38]
lea ecx, [esi + 0x98]
push edx
movups xmmword [esp + 0xa0], xmm0
call fcn.00500240
mov edx, dword [esi + 0x120]
test edx, edx
je 0x509890
mov eax, dword [edx + 8]
jmp 0x509892
mov ecx, dword [esp + 0x68]
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x18], ecx
jmp 0x509876
mov ecx, dword [esp + 0x18]
test bh, bh
je 0x5097e3
mov ecx, dword [esi + 0x24]
mov eax, dword [esp + 0x28]
sub ecx, eax
mov dword [esp + 0x18], ecx
jmp 0x5097e7
xor eax, eax
movups xmm0, xmmword [eax + 0x1c]
movd eax, xmm0
movaps xmmword [esp + 0x60], xmm0
cmp dword [esp + 0x90], eax
jne 0x5098cf
mov eax, dword [esp + 0x94]
cmp eax, dword [esp + 0x64]
jne 0x5098cf
mov eax, dword [esp + 0x98]
cmp eax, dword [esp + 0x68]
jne 0x5098cf
mov eax, dword [esp + 0x9c]
cmp eax, dword [esp + 0x6c]
je 0x5098fb
sub dword [esp + 0x3c], 1
js 0x5098fb
mov cl, byte [esp + 0x16]
mov ch, byte [esp + 0x17]
jmp 0x509601
push edi
push ecx
push dword [esp + 0x38]
lea ecx, [esi + 0x98]
push edx
call fcn.00500240
mov edx, dword [esi + 0x120]
xorps xmm0, xmm0
movaps xmmword [esp + 0x60], xmm0
test edx, edx
je 0x50996d
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x50996d
mov eax, dword [ecx + 0x24]
sub esp, 0x10
mov dword [esp + 0xa8], eax
mov eax, dword [ecx + 0x28]
mov dword [esp + 0xac], eax
mov eax, esp
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
movups xmm0, xmmword [esp + 0xa0]
push ecx
movups xmmword [eax], xmm0
lea eax, [esi + 0x98]
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.004a5460
movaps xmm0, xmmword [esp + 0xac]
add esp, 0x1c
movaps xmmword [esp + 0x60], xmm0
mov eax, dword [esp + 0x60]
push dword [esp + 0x28]
mov ecx, dword [esi + 0x94]
neg eax
push dword [esp + 0x1c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x6c]
neg eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x90]
mov dword [esp + 0x2c], eax
xor eax, eax
cmp byte [esi + 0x14b], al
cmovne eax, edi
push eax
mov eax, dword [esp + 0x4c]
push eax
call fcn.00500240
movd xmm2, dword [esp + 0x68]
xorps xmm1, xmm1
cvtdq2pd xmm2, xmm2
comisd xmm2, xmm1
ja 0x5099c9
xorps xmm2, xmm2
mov edx, dword [esp + 0x2c]
movsd xmm0, qword [edx + 0xa0]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x5099f5
movsd xmm0, qword [edx + 0xa8]
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jnp 0x509ad4
movsd xmm5, qword [edx + 0xb8]
movaps xmm0, xmm2
movsd xmm3, qword [edx + 0xb0]
subsd xmm0, xmm1
movaps xmm4, xmm5
movsd qword [edx + 0xa0], xmm1
subsd xmm4, xmm3
movsd qword [edx + 0xa8], xmm2
comisd xmm4, xmm0
jb 0x509a3a
movups xmm0, xmmword [edx + 0xa0]
movups xmmword [esp + 0x90], xmm0
jmp 0x509a7b
comisd xmm1, xmm3
jbe 0x509a45
xorps xmm2, xmm2
jmp 0x509a4d
subsd xmm2, xmm4
minsd xmm2, xmm3
movaps xmm0, xmm2
movsd qword [esp + 0x90], xmm2
subsd xmm0, xmm3
addsd xmm0, xmm5
comisd xmm0, xmm2
jbe 0x509a72
movsd qword [esp + 0x98], xmm0
jmp 0x509a7b
movsd qword [esp + 0x98], xmm2
lea eax, [esp + 0x90]
movsd xmm1, qword [eax]
movsd xmm0, qword [eax + 8]
ucomisd xmm3, xmm1
lahf
test ah, 0x44
jp 0x509a9f
ucomisd xmm5, xmm0
lahf
test ah, 0x44
jnp 0x509ac9
mov ecx, edx
movsd qword [edx + 0xb0], xmm1
movsd qword [edx + 0xb8], xmm0
call fcn.00508de0
mov ecx, dword [esp + 0x2c]
lea ecx, [ecx + 0x88]
call fcn.0042f6f0
mov edx, dword [esp + 0x2c]
mov ecx, edx
call fcn.00508de0
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
movd xmm2, dword [esp + 0x3c]
cvtdq2pd xmm2, xmm2
movd xmm3, ecx
cvtdq2pd xmm3, xmm3
addsd xmm3, xmm2
comisd xmm3, xmm2
ja 0x509af7
movaps xmm3, xmm2
movsd xmm5, qword [edx + 0xa8]
movaps xmm4, xmm3
movsd xmm1, qword [edx + 0xa0]
subsd xmm4, xmm2
movaps xmm0, xmm5
subsd xmm0, xmm1
comisd xmm4, xmm0
jb 0x509b2c
movups xmm0, xmmword [edx + 0xa0]
movups xmmword [esp + 0x90], xmm0
jmp 0x509b6b
comisd xmm1, xmm2
ja 0x509b3d
movaps xmm1, xmm5
subsd xmm1, xmm4
minsd xmm1, xmm2
movaps xmm0, xmm1
movsd qword [esp + 0x90], xmm1
subsd xmm0, xmm2
addsd xmm0, xmm3
comisd xmm0, xmm1
jbe 0x509b62
movsd qword [esp + 0x98], xmm0
jmp 0x509b6b
movsd qword [esp + 0x98], xmm1
movsd xmm0, qword [edx + 0xb0]
lea eax, [esp + 0x90]
movsd xmm2, qword [eax]
movsd xmm1, qword [eax + 8]
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jp 0x509b9f
movsd xmm0, qword [edx + 0xb8]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jnp 0x509bcd
mov ecx, edx
movsd qword [edx + 0xb0], xmm2
movsd qword [edx + 0xb8], xmm1
call fcn.00508de0
mov ecx, dword [esp + 0x2c]
lea ecx, [ecx + 0x88]
call fcn.0042f6f0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
cmp byte [esp + 0x16], 0
movd xmm0, dword [esi + 0x138]
cvtdq2pd xmm0, xmm0
movsd qword [edx + 0xc0], xmm0
je 0x509bf7
mov eax, dword [esp + 0x3c]
xor edx, edx
test bl, bl
cmove eax, edx
mov dword [esp + 0x3c], eax
push edi
push dword [esp + 0x2c]
xor eax, eax
cmp byte [esi + 0x14a], al
push dword [esp + 0x38]
cmovne eax, ecx
mov ecx, dword [esp + 0x30]
push eax
call fcn.00500240
movd xmm2, dword [esp + 0x6c]
xorps xmm1, xmm1
cvtdq2pd xmm2, xmm2
comisd xmm2, xmm1
ja 0x509c2b
xorps xmm2, xmm2
mov ecx, dword [esp + 0x24]
movsd xmm0, qword [ecx + 0xa0]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x509c57
movsd xmm0, qword [ecx + 0xa8]
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jnp 0x509d38
movsd xmm4, qword [ecx + 0xb8]
movsd qword [ecx + 0xa8], xmm2
movaps xmm3, xmm4
movsd xmm2, qword [ecx + 0xb0]
movsd qword [ecx + 0xa0], xmm1
subsd xmm3, xmm2
movsd xmm5, qword [ecx + 0xa8]
movaps xmm0, xmm5
subsd xmm0, xmm1
comisd xmm3, xmm0
jb 0x509ca4
movups xmm0, xmmword [ecx + 0xa0]
movups xmmword [esp + 0x90], xmm0
jmp 0x509ce3
comisd xmm1, xmm2
ja 0x509cb5
movaps xmm1, xmm5
subsd xmm1, xmm3
minsd xmm1, xmm2
movaps xmm0, xmm1
movsd qword [esp + 0x90], xmm1
subsd xmm0, xmm2
addsd xmm0, xmm4
comisd xmm0, xmm1
jbe 0x509cda
movsd qword [esp + 0x98], xmm0
jmp 0x509ce3
movsd qword [esp + 0x98], xmm1
lea eax, [esp + 0x90]
movsd xmm1, qword [eax]
movsd xmm0, qword [eax + 8]
ucomisd xmm2, xmm1
lahf
test ah, 0x44
jp 0x509d07
ucomisd xmm4, xmm0
lahf
test ah, 0x44
jnp 0x509d2f
movsd qword [ecx + 0xb0], xmm1
movsd qword [ecx + 0xb8], xmm0
call fcn.00508de0
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + 0x88]
call fcn.0042f6f0
mov ecx, dword [esp + 0x24]
call fcn.00508de0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x50]
movd xmm3, edi
cvtdq2pd xmm3, xmm3
movd xmm2, edx
cvtdq2pd xmm2, xmm2
addsd xmm3, xmm2
comisd xmm3, xmm2
ja 0x509d59
movaps xmm3, xmm2
movsd xmm5, qword [ecx + 0xa8]
movaps xmm4, xmm3
movsd xmm1, qword [ecx + 0xa0]
subsd xmm4, xmm2
movaps xmm0, xmm5
subsd xmm0, xmm1
comisd xmm4, xmm0
jb 0x509d8e
movups xmm0, xmmword [ecx + 0xa0]
movups xmmword [esp + 0x90], xmm0
jmp 0x509dcd
comisd xmm1, xmm2
ja 0x509d9f
movaps xmm1, xmm5
subsd xmm1, xmm4
minsd xmm1, xmm2
movaps xmm0, xmm1
movsd qword [esp + 0x90], xmm1
subsd xmm0, xmm2
addsd xmm0, xmm3
comisd xmm0, xmm1
jbe 0x509dc4
movsd qword [esp + 0x98], xmm0
jmp 0x509dcd
movsd qword [esp + 0x98], xmm1
movsd xmm0, qword [ecx + 0xb0]
lea eax, [esp + 0x90]
movsd xmm2, qword [eax]
movsd xmm1, qword [eax + 8]
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jp 0x509e01
movsd xmm0, qword [ecx + 0xb8]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jnp 0x509e2d
movsd qword [ecx + 0xb0], xmm2
movsd qword [ecx + 0xb8], xmm1
call fcn.00508de0
mov ecx, dword [esp + 0x24]
lea ecx, [ecx + 0x88]
call fcn.0042f6f0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x50]
cmp byte [esp + 0x17], 0
movd xmm0, dword [esi + 0x13c]
cvtdq2pd xmm0, xmm0
movsd qword [ecx + 0xc0], xmm0
je 0x509e53
xor eax, eax
test bh, bh
cmove edx, eax
mov dword [esp + 0x50], edx
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x34]
mov eax, dword [ecx]
call dword [eax + 0x2c]
mov ebx, dword [esp + 0x24]
mov ecx, ebx
push dword [esp + 0x38]
mov eax, dword [ebx]
call dword [eax + 0x2c]
mov eax, dword [esi + 0x120]
test eax, eax
je 0x509efe
cmp dword [eax + 8], 0
je 0x509efe
push dword [esp + 0x50]
lea eax, [esp + 0x44]
mov ecx, esi
push dword [esp + 0x40]
push eax
call fcn.0050a790
mov ecx, dword [esi + 0x120]
test ecx, ecx
je 0x509ea6
mov eax, dword [ecx + 8]
jmp 0x509ea8
xor eax, eax
movups xmm0, xmmword [eax + 0x1c]
mov edx, dword [esp + 0x40]
movd eax, xmm0
movaps xmmword [esp + 0x90], xmm0
cmp eax, edx
mov eax, dword [esp + 0x44]
jne 0x509ecd
cmp dword [esp + 0x94], eax
je 0x509efe
test ecx, ecx
je 0x509ee8
mov ecx, dword [ecx + 8]
push dword [ecx + 0x28]
push dword [ecx + 0x24]
push eax
push edx
call fcn.00500240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
push dword [ecx + 0x28]
push dword [ecx + 0x24]
push eax
push edx
call fcn.00500240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x50]
mov ebx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
sub ebx, eax
sub ecx, edx
mov dword [esp + 0x70], eax
cmp dword [esp + 0x18], ebx
mov dword [esp + 0x74], edx
cmovl ebx, dword [esp + 0x18]
cmp edi, ecx
mov eax, ebx
mov dword [esp + 0x50], ebx
mov ebx, dword [esp + 0x24]
cmovl ecx, edi
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x7c], ecx
cmp dword [esi + 0x124], eax
jne 0x509f62
cmp dword [esi + 0x128], edx
jne 0x509f62
mov eax, dword [esp + 0x50]
cmp dword [esi + 0x12c], eax
jne 0x509f62
cmp dword [esi + 0x130], ecx
je 0x509f7d
movups xmm0, xmmword [esp + 0x70]
mov eax, dword [esi]
lea ecx, [esp + 0x70]
push ecx
mov ecx, esi
movups xmmword [esi + 0x124], xmm0
call dword [eax + 0xb4]
mov ecx, dword [esp + 0x2c]
lea ecx, [ecx + 0x88]
call fcn.0042eca0
lea ecx, [ebx + 0x88]
call fcn.0042eca0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret