Function at 0x1005c8e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov eax, dword [0x1010d170]
xor eax, esp
mov dword [esp + 0x28], eax
mov al, byte [esi]
push ebx
push ebp
push edi
mov ebx, ecx
mov ecx, dword [esi + 0x28]
mov edi, edx
mov edx, dword [esi + 0x2c]
mov byte [esp + 0xf], al
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
test al, 0x40
jne 0x1005c91c
push edx
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov al, byte [esp + 0x1b]
add esp, 0xc
movzx eax, al
and eax, 7
mov edx, 0xf
sub edx, eax
mov byte [esi], al
mov eax, edx
xor ecx, ecx
mov dword [esp + 0x1c], edx
cmp eax, 0xf
jae 0x1005c953
jmp 0x1005c940
movzx ebp, byte [esi + eax]
or ecx, ebp
mov byte [esi + eax], 0
inc eax
shl ecx, 8
cmp eax, 0xf
jb 0x1005c940
movzx eax, byte [esi + 0xf]
or ecx, eax
mov eax, dword [esp + 0x3c]
mov byte [esi + 0xf], 1
cmp ecx, eax
je 0x1005c97a
or eax, 0xffffffff
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.100ae60d
add esp, 0x2c
ret
cmp eax, 0x10
jb 0x1005ca21
shr eax, 4
lea ebp, [esi + 0x10]
mov dword [esp + 0x18], eax
lea ecx, [ecx]
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
call dword [esp + 0x1c]
add esp, 0xc
mov eax, 8
mov cl, byte [eax + esi + 7]
dec eax
add cl, 1
mov byte [eax + esi + 8], cl
jne 0x1005c9b9
test eax, eax
jne 0x1005c9a7
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
xor eax, dword [esp + 0x20]
xor ecx, dword [esp + 0x24]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov edx, eax
xor dword [ebp], edx
mov eax, dword [edi + 4]
xor dword [ebp + 4], eax
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
xor edx, dword [esp + 0x2c]
xor ecx, dword [esp + 0x28]
mov dword [edi + 0xc], edx
mov edx, dword [esp + 0x14]
mov dword [edi + 8], ecx
mov eax, ecx
xor dword [esi + 0x18], eax
mov ecx, dword [edi + 0xc]
xor dword [esi + 0x1c], ecx
push edx
push ebp
push ebp
call dword [esp + 0x1c]
sub dword [esp + 0x48], 0x10
add esp, 0xc
add ebx, 0x10
add edi, 0x10
sub dword [esp + 0x18], 1
jne 0x1005c990
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
test eax, eax
je 0x1005ca7a
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [esp + 0x1c]
mov ebp, dword [esp + 0x48]
add esp, 0xc
xor eax, eax
test ebp, ebp
jbe 0x1005ca65
lea edx, [esp + 0x20]
mov ecx, edx
sub ebx, edx
sub edi, ecx
jmp 0x1005ca50
lea edx, [esp + eax + 0x20]
mov cl, byte [ebx + edx]
xor cl, byte [edx]
inc eax
mov byte [edi + edx], cl
xor byte [esi + eax + 0xf], cl
cmp eax, ebp
jb 0x1005ca50
mov edx, dword [esp + 0x14]
lea eax, [esi + 0x10]
push edx
push eax
push eax
call dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
add esp, 0xc
cmp edx, 0x10
jae 0x1005ca95
mov ecx, 0x10
sub ecx, edx
push ecx
lea eax, [esi + edx]
push 0
push eax
call fcn.100b34b0
add esp, 0xc
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x24]
push eax
push esi
call dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
xor dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
xor dword [esi + 0x1c], ecx
xor dword [esi + 0x14], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
xor dword [esi + 0x18], eax
mov dl, byte [esp + 0x1b]
add esp, 0xc
pop edi
pop ebp
pop ebx
xor ecx, esp
mov byte [esi], dl
xor eax, eax
call fcn.100ae60d
add esp, 0x2c
ret