Function at 0x1008de20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
xor ecx, ecx
cmp eax, ecx
push esi
push edi
je 0x1008e082
test al, 7
jne 0x1008e082
mov edi, dword [ebp + 8]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0x14]
cmp ecx, 1
jne 0x1008df2a
cmp eax, 8
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x1008e074
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff9
shr eax, 3
mov dword [esp + 0xc], eax
mov edi, edi
lea eax, [esp + 0x10]
push eax
push edi
call fcn.1008db80
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add esp, 8
lea eax, [esp + 0x10]
mov dword [esp + 0x20], ecx
push eax
mov ecx, ebx
mov dword [esp + 0x28], edx
call fcn.1008d7f0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
xor eax, ecx
mov ecx, dword [esp + 0x14]
xor ecx, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
add esi, 8
mov dword [esp + 0x1c], edx
mov byte [esi + 6], cl
mov edx, ecx
shr edx, 8
mov byte [esi + 5], dl
mov edx, ecx
shr edx, 0x10
mov byte [esi + 4], dl
mov dword [esp + 0x14], ecx
shr ecx, 0x18
mov byte [esi + 3], cl
mov ecx, eax
mov byte [esi + 2], al
mov edx, eax
mov dword [esp + 0x10], eax
shr ecx, 8
shr edx, 0x10
shr eax, 0x18
mov byte [esi + 1], cl
mov byte [esi], dl
mov byte [esi - 1], al
mov eax, dword [esp + 0xc]
add edi, 8
dec eax
mov dword [esp + 0xc], eax
jne 0x1008de80
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp ecx, 2
jne 0x1008dff9
cmp eax, 8
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x1008e074
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff9
shr eax, 3
mov dword [esp + 0xc], eax
lea eax, [esp + 0x10]
push eax
push edi
call fcn.1008db80
add esp, 8
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebx
call fcn.1008d460
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
xor eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
xor ecx, edx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
add esi, 8
mov dword [esp + 0x1c], edx
mov byte [esi + 6], cl
mov edx, ecx
shr edx, 8
mov byte [esi + 5], dl
mov edx, ecx
shr edx, 0x10
mov byte [esi + 4], dl
mov dword [esp + 0x14], ecx
shr ecx, 0x18
mov byte [esi + 3], cl
mov ecx, eax
mov byte [esi + 2], al
mov edx, eax
mov dword [esp + 0x10], eax
shr ecx, 8
shr edx, 0x10
shr eax, 0x18
mov byte [esi + 1], cl
mov byte [esi], dl
mov byte [esi - 1], al
mov eax, dword [esp + 0xc]
add edi, 8
dec eax
mov dword [esp + 0xc], eax
jne 0x1008df57
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 8
jb 0x1008e074
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff9
shr eax, 3
mov dword [esp + 0xc], eax
jmp 0x1008e010
lea eax, [esp + 0x10]
push eax
push edi
call fcn.1008db80
add esp, 8
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebx
call fcn.1008d7f0
mov eax, dword [esp + 0x14]
mov byte [esi + 0xe], al
add esi, 8
mov edx, eax
mov ecx, eax
shr edx, 8
mov byte [esi + 5], dl
shr ecx, 0x10
mov byte [esi + 4], cl
shr eax, 0x18
mov byte [esi + 3], al
mov eax, dword [esp + 0x10]
mov edx, eax
mov byte [esi + 2], al
mov ecx, eax
shr edx, 8
shr ecx, 0x10
shr eax, 0x18
mov byte [esi + 1], dl
mov byte [esi], cl
mov byte [esi - 1], al
mov eax, dword [esp + 0xc]
add edi, 8
dec eax
mov dword [esp + 0xc], eax
jne 0x1008e010
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10