Function at 0x594600
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
and dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push ebx
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
push esi
push edi
push 0
push eax
push 0x1b
push ebx
movlpd qword [ebp - 0x48], xmm0
movlpd qword [ebp - 0x50], xmm0
call fcn.0059823c
mov esi, eax
add esp, 0x10
xor eax, eax
mov dword [ebp - 0x24], esi
inc eax
mov dword [ebp - 0x3c], eax
test esi, esi
jne 0x5946b9
push dword [ebx + 0xf8]
mov edi, dword [ebp - 0xc]
push eax
push edi
call fcn.00583354
mov eax, dword [ebp - 0x44]
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
push edi
call fcn.00583ca3
pop ecx
cmp eax, 0x64
jne 0x5946b0
push 0
push edi
call fcn.005841cf
and dword [ebp - 0x38], 0
cmp dword [ebx + 0xf8], 0
pop ecx
pop ecx
mov dword [ebp - 0x34], eax
jle 0x5946ac
mov edi, dword [ebp - 0x38]
lea ecx, [ebp - 0x24]
push ecx
push edi
push eax
push ebx
call fcn.0058fe9b
xor dword [ebp - 0x18], eax
add esp, 0x10
xor dword [ebp - 0x1c], edx
inc edi
mov eax, dword [ebp - 0x34]
cmp edi, dword [ebx + 0xf8]
jl 0x594685
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0xc]
test esi, esi
je 0x59465c
push edi
call fcn.0057b713
pop ecx
jmp 0x5946c5
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x1b
push ebx
call fcn.0059823c
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x5948dd
mov eax, dword [ebx + 0x24]
push dword [ebx + 0xd8]
push str.SELECT__s
mov eax, dword [eax]
and dword [ebp - 4], esi
mov dword [ebp - 0x38], eax
call fcn.00581357
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x594711
push 7
pop esi
mov edi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x50]
jmp 0x5948d2
push 0
lea eax, [ebp - 4]
push eax
push 0
push 1
push 0xffffffffffffffff
push edi
push dword [ebx + 0xc]
call fcn.005b5d57
push edi
mov esi, eax
call fcn.0058157f
add esp, 0x20
test esi, esi
jne 0x594706
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0xc], eax
push dword [ebp - 4]
call fcn.00583ca3
pop ecx
cmp eax, 0x64
jne 0x5948cc
push 0
push dword [ebp - 4]
call fcn.005841f6
push dword [ebp - 4]
mov dword [ebp - 0x2c], eax
push ebx
mov dword [ebp - 0x28], edx
call fcn.0059b72d
xor ecx, ecx
mov dword [ebp - 0x24], eax
add esp, 0x10
mov dword [ebp - 0x14], ecx
test esi, esi
jne 0x5948cc
cmp ecx, dword [ebx + 0x18]
jge 0x5948c4
mov eax, dword [ebx + 0x20]
cmp byte [ecx + eax], 0
jne 0x5948b8
lea esi, [ecx + 1]
push esi
push dword [ebp - 4]
call fcn.0057b1b2
push esi
push dword [ebp - 4]
mov edi, eax
call fcn.00583f1e
and dword [ebp - 0x10], 0
lea ecx, [ebp - 0x10]
push ecx
push eax
push edi
push dword [ebp - 0x24]
push dword [ebx + 0x24]
call fcn.005b15c8
mov esi, eax
add esp, 0x24
test esi, esi
jne 0x59489d
mov edi, dword [ebp - 0xc]
xor eax, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x10]
call dword [eax + 0x14]
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x59489a
push dword [ebp - 0x20]
push dword [ebp - 0x14]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0xc]
push dword [ebp - 0x30]
call fcn.0058fdfd
mov esi, dword [ebp - 8]
xor edi, eax
xor eax, eax
xor esi, edx
mov edx, dword [ebx + 0xf8]
inc eax
add esp, 0x20
mov dword [ebp - 8], esi
mov dword [ebp - 0x4c], edx
mov ecx, eax
mov dword [ebp - 0x34], ecx
cmp edx, eax
jle 0x5947d1
mov eax, dword [ebx + 0xfc]
mov ebx, dword [ebp - 0x14]
add eax, 0x18
mov dword [ebp - 8], eax
mov edx, dword [eax]
cmp edx, dword [ebp - 0xc]
jg 0x594880
push dword [ebp - 0x20]
push ebx
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push ecx
push dword [ebp - 0x24]
push edx
push dword [ebp - 0x30]
call fcn.0058fdfd
mov ecx, dword [ebp - 0x34]
xor edi, eax
mov eax, dword [ebp - 8]
add esp, 0x20
xor esi, edx
inc ecx
add eax, 0x18
mov dword [ebp - 0x34], ecx
mov dword [ebp - 8], eax
cmp ecx, dword [ebp - 0x4c]
jl 0x594855
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], esi
jmp 0x5947d1
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0x10], 0
je 0x5948ad
mov eax, dword [ebp - 0x38]
push dword [ebp - 0x10]
call dword [eax + 0x10]
pop ecx
mov ecx, dword [ebp - 0x14]
xor eax, eax
cmp esi, 0x65
cmove esi, eax
inc ecx
mov dword [ebp - 0x14], ecx
test esi, esi
je 0x59477f
test esi, esi
je 0x594741
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.0057b6c7
pop ecx
jmp 0x5948e3
mov edi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x50]
cmp dword [ebp - 0x18], ebx
jne 0x5948ed
cmp dword [ebp - 0x1c], edi
je 0x5948f1
and dword [ebp - 0x3c], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x3c]
pop edi
mov dword [eax], ecx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret