Function at 0x1005bd60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
cmp dword [esp + 0x24], 0
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov edi, ecx
mov esi, edx
je 0x1005bfbe
movzx edx, byte [ebp]
movzx ecx, byte [ebp + 1]
inc ebp
shl ecx, 8
or edx, ecx
movzx ecx, byte [ebp + 1]
inc ebp
shl ecx, 0x10
or edx, ecx
movzx ecx, byte [ebp + 1]
inc ebp
shl ecx, 0x18
inc ebp
movzx ebx, byte [ebp + 1]
or edx, ecx
movzx ecx, byte [ebp]
inc ebp
shl ebx, 8
or ecx, ebx
movzx ebx, byte [ebp + 1]
inc ebp
shl ebx, 0x10
or ecx, ebx
movzx ebx, byte [ebp + 1]
inc ebp
shl ebx, 0x18
or ecx, ebx
lea ebx, [eax - 8]
sub ebp, 7
mov dword [esp + 0x34], ecx
test ebx, ebx
jl 0x1005be9b
lea eax, [ebx + 8]
shr eax, 3
mov dword [esp + 0x18], eax
neg eax
lea eax, [ebx + eax*8]
mov dword [esp + 0x14], eax
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 8
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 0x10
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl ecx, 0x18
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
movzx ebx, byte [esi + 1]
inc esi
shl ebx, 8
or ecx, ebx
movzx ebx, byte [esi + 1]
inc esi
shl ebx, 0x10
or ecx, ebx
movzx ebx, byte [esi + 1]
inc esi
xor eax, edx
mov edx, dword [esp + 0x2c]
shl ebx, 0x18
or ecx, ebx
xor ecx, dword [esp + 0x34]
mov dword [esp + 0x20], eax
push edx
lea eax, [esp + 0x24]
push eax
inc esi
mov dword [esp + 0x2c], ecx
call fcn.1005c250
mov eax, dword [esp + 0x28]
mov byte [edi], al
inc edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
inc edi
mov ecx, eax
inc edi
shr ecx, 0x10
mov byte [edi - 1], cl
mov edx, eax
shr eax, 0x18
mov byte [edi], al
mov eax, dword [esp + 0x2c]
inc edi
mov byte [edi], al
inc edi
mov ebx, eax
shr ebx, 8
mov byte [edi], bl
inc edi
mov ebx, eax
shr ebx, 0x10
mov byte [edi], bl
mov ecx, eax
inc edi
shr eax, 0x18
mov byte [edi], al
add esp, 8
inc edi
sub dword [esp + 0x18], 1
mov dword [esp + 0x34], ecx
jne 0x1005bde4
mov ebx, dword [esp + 0x14]
cmp ebx, 0xfffffff8
je 0x1005bf9d
lea esi, [esi + ebx + 8]
add ebx, 7
xor eax, eax
mov dword [esp + 0x34], 0
cmp ebx, 7
ja case.default.0x1005bebe
jmp dword [ebx*4 + 0x1005c20c]
movzx eax, byte [esi - 1]
dec esi
movzx ebx, byte [esi - 1]
dec esi
shl ebx, 0x10
shl eax, 0x18
or eax, ebx
movzx ebx, byte [esi - 1]
dec esi
shl ebx, 8
or eax, ebx
jmp 0x1005bf11
movzx ebx, byte [esi - 1]
mov eax, dword [esp + 0x34]
dec esi
shl ebx, 0x10
or eax, ebx
movzx ebx, byte [esi - 1]
dec esi
shl ebx, 8
or eax, ebx
jmp 0x1005bf11
movzx ebx, byte [esi - 1]
mov eax, dword [esp + 0x34]
dec esi
shl ebx, 8
or eax, ebx
jmp 0x1005bf11
mov eax, dword [esp + 0x34]
movzx ebx, byte [esi - 1]
dec esi
or eax, ebx
mov dword [esp + 0x34], eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x18
movzx ebx, byte [esi - 1]
dec esi
shl ebx, 0x10
or eax, ebx
movzx ebx, byte [esi - 1]
dec esi
shl ebx, 8
or eax, ebx
movzx esi, byte [esi - 1]
or eax, esi
xor eax, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x34]
xor eax, ecx
mov dword [esp + 0x24], eax
push edx
lea eax, [esp + 0x24]
push eax
call fcn.1005c250
mov eax, dword [esp + 0x28]
mov byte [edi], al
inc edi
mov ecx, eax
shr ecx, 8
mov byte [edi], cl
inc edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
inc edi
mov edx, eax
shr eax, 0x18
mov byte [edi], al
mov eax, dword [esp + 0x2c]
inc edi
mov byte [edi], al
mov ebx, eax
shr ebx, 8
inc edi
mov byte [edi], bl
mov ebx, eax
inc edi
shr ebx, 0x10
add esp, 8
mov ecx, eax
shr eax, 0x18
mov byte [edi], bl
mov byte [edi + 1], al
mov byte [ebp], dl
inc ebp
mov eax, edx
shr eax, 8
mov byte [ebp], al
mov eax, edx
inc ebp
shr eax, 0x10
mov byte [ebp], al
inc ebp
shr edx, 0x18
mov byte [ebp], dl
jmp 0x1005c1e6
movzx ebx, byte [ebp]
movzx ecx, byte [ebp + 1]
inc ebp
movzx edx, byte [ebp + 1]
inc ebp
shl ecx, 8
or ebx, ecx
movzx ecx, byte [ebp + 1]
inc ebp
shl edx, 0x10
or ebx, edx
shl ecx, 0x18
inc ebp
movzx edx, byte [ebp + 1]
or ebx, ecx
movzx ecx, byte [ebp]
inc ebp
shl edx, 8
or ecx, edx
movzx edx, byte [ebp + 1]
inc ebp
shl edx, 0x10
or ecx, edx
movzx edx, byte [ebp + 1]
inc ebp
shl edx, 0x18
or ecx, edx
sub ebp, 7
add eax, 0xfffffff8
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
js 0x1005c0f6
lea ecx, [eax + 8]
shr ecx, 3
mov dword [esp + 0x1c], ecx
neg ecx
lea eax, [eax + ecx*8]
mov dword [esp + 0x14], eax
lea ebx, [ebx]
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
shl ecx, 8
or eax, ecx
movzx ecx, byte [esi + 1]
inc esi
shl edx, 0x10
or eax, edx
shl ecx, 0x18
or eax, ecx
mov dword [esp + 0x18], eax
inc esi
movzx edx, byte [esi + 1]
mov dword [esp + 0x20], eax
movzx eax, byte [esi]
inc esi
movzx ecx, byte [esi + 1]
inc esi
shl edx, 8
or eax, edx
movzx edx, byte [esi + 1]
inc esi
shl ecx, 0x10
or eax, ecx
shl edx, 0x18
or eax, edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x24]
push ecx
inc esi
call fcn.1005c380
mov ecx, dword [esp + 0x18]
xor ecx, dword [esp + 0x2c]
mov eax, ebx
xor eax, dword [esp + 0x28]
inc edi
mov byte [edi - 1], al
mov ebx, dword [esp + 0x20]
mov edx, eax
shr edx, 8
mov byte [edi], dl
inc edi
mov edx, eax
shr edx, 0x10
mov byte [edi], dl
inc edi
shr eax, 0x18
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov eax, ecx
shr eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x3c]
inc edi
mov edx, ecx
shr edx, 0x10
mov byte [edi], dl
inc edi
shr ecx, 0x18
mov byte [edi], cl
add esp, 8
inc edi
sub dword [esp + 0x1c], 1
mov dword [esp + 0x10], eax
jne 0x1005c030
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp eax, 0xfffffff8
je 0x1005c1ca
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
shl ecx, 8
or eax, ecx
inc esi
movzx ecx, byte [esi + 1]
inc esi
shl edx, 0x10
or eax, edx
shl ecx, 0x18
or eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], eax
movzx eax, byte [esi + 1]
inc esi
movzx edx, byte [esi + 1]
inc esi
movzx ecx, byte [esi + 2]
shl edx, 8
inc esi
or eax, edx
movzx edx, byte [esi]
shl ecx, 8
or ecx, edx
shl ecx, 0x10
or eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.1005c380
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
xor ebx, dword [esp + 0x28]
xor eax, dword [esp + 0x2c]
lea edi, [edi + ecx + 8]
add ecx, 7
add esp, 8
cmp ecx, 7
ja case.default.0x1005c17f
jmp dword [ecx*4 + 0x1005c22c]
dec edi
mov edx, eax
shr edx, 0x18
mov byte [edi], dl
dec edi
mov ecx, eax
shr ecx, 0x10
mov byte [edi], cl
dec edi
mov edx, eax
shr edx, 8
mov byte [edi], dl
dec edi
mov byte [edi], al
dec edi
mov eax, ebx
shr eax, 0x18
mov byte [edi], al
dec edi
mov ecx, ebx
shr ecx, 0x10
mov byte [edi], cl
dec edi
mov edx, ebx
shr edx, 8
mov byte [edi], dl
mov byte [edi - 1], bl
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov ecx, eax
mov byte [ebp], bl
inc ebp
mov edx, ebx
shr edx, 8
mov byte [ebp], dl
mov eax, ebx
inc ebp
shr eax, 0x10
mov byte [ebp], al
inc ebp
shr ebx, 0x18
mov byte [ebp], bl
inc ebp
mov byte [ebp], cl
mov edx, ecx
inc ebp
shr edx, 8
mov byte [ebp], dl
mov eax, ecx
inc ebp
pop edi
shr eax, 0x10
mov byte [ebp], al
shr ecx, 0x18
pop esi
mov byte [ebp + 1], cl
pop ebp
pop ebx
add esp, 0x18
ret