Function at 0x5a6eff
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x74
push ebx
mov ebx, dword [esp + 0x90]
push ebp
push esi
push edi
push ebx
call fcn.005a5063
test eax, eax
jne 0x5a71de
push dword [esp + 0x98]
call fcn.005a68b4
test eax, eax
jne 0x5a71de
imul eax, ebx, 0x68
test byte [esp + 0xa0], 7
mov ebx, dword [esp + 0xa0]
push 0
pop ecx
setne cl
mov dword [esp + 0x10], eax
shr ebx, 3
add ebx, ecx
mov edx, dword [eax + 0x7f72a0]
mov eax, dword [esp + 0x90]
mov dword [esp + 0x14], edx
cmp eax, ebx
ja 0x5a71db
add eax, 2
add eax, edx
cmp ebx, eax
jb 0x5a71db
push ebx
call fcn.0069be71
push ebx
mov ebp, eax
call fcn.0069be71
push ebx
mov dword [esp + 0x24], eax
call fcn.0069be71
mov edi, eax
push ebx
mov dword [esp + 0x30], edi
call fcn.0069be71
add esp, 0x10
mov esi, eax
mov dword [esp + 0x1c], esi
test ebp, ebp
je 0x5a71b2
cmp dword [esp + 0x18], 0
je 0x5a71ab
test edi, edi
je 0x5a71ab
test esi, esi
je 0x5a71ab
mov esi, dword [esp + 0x90]
test esi, esi
je 0x5a6ff4
imul eax, dword [esp + 0x98], 0x28
push dword [esp + 0x94]
push esi
push edi
call dword [eax + 0x7f7fac]
cmp eax, esi
je 0x5a6ff4
push 9
pop esi
jmp 0x5a7186
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x14]
call dword [eax + 0x7f72ec]
mov esi, eax
test esi, esi
jne 0x5a7186
push 8
push ebp
call fcn.005a4e5a
push 8
push ebp
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x1c]
call dword [eax + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a7186
push dword [esp + 0x8c]
lea eax, [esp + 0x28]
push dword [esp + 0x8c]
push eax
mov eax, dword [esp + 0x1c]
call dword [eax + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a7186
push dword [esp + 0x90]
lea eax, [esp + 0x28]
push edi
push eax
mov eax, dword [esp + 0x1c]
call dword [eax + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a7186
push dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
call dword [eax + 0x7f72f4]
mov esi, eax
test esi, esi
jne 0x5a7186
mov esi, ebx
sub esi, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x90]
sub eax, 2
push eax
push 0
push ebp
call fcn.0068ccc0
mov ecx, dword [esp + 0x9c]
mov eax, ebp
sub eax, dword [esp + 0x20]
sub eax, ecx
push ecx
push edi
mov byte [eax + ebx - 2], 1
dec eax
add eax, ebx
push eax
call fcn.0068b600
add esp, 0x18
lea eax, [esi - 1]
mov dword [esp + 0x10], eax
push eax
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push dword [esp + 0x28]
push dword [esp + 0xac]
call fcn.005a7760
mov esi, eax
test esi, esi
jne 0x5a7186
mov esi, dword [esp + 0x10]
test esi, esi
je 0x5a711e
mov edx, dword [esp + 0x18]
mov ecx, ebp
sub edx, ebp
mov edi, esi
mov al, byte [edx + ecx]
xor byte [ecx], al
inc ecx
sub edi, 1
jne 0x5a710f
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0xa8]
cmp dword [eax], ebx
jae 0x5a712e
push 6
pop esi
jmp 0x5a7184
mov edi, dword [esp + 0xa4]
push esi
push ebp
push edi
call fcn.0068b600
mov eax, dword [esp + 0x20]
mov esi, ebx
sub esi, eax
push eax
push dword [esp + 0x2c]
dec esi
lea eax, [esi + edi]
push eax
call fcn.0068b600
mov eax, dword [esp + 0x2c]
mov ecx, ebx
add eax, esi
shl ecx, 3
sub ecx, dword [esp + 0xb8]
add esp, 0x18
inc ecx
mov byte [eax + edi], 0xbc
mov eax, 0xff
sar eax, cl
and byte [edi], al
xor esi, esi
mov eax, dword [esp + 0xa8]
mov edi, dword [esp + 0x20]
mov dword [eax], ebx
push dword [esp + 0x1c]
call fcn.0069be6c
push edi
call fcn.0069be6c
push dword [esp + 0x20]
call fcn.0069be6c
push ebp
call fcn.0069be6c
add esp, 0x10
mov eax, esi
jmp 0x5a71de
push ebp
call fcn.0069be6c
pop ecx
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5a71c1
push eax
call fcn.0069be6c
pop ecx
test edi, edi
je 0x5a71cc
push edi
call fcn.0069be6c
pop ecx
test esi, esi
je 0x5a71d7
push esi
call fcn.0069be6c
pop ecx
push 0xd
jmp 0x5a71dd
push 0x16
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 0x24