Function at 0x59805a
Capabilities:
Encode data using xor

Disassembly:
push 8
mov eax, 0x8091e4
call fcn.007eae4c
push ebx
sub esp, 0x38
mov eax, dword [ebx + 8]
push esi
push edi
push 0x10
mov esi, dword [eax]
mov dword [ebp - 0x14], ecx
call fcn.00795dab
mov edi, eax
pop ecx
mov dword [ebp - 0x18], edi
and dword [ebp - 4], 0
mov ecx, edi
movsd xmm0, qword [esi + 0x18]
movsd qword [ebp - 0x20], xmm0
call fcn.00599a83
movsd xmm0, qword [ebp - 0x20]
or dword [ebp - 4], 0xffffffff
movsd qword [edi + 8], xmm0
mov edi, dword [esi + 0xc]
mov esi, dword [esi + 8]
cmp esi, edi
je 0x598142
movsd xmm1, qword [0x8a9a68]
movsd xmm0, qword [esi + 8]
xorps xmm0, xmmword [0x8aa790]
comisd xmm1, xmm0
xorps xmm0, xmm0
seta dl
comisd xmm1, xmmword [esi + 8]
seta al
comisd xmm0, xmmword [esi + 8]
movzx ecx, al
movzx eax, dl
cmova ecx, eax
test cl, cl
jne 0x598137
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.00597fc3
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [eax + 8]
call fcn.005985db
mov ecx, dword [ebp - 0x14]
movsd xmm2, qword [esi + 8]
mov eax, dword [eax]
cmp eax, dword [ecx + 8]
mov ecx, dword [ebp - 0x18]
je 0x598126
push dword [eax + 0x20]
call fcn.0059910b
jmp 0x59812f
lea eax, [ebp - 0x48]
push eax
call fcn.00598c62
movsd xmm1, qword [0x8a9a68]
add esi, 0x10
cmp esi, edi
jne 0x5980ba
mov eax, dword [ebx + 8]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x28]
test eax, eax
js 0x59831f
cmp eax, 1
jle 0x59824d
cmp eax, 2
jne 0x59831f
mov edx, dword [ebp - 0x14]
movsd xmm0, qword [0x871070]
mov eax, dword [edx + 0x38]
mov esi, eax
mov edi, dword [edx + 0x3c]
add esi, 1
mov dword [ebp - 0x1c], edi
adc edi, 0
mov dword [ebp - 0x38], eax
comisd xmm0, xmmword [ecx + 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
jbe 0x598222
mov ecx, esi
mov dword [ebp - 0x24], edi
mov eax, edi
mov dword [ebp - 0x28], esi
add ecx, 1
mov dword [ebp - 0x30], 3
mov dword [edx + 0x38], ecx
lea esi, [ebp - 0x38]
adc eax, 0
movsd xmm2, qword [0x8aa0c0]
mov dword [edx + 0x3c], eax
mov eax, dword [ebx + 0xc]
mov edi, eax
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x20], 3
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [eax + 0x10]
lea esi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x38]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00598c62
movsd xmm2, qword [0x8a9ca8]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
push eax
call fcn.00598c62
mov edi, dword [ebx + 8]
lea ecx, [ebp - 0x38]
mov esi, dword [ebp - 0x14]
push ecx
mov eax, dword [edi]
mov ecx, dword [esi + 0x2c]
movsd xmm2, qword [eax + 0x20]
call fcn.00598c62
mov eax, dword [edi]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [esi + 0x2c]
movsd xmm2, qword [eax + 0x20]
jmp 0x59831a
movsd xmm2, qword [0x8a9ca8]
lea eax, [ebp - 0x38]
mov ecx, dword [ebp - 0x18]
mov dword [edx + 0x3c], edi
mov edi, dword [ebx + 0xc]
mov dword [edx + 0x38], esi
lea esi, [ebp - 0x38]
mov dword [ebp - 0x30], 4
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x59831a
test eax, eax
jne 0x59825b
movsd xmm0, qword [0x8a9ca8]
jmp 0x598263
movsd xmm0, qword [0x8aa0c0]
mov edi, dword [ebp - 0x14]
movaps xmm2, xmm0
mov dword [ebp - 0x40], 2
movsd qword [ebp - 0x20], xmm0
mov edx, dword [edi + 0x38]
mov ecx, edx
mov esi, dword [edi + 0x3c]
add ecx, 1
mov eax, esi
mov dword [edi + 0x38], ecx
mov ecx, dword [ebp - 0x18]
adc eax, 0
mov dword [edi + 0x3c], eax
lea eax, [ebp - 0x48]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x44], esi
lea esi, [ebp - 0x48]
mov dword [ebp - 0x48], edx
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00598c62
mov ecx, dword [ebx + 8]
movsd xmm0, qword [0x871070]
mov eax, dword [ecx]
comisd xmm0, xmmword [eax + 0x20]
jbe 0x59831f
mov edi, dword [ebp - 0x14]
movsd xmm2, qword [ebp - 0x20]
xorps xmm2, xmmword [0x8aa790]
mov dword [ebp - 0x30], 3
mov edx, dword [edi + 0x38]
mov ecx, edx
mov esi, dword [edi + 0x3c]
add ecx, 1
mov eax, esi
mov dword [edi + 0x38], ecx
mov ecx, dword [ebp - 0x18]
adc eax, 0
mov dword [edi + 0x3c], eax
lea eax, [ebp - 0x38]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x34], esi
lea esi, [ebp - 0x38]
mov dword [ebp - 0x38], edx
push eax
lea edi, [edi + 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00598c62
mov ecx, dword [ebx + 8]
mov eax, dword [ecx]
lea ecx, [ebp - 0x38]
push ecx
movsd xmm2, qword [eax + 0x20]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x2c]
call fcn.00598c62
mov ecx, dword [ebp - 0x18]
xorps xmm1, xmm1
movsd xmm0, qword [ecx + 8]
comisd xmm1, xmm0
jbe 0x59836a
movsd xmm1, qword [0x8aa790]
xorps xmm0, xmm1
movsd qword [ecx + 8], xmm0
mov esi, dword [ecx]
mov eax, dword [esi]
mov dword [ebp - 0x1c], eax
cmp eax, esi
je 0x59836a
movsd xmm0, qword [eax + 0x20]
lea ecx, [ebp - 0x1c]
xorps xmm0, xmm1
movsd qword [eax + 0x20], xmm0
call fcn.00597bce
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jne 0x59834b
mov ecx, dword [ebp - 0x18]
mov eax, ecx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8