Function at 0x1009a860
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x20]
sub esp, 0x18
cmp dword [ebp + 0x24], 0
movzx eax, byte [ecx]
push ebx
push esi
push edi
je 0x1009aa5a
movzx ebx, byte [ecx + 1]
movzx edx, byte [ecx + 4]
shl ebx, 8
or ebx, eax
mov edi, dword [ebp + 0xc]
movzx eax, byte [ecx + 2]
shl eax, 0x10
or ebx, eax
mov esi, dword [ebp + 8]
movzx eax, byte [ecx + 3]
shl eax, 0x18
or ebx, eax
movzx eax, byte [ecx + 5]
movzx ecx, byte [ecx + 7]
shl eax, 8
or edx, eax
shl ecx, 8
mov eax, dword [ebp + 0x20]
movzx eax, byte [eax + 6]
or ecx, eax
mov eax, dword [ebp + 0x10]
shl ecx, 0x10
or edx, ecx
mov dword [ebp - 8], eax
mov dword [ebp + 0x24], edx
cmp eax, 8
jb 0x1009a988
shr eax, 3
mov dword [ebp - 4], eax
movzx eax, byte [esi + 1]
movzx edx, byte [esi]
movzx ecx, byte [esi + 4]
push dword [ebp + 0x1c]
shl eax, 8
or edx, eax
movzx eax, byte [esi + 2]
push dword [ebp + 0x18]
shl eax, 0x10
push dword [ebp + 0x14]
or edx, eax
movzx eax, byte [esi + 3]
shl eax, 0x18
or edx, eax
movzx eax, byte [esi + 5]
shl eax, 8
xor edx, ebx
or ecx, eax
mov dword [ebp - 0x18], edx
movzx eax, byte [esi + 6]
shl eax, 0x10
or ecx, eax
movzx eax, byte [esi + 7]
shl eax, 0x18
add esi, 8
or ecx, eax
lea eax, [ebp - 0x18]
xor ecx, dword [ebp + 0x24]
push eax
mov dword [ebp - 0x14], ecx
call fcn.1009cd50
mov ebx, dword [ebp - 0x18]
add esp, 0x10
mov edx, dword [ebp - 0x14]
mov eax, ebx
shr eax, 8
mov byte [edi], bl
mov byte [edi + 1], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
mov byte [edi + 3], al
mov eax, edx
shr eax, 8
mov byte [edi + 5], al
mov eax, edx
shr eax, 0x10
mov byte [edi + 6], al
mov eax, edx
shr eax, 0x18
mov byte [edi + 7], al
mov eax, dword [ebp - 8]
mov byte [edi + 4], dl
sub eax, 8
add edi, 8
mov dword [ebp + 0x24], edx
sub dword [ebp - 4], 1
mov dword [ebp - 8], eax
jne 0x1009a8d4
test eax, eax
je 0x1009ac4d
mov edx, dword [ebp - 8]
add esi, eax
dec edx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], edx
cmp edx, 7
ja case.default.0x1009a9a5
jmp dword [edx*4 + 0x1009acac]
movzx ecx, byte [esi - 1]
dec esi
shl ecx, 0x18
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x10
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 8
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
or ecx, eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x18
mov dword [ebp - 4], eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 0x10
or dword [ebp - 4], eax
movzx eax, byte [esi - 1]
dec esi
shl eax, 8
or dword [ebp - 4], eax
movzx eax, byte [esi - 1]
or dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push dword [ebp + 0x1c]
xor ecx, dword [ebp + 0x24]
xor eax, ebx
push dword [ebp + 0x18]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push dword [ebp + 0x14]
mov dword [ebp - 0x14], ecx
push eax
call fcn.1009cd50
mov ebx, dword [ebp - 0x18]
add esp, 0x10
mov edx, dword [ebp - 0x14]
mov eax, ebx
shr eax, 8
mov byte [edi], bl
mov byte [edi + 1], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 2], al
mov eax, ebx
shr eax, 0x18
mov byte [edi + 3], al
mov eax, edx
shr eax, 8
mov byte [edi + 5], al
mov eax, edx
shr eax, 0x10
mov byte [edi + 6], al
mov eax, edx
shr eax, 0x18
mov byte [edi + 4], dl
mov byte [edi + 7], al
jmp 0x1009ac4d
movzx edi, byte [ecx + 1]
movzx esi, byte [ecx + 4]
shl edi, 8
or edi, eax
mov ebx, dword [ebp + 0xc]
movzx eax, byte [ecx + 2]
shl eax, 0x10
or edi, eax
movzx eax, byte [ecx + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [ecx + 5]
movzx ecx, byte [ecx + 7]
shl eax, 8
or esi, eax
shl ecx, 8
mov eax, dword [ebp + 0x20]
mov dword [ebp - 4], edi
movzx eax, byte [eax + 6]
or ecx, eax
mov eax, dword [ebp + 0x10]
shl ecx, 0x10
or esi, ecx
mov dword [ebp - 8], eax
mov dword [ebp + 0x24], esi
cmp eax, 8
jb 0x1009ab7e
mov ecx, dword [ebp + 8]
shr eax, 3
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
movzx eax, byte [ecx + 1]
movzx edi, byte [ecx]
movzx esi, byte [ecx + 4]
push dword [ebp + 0x1c]
shl eax, 8
or edi, eax
movzx eax, byte [ecx + 2]
push dword [ebp + 0x18]
shl eax, 0x10
push dword [ebp + 0x14]
or edi, eax
movzx eax, byte [ecx + 3]
shl eax, 0x18
or edi, eax
movzx eax, byte [ecx + 5]
shl eax, 8
or esi, eax
mov dword [ebp - 0x18], edi
movzx eax, byte [ecx + 6]
shl eax, 0x10
or esi, eax
movzx eax, byte [ecx + 7]
shl eax, 0x18
add ecx, 8
or esi, eax
mov dword [ebp - 0x10], ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], esi
push eax
call fcn.1009a5e0
mov ecx, dword [ebp - 0x18]
add esp, 0x10
xor ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov eax, ecx
xor edx, dword [ebp + 0x24]
shr eax, 8
mov byte [ebx], cl
mov byte [ebx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 2], al
mov eax, edx
shr eax, 8
mov byte [ebx + 5], al
mov eax, edx
shr eax, 0x10
shr ecx, 0x18
mov byte [ebx + 4], dl
mov byte [ebx + 6], al
mov eax, dword [ebp - 8]
shr edx, 0x18
sub eax, 8
mov byte [ebx + 3], cl
mov ecx, dword [ebp - 0x10]
mov byte [ebx + 7], dl
add ebx, 8
sub dword [ebp - 0xc], 1
mov dword [ebp - 4], edi
mov dword [ebp + 0x24], esi
mov dword [ebp - 8], eax
jne 0x1009aac0
mov edx, ecx
jmp 0x1009ab81
mov edx, dword [ebp + 8]
test eax, eax
je 0x1009ac47
movzx eax, byte [edx + 1]
movzx ecx, byte [edx]
push dword [ebp + 0x1c]
shl eax, 8
or ecx, eax
movzx eax, byte [edx + 2]
push dword [ebp + 0x18]
shl eax, 0x10
or ecx, eax
movzx eax, byte [edx + 3]
push dword [ebp + 0x14]
shl eax, 0x18
or ecx, eax
movzx eax, byte [edx + 5]
mov dword [ebp - 0x10], ecx
movzx ecx, byte [edx + 4]
shl eax, 8
or ecx, eax
movzx eax, byte [edx + 6]
mov dword [ebp + 0x24], ecx
movzx ecx, byte [edx + 7]
mov edx, dword [ebp + 0x24]
shl ecx, 8
or ecx, eax
mov eax, dword [ebp - 0x10]
shl ecx, 0x10
mov dword [ebp - 0x18], eax
or edx, ecx
lea eax, [ebp - 0x18]
mov dword [ebp + 0x24], edx
push eax
mov dword [ebp - 0x14], edx
call fcn.1009a5e0
mov eax, dword [ebp - 8]
add esp, 0x10
mov edx, dword [ebp - 0x18]
add ebx, eax
mov ecx, dword [ebp - 0x14]
dec eax
xor edx, edi
xor ecx, esi
cmp eax, 7
ja case.default.0x1009ac05
jmp dword [eax*4 + 0x1009accc]
dec ebx
mov eax, ecx
shr eax, 0x18
mov byte [ebx], al
dec ebx
mov eax, ecx
shr eax, 0x10
mov byte [ebx], al
dec ebx
mov eax, ecx
shr eax, 8
mov byte [ebx], al
dec ebx
mov byte [ebx], cl
dec ebx
mov eax, edx
shr eax, 0x18
mov byte [ebx], al
dec ebx
mov eax, edx
shr eax, 0x10
mov byte [ebx], al
dec ebx
mov eax, edx
shr eax, 8
mov byte [ebx], al
mov byte [ebx - 1], dl
mov ebx, dword [ebp - 0x10]
jmp 0x1009ac4a
mov ebx, dword [ebp - 4]
mov edx, dword [ebp + 0x24]
mov eax, edx
mov ecx, edx
shr eax, 0x10
mov dword [ebp - 4], eax
mov eax, edx
shr eax, 8
mov dword [ebp - 8], eax
mov eax, ebx
shr eax, 0x18
mov dword [ebp - 0xc], eax
mov eax, ebx
shr eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, ebx
shr ecx, 0x18
shr eax, 8
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x20]
pop edi
pop esi
mov byte [eax], bl
mov ebx, dword [ebp + 0x24]
mov byte [eax + 1], bl
mov ebx, dword [ebp - 0x10]
mov byte [eax + 2], bl
mov ebx, dword [ebp - 0xc]
mov byte [eax + 3], bl
mov byte [eax + 4], dl
mov edx, dword [ebp - 8]
mov byte [eax + 5], dl
mov edx, dword [ebp - 4]
mov byte [eax + 6], dl
mov byte [eax + 7], cl
pop ebx
mov esp, ebp
pop ebp
ret