Function at 0x5b8290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp dword [ebp + 0x14], 1
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
jne 0x5b82bd
cmp dword [edi + 0xa4], 0
jne 0x5b8560
mov ecx, dword [edi + 4]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x14], ecx
lea ebx, [ecx - 3]
test esi, esi
je 0x5b8317
push esi
call fcn.0059aeb0
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
je 0x5b8560
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
call fcn.0059e640
add esp, 0xc
test eax, eax
jne 0x5b8560
push dword [ebp - 0xc]
mov eax, 0xfffffff6
sub eax, dword [ebp - 4]
add ebx, eax
call fcn.0059b0a0
mov ecx, dword [ebp - 0x14]
add esp, 4
movzx eax, al
jmp 0x5b831a
mov eax, dword [ebp + 0x1c]
sub ebx, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ebx
cmp ebx, 8
jb 0x5b8560
cmp ebx, ecx
ja 0x5b8560
mov ebx, dword [ebp + 0x24]
push dword [ebp - 0xc]
lea esi, [ebx + 1]
push 0xff
mov byte [ebx], 0
mov byte [esi], 1
inc esi
push esi
call fcn.005c9220
add esi, dword [ebp - 0xc]
add esp, 0xc
mov byte [esi], 0
inc esi
cmp dword [ebp + 0x18], 0
jne 0x5b836f
push dword [ebp - 8]
push dword [ebp + 0x20]
push esi
call fcn.005c9900
add esp, 0xc
jmp 0x5b83c4
mov al, byte [ebp - 8]
mov byte [esi], 0x30
add al, 8
add al, byte [ebp - 4]
mov byte [esi + 1], al
mov byte [esi + 2], 0x30
mov al, byte [ebp - 4]
add al, 4
mov byte [esi + 3], al
mov byte [esi + 4], 6
mov al, byte [ebp - 4]
mov byte [esi + 5], al
add esi, 6
push dword [ebp - 4]
push dword [ebp - 0x10]
push esi
call fcn.005c9900
add esi, dword [ebp - 4]
mov eax, dword [ebp - 8]
push eax
push dword [ebp + 0x20]
mov word [esi], 5
mov byte [esi + 2], 4
mov byte [esi + 3], al
add esi, 4
push esi
call fcn.005c9900
add esp, 0x18
cmp dword [ebp + 0x14], 0
jne 0x5b83dc
push ebx
push ebx
push edi
call fcn.005b72c0
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [edi + 4]
push 1
call fcn.005d9af7
mov ebx, eax
add esp, 8
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x5b840f
push dword [edi + 4]
push 1
call fcn.005d9af7
add esp, 8
mov dword [ebp - 8], eax
push ebx
test eax, eax
jne 0x5b841b
call fcn.005d1ed0
add esp, 4
pop edi
pop esi
mov eax, 0xfffffff0
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x24]
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.005b73a0
add esp, 0x14
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x5b8543
push dword [ebp - 8]
push ebx
push edi
call fcn.005b72c0
add esp, 0xc
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x5b8543
mov edx, dword [edi + 4]
xor bl, bl
test edx, edx
je 0x5b8523
cmp edx, 0x20
jb 0x5b84fb
mov ebx, dword [ebp - 8]
mov ecx, edx
mov edi, ebx
and ecx, 0xffffffe0
sub edi, esi
mov dword [ebp - 0x14], ecx
add ebx, 0x10
mov dword [ebp - 0x18], edi
mov edi, dword [ebp + 8]
mov ecx, esi
mov esi, dword [ebp - 0x18]
xorps xmm3, xmm3
mov dword [ebp - 0x1c], ebx
xorps xmm2, xmm2
mov ebx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
movups xmm0, xmmword [ecx]
lea ecx, [ecx + 0x20]
movups xmm1, xmmword [esi + ecx - 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [ecx - 0x10]
por xmm3, xmm1
movups xmm1, xmmword [edx + eax]
add eax, 0x20
pxor xmm1, xmm0
por xmm2, xmm1
cmp eax, ebx
jb 0x5b8493
mov edx, dword [edi + 4]
por xmm2, xmm3
mov esi, dword [ebp + 0x24]
movaps xmm0, xmm2
psrldq xmm0, 8
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 4
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 2
por xmm2, xmm0
movups xmm0, xmm2
psrldq xmm0, 1
por xmm2, xmm0
movd ebx, xmm2
cmp eax, edx
jae 0x5b8523
mov edi, dword [ebp - 8]
lea ecx, [eax + esi]
sub edi, esi
sub edx, eax
nop dword [eax]
mov al, byte [ecx + edi]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
or bl, al
sub edx, 1
jne 0x5b8510
mov edi, dword [ebp + 8]
mov byte [ebp + 0x27], bl
cmp byte [ebp + 0x27], 0
mov ebx, dword [ebp - 0xc]
je 0x5b8536
mov esi, 0xffffbd00
jmp 0x5b8546
push dword [edi + 4]
push ebx
push esi
call fcn.005c9900
add esp, 0xc
mov esi, dword [ebp + 0x14]
push ebx
call fcn.005d1ed0
push dword [ebp - 8]
call fcn.005d1ed0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffbf80
pop ebx
mov esp, ebp
pop ebp
ret