Function at 0x1001cfc0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
push esi
mov esi, dword [esp + 0x30]
push edi
test esi, esi
jne 0x1001cfe5
push 0xde
push 0x10036b40
push 0x10036b5c
call fcn.100294b0
add esp, 0xc
mov ebx, dword [esp + 0x40]
test ebx, ebx
jne 0x1001d004
push 0xdf
push 0x10036b68
push 0x10036b84
call fcn.100294b0
add esp, 0xc
mov ecx, dword [esp + 0x38]
cmp ecx, 0x10
je 0x1001d023
cmp ecx, 0x18
je 0x1001d023
cmp ecx, 0x20
je 0x1001d023
pop edi
pop esi
mov eax, 3
pop ebx
add esp, 0x24
ret
mov edi, dword [esp + 0x3c]
test edi, edi
je 0x1001d04b
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp edi, dword [eax*4 + 0x10030338]
je 0x1001d04b
pop edi
pop esi
mov eax, 4
pop ebx
add esp, 0x24
ret
cmp ecx, 0x10
push ebp
jne 0x1001d0fb
lea edi, [esp + 0x10]
xor edx, edx
mov ecx, esi
sub edi, esi
mov esi, 0x10
mov al, byte [ecx]
mov byte [edi + ecx], al
and eax, 0xff
xor edx, eax
inc ecx
dec esi
jne 0x1001d064
mov ecx, dword [esp + 0x10]
mov eax, ebx
mov byte [esp + 0x20], dl
mov edx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov ebp, 1
lea edi, [ebx + 0x10]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x1c]
mov esi, 0x10030130
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
xor ecx, ecx
mov al, byte [esp + ecx + 0x10]
mov dl, al
shr dl, 5
shl al, 3
or dl, al
mov byte [esp + ecx + 0x10], dl
inc ecx
cmp ecx, 0x11
jb 0x1001d0a4
mov eax, ebp
xor ecx, ecx
mov dl, byte [esi + ecx]
add dl, byte [esp + eax + 0x10]
inc eax
cmp eax, 0x11
mov byte [edi + ecx], dl
jne 0x1001d0d2
xor eax, eax
inc ecx
cmp ecx, 0x10
jb 0x1001d0c0
add esi, 0x10
inc ebp
add edi, 0x10
cmp esi, 0x10030230
jl 0x1001d0a2
pop ebp
pop edi
mov dword [ebx + 0x210], 8
pop esi
xor eax, eax
pop ebx
add esp, 0x24
ret
cmp ecx, 0x18
jne 0x1001d1aa
lea edi, [esp + 0x10]
xor edx, edx
mov ecx, esi
sub edi, esi
mov esi, 0x18
mov al, byte [ecx]
mov byte [ecx + edi], al
and eax, 0xff
xor edx, eax
inc ecx
dec esi
jne 0x1001d113
mov ecx, dword [esp + 0x10]
mov eax, ebx
mov byte [esp + 0x28], dl
mov edx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov ebp, 1
lea edi, [ebx + 0x10]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x1c]
mov esi, 0x10030130
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
xor ecx, ecx
mov al, byte [esp + ecx + 0x10]
mov dl, al
shr dl, 5
shl al, 3
or dl, al
mov byte [esp + ecx + 0x10], dl
inc ecx
cmp ecx, 0x19
jb 0x1001d153
mov eax, ebp
xor ecx, ecx
mov dl, byte [esi + ecx]
add dl, byte [esp + eax + 0x10]
inc eax
cmp eax, 0x19
mov byte [edi + ecx], dl
jne 0x1001d181
xor eax, eax
inc ecx
cmp ecx, 0x10
jb 0x1001d16f
add esi, 0x10
inc ebp
add edi, 0x10
cmp esi, 0x100302b0
jl 0x1001d151
pop ebp
pop edi
mov dword [ebx + 0x210], 0xc
pop esi
xor eax, eax
pop ebx
add esp, 0x24
ret
lea edi, [esp + 0x10]
xor edx, edx
mov ecx, esi
sub edi, esi
mov esi, 0x20
mov al, byte [ecx]
mov byte [ecx + edi], al
and eax, 0xff
xor edx, eax
inc ecx
dec esi
jne 0x1001d1b9
mov ecx, dword [esp + 0x10]
mov eax, ebx
mov byte [esp + 0x30], dl
mov edx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov ebp, 1
lea edi, [ebx + 0x10]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x1c]
mov esi, 0x10030130
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
xor ecx, ecx
mov al, byte [esp + ecx + 0x10]
mov dl, al
shr dl, 5
shl al, 3
or dl, al
mov byte [esp + ecx + 0x10], dl
inc ecx
cmp ecx, 0x21
jb 0x1001d1f9
mov eax, ebp
xor ecx, ecx
mov dl, byte [esi + ecx]
add dl, byte [esp + eax + 0x10]
inc eax
cmp eax, 0x21
mov byte [edi + ecx], dl
jne 0x1001d227
xor eax, eax
inc ecx
cmp ecx, 0x10
jb 0x1001d215
add esi, 0x10
inc ebp
add edi, 0x10
cmp esi, 0x10030330
jl 0x1001d1f7
pop ebp
pop edi
mov dword [ebx + 0x210], 0x10
pop esi
xor eax, eax
pop ebx
add esp, 0x24
ret