Function at 0x593a10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov esi, dword [esp + 0x4c]
mov ebp, dword [esp + 0x44]
mov eax, dword [0x87aa4c]
xor eax, esp
mov dword [esp + 0x2c], eax
call fcn.00596470
test ebp, ebp
sete dl
cmp esi, 0x11
setb cl
xor edi, edi
or cl, dl
jne 0x593cbb
mov dword [esp + 4], eax
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
mov edi, esi
and edi, 0xf
cmp esi, 0x20
jb 0x593a95
mov ebp, ebx
mov ebx, esi
and ebx, 0xfffffff0
lea ecx, [ebx - 0x10]
mov dword [esp], ecx
mov esi, eax
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0x18]
call dword [0x834360]
push ebp
push dword [esp + 4]
push esi
push dword [esp + 0x50]
call ecx
add esp, 0x10
add esi, ebx
add esi, 0xfffffff0
add ebx, ebp
add ebx, 0xfffffff0
mov ebp, dword [esp + 0x44]
jmp 0x593a97
mov esi, eax
movups xmm0, xmmword [ebp + 0x28]
movups xmm1, xmmword [esi]
xorps xmm1, xmm0
movups xmmword [esp + 0x1c], xmm1
mov ecx, dword [ebp + 0x10]
call dword [0x834360]
lea eax, [esp + 0x1c]
push eax
push eax
push ebp
call ecx
add esp, 0xc
test edi, edi
je 0x593b7b
add esi, 0x10
mov dword [esp], esi
mov eax, dword [0x855090]
mov ecx, dword [0x855080]
mov esi, 0xffffe9e2
sub esi, dword [esp + 4]
sub ecx, esi
add ecx, eax
call dword [0x834360]
lea eax, [esp + 0xc]
push edi
push dword [esp + 4]
push eax
call ecx
add esp, 0xc
mov dword [esp + 4], ebx
add ebx, 0x10
mov eax, dword [0x855090]
mov ecx, dword [0x855080]
mov dword [esp], esi
sub ecx, esi
add ecx, eax
call dword [0x834360]
push edi
lea eax, [esp + 0x20]
push eax
push ebx
call ecx
add esp, 0xc
mov eax, dword [esp + 0x4c]
and eax, 3
add eax, dword [0x889b1c]
xor edx, edx
cmp edi, 4
jb 0x593b4f
sub edi, eax
xor edx, edx
nop dword [eax]
mov ecx, dword [esp + edx + 0xc]
xor dword [esp + edx + 0x1c], ecx
add edx, 4
cmp edi, edx
jne 0x593b40
lea ecx, [ebp + 0x28]
mov dword [esp + 8], ecx
test eax, eax
je 0x593c7c
test byte [0x889bec], 1
jne 0x593c7c
xor ecx, ecx
cmp eax, 8
jae 0x593bc9
mov ebx, edx
xor esi, esi
jmp 0x593c5b
lea edi, [ebx - 0x10]
mov eax, dword [0x855090]
mov ecx, dword [0x855080]
mov esi, ebx
mov ebx, 0xffffe9e2
sub ebx, dword [esp + 4]
sub ecx, ebx
add ecx, eax
call dword [0x834360]
push 0x10
push edi
push esi
call ecx
add esp, 0xc
mov eax, dword [0x855090]
mov ecx, dword [0x855080]
sub ecx, ebx
add ecx, eax
call dword [0x834360]
push 0x10
lea eax, [esp + 0x20]
push eax
push edi
jmp 0x593cb2
xor esi, esi
cmp eax, 0x10
jae 0x593c14
mov edi, esi
mov esi, eax
and esi, 0xfffffff8
lea ebx, [edx + esi]
lea ebp, [esp + edx]
add ebp, 0x1c
add edx, esp
add edx, 0xc
nop word cs:[eax + eax]
movsd xmm0, qword [ebp + edi]
movsd xmm1, qword [edx + edi]
xorps xmm1, xmm0
movlps qword [ebp + edi], xmm1
add edi, 8
cmp esi, edi
jne 0x593bf0
cmp eax, esi
mov ebp, dword [esp + 0x44]
jne 0x593c5b
jmp 0x593c7c
mov esi, eax
and esi, 0xfffffff0
lea edi, [esp + edx]
add edi, 0x1c
lea ebp, [esp + edx]
add ebp, 0xc
xor ebx, ebx
nop word [eax + eax]
movups xmm0, xmmword [edi + ebx]
movups xmm1, xmmword [ebp + ebx]
xorps xmm1, xmm0
movups xmmword [edi + ebx], xmm1
add ebx, 0x10
cmp esi, ebx
jne 0x593c30
cmp eax, esi
mov ebp, dword [esp + 0x44]
je 0x593c7c
test al, 8
jne 0x593bd0
add edx, esi
mov ebx, edx
lea edx, [esp + ebx]
add edx, 0xc
lea edi, [esp + ebx]
add edi, 0x1c
sub eax, esi
nop dword [eax]
movzx ebx, byte [edx + ecx]
xor byte [edi + ecx], bl
inc ecx
cmp eax, ecx
jne 0x593c70
mov ecx, dword [ebp + 0x10]
call dword [0x834360]
mov esi, dword [esp + 8]
push esi
lea eax, [esp + 0x20]
push eax
push ebp
call ecx
add esp, 0xc
mov eax, dword [0x855090]
mov ecx, dword [0x855080]
sub ecx, dword [esp]
add ecx, eax
call dword [0x834360]
push 0x10
push esi
push dword [esp + 0xc]
call ecx
add esp, 0xc
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.00719989
mov eax, edi
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret