Function at 0x598da6
Capabilities:
Encode data using xor

Disassembly:
push 8
mov eax, 0x80b6b2
call fcn.007ed2dc
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.00798224
mov edi, eax
pop ecx
mov dword [ebp - 0x18], edi
xor eax, eax
mov dword [ebp - 4], eax
movsd xmm0, qword [esi + 0x18]
movsd qword [ebp - 0x30], xmm0
mov dword [edi], eax
mov dword [edi + 4], eax
call fcn.0059aa17
movsd xmm0, qword [ebp - 0x30]
or dword [ebp - 4], 0xffffffff
mov dword [edi], eax
movsd qword [edi + 8], xmm0
mov edi, dword [esi + 0xc]
mov esi, dword [esi + 8]
cmp esi, edi
je 0x598e94
movsd xmm1, qword [0x8adf00]
movsd xmm0, qword [esi + 8]
xorps xmm0, xmmword [0x8aec10]
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 0x598e89
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.00598d0f
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [eax + 8]
call fcn.00599373
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 0x598e78
push dword [eax + 0x20]
call fcn.00599f54
jmp 0x598e81
lea eax, [ebp - 0x48]
push eax
call fcn.005999e2
movsd xmm1, qword [0x8adf00]
add esi, 0x10
cmp esi, edi
jne 0x598e0c
mov eax, dword [ebx + 8]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x28]
test eax, eax
js 0x599071
cmp eax, 1
jle 0x598f9f
cmp eax, 2
jne 0x599071
mov edx, dword [ebp - 0x14]
movsd xmm0, qword [0x8754f8]
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 0x598f74
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 [0x8ae558]
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.005999e2
movsd xmm2, qword [0x8ae140]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
push eax
call fcn.005999e2
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.005999e2
mov eax, dword [edi]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [esi + 0x2c]
movsd xmm2, qword [eax + 0x20]
jmp 0x59906c
movsd xmm2, qword [0x8ae140]
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 0x59906c
test eax, eax
jne 0x598fad
movsd xmm0, qword [0x8ae140]
jmp 0x598fb5
movsd xmm0, qword [0x8ae558]
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.005999e2
mov ecx, dword [ebx + 8]
movsd xmm0, qword [0x8754f8]
mov eax, dword [ecx]
comisd xmm0, xmmword [eax + 0x20]
jbe 0x599071
mov edi, dword [ebp - 0x14]
movsd xmm2, qword [ebp - 0x20]
xorps xmm2, xmmword [0x8aec10]
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.005999e2
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.005999e2
mov ecx, dword [ebp - 0x18]
xorps xmm1, xmm1
movsd xmm0, qword [ecx + 8]
comisd xmm1, xmm0
jbe 0x5990bc
movsd xmm1, qword [0x8aec10]
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 0x5990bc
movsd xmm0, qword [eax + 0x20]
lea ecx, [ebp - 0x1c]
xorps xmm0, xmm1
movsd qword [eax + 0x20], xmm0
call fcn.005987ea
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jne 0x59909d
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