Function at 0x5a55de
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x20]
sub esp, 0x78
and dword [eax], 0
push ebx
mov ebx, dword [esp + 0x94]
push ebp
push edi
push ebx
call fcn.005a5063
test eax, eax
jne 0x5a5893
push esi
mov esi, dword [esp + 0xa4]
imul eax, ebx, 0x68
test byte [esp + 0xa4], 7
push 0
pop ecx
setne cl
shr esi, 3
mov dword [esp + 0x14], eax
add esi, ecx
mov edx, dword [eax + 0x7f72a0]
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x18], edx
cmp eax, esi
ja 0x5a588f
add eax, 2
add eax, edx
cmp esi, eax
jb 0x5a588f
cmp dword [esp + 0x98], esi
jne 0x5a588f
push esi
call fcn.0069be71
push esi
mov ebx, eax
call fcn.0069be71
push esi
mov edi, eax
call fcn.0069be71
push esi
mov dword [esp + 0x2c], eax
call fcn.0069be71
add esp, 0x10
mov ebp, eax
mov dword [esp + 0x10], ebp
test ebx, ebx
je 0x5a5864
test edi, edi
je 0x5a585d
cmp dword [esp + 0x1c], 0
je 0x5a585d
test ebp, ebp
je 0x5a585d
mov eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x94]
cmp byte [ecx + eax - 1], 0xbc
je 0x5a56be
push 7
pop esi
jmp 0x5a5836
mov eax, esi
sub eax, dword [esp + 0x18]
mov dword [esp + 0x20], eax
dec eax
push eax
push ecx
push ebx
call fcn.0068b600
mov ecx, dword [esp + 0x24]
mov eax, esi
push ecx
sub eax, ecx
mov ecx, dword [esp + 0xa4]
dec ecx
add eax, ecx
push eax
push ebp
call fcn.0068b600
mov ecx, esi
add esp, 0x18
shl ecx, 3
mov eax, 0xff
sub ecx, dword [esp + 0xa4]
inc ecx
sar eax, cl
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x24], eax
not eax
test byte [ecx], al
jne 0x5a56b6
mov ebp, dword [esp + 0x20]
dec ebp
push ebp
push edi
push dword [esp + 0x20]
push dword [esp + 0x1c]
push dword [esp + 0xb0]
call fcn.005a7760
mov esi, eax
test esi, esi
jne 0x5a5832
test ebp, ebp
je 0x5a574d
mov edx, edi
mov ecx, ebx
sub edx, ebx
mov al, byte [edx + ecx]
xor byte [ecx], al
inc ecx
sub ebp, 1
jne 0x5a5742
mov eax, dword [esp + 0x24]
xor ebp, ebp
and byte [ebx], al
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x9c]
add eax, 0xfffffffe
je 0x5a5774
cmp byte [ebx + ebp], 0
jne 0x5a5858
inc ebp
cmp ebp, eax
jb 0x5a5765
cmp byte [ebx + ebp], 1
jne 0x5a5858
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
call dword [eax + 0x7f72ec]
mov esi, eax
test esi, esi
jne 0x5a5832
push 8
push edi
call fcn.005a4e5a
push 8
push edi
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x20]
call dword [eax + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a5832
push dword [esp + 0x90]
lea eax, [esp + 0x2c]
push dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x20]
call dword [eax + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a5832
push dword [esp + 0x9c]
lea eax, [ebx + 1]
add eax, ebp
mov ebp, dword [esp + 0x18]
push eax
lea eax, [esp + 0x30]
push eax
call dword [ebp + 0x7f72f0]
mov esi, eax
test esi, esi
jne 0x5a5832
push edi
lea eax, [esp + 0x2c]
push eax
call dword [ebp + 0x7f72f4]
mov esi, eax
test esi, esi
jne 0x5a5832
push dword [esp + 0x18]
push dword [esp + 0x14]
push edi
call fcn.0068bdae
add esp, 0xc
test eax, eax
jne 0x5a5830
mov eax, dword [esp + 0xa8]
mov dword [eax], 1
xor esi, esi
mov ebp, dword [esp + 0x10]
push ebp
call fcn.0069be6c
push dword [esp + 0x20]
call fcn.0069be6c
push edi
call fcn.0069be6c
push ebx
call fcn.0069be6c
add esp, 0x10
mov eax, esi
jmp 0x5a5892
push 7
pop esi
jmp 0x5a5832
push ebx
call fcn.0069be6c
pop ecx
test edi, edi
je 0x5a586f
push edi
call fcn.0069be6c
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5a587e
push eax
call fcn.0069be6c
pop ecx
mov eax, ebp
test eax, eax
je 0x5a588b
push eax
call fcn.0069be6c
pop ecx
push 0xd
jmp 0x5a5891
push 0x16
pop eax
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x78
ret 0x20