Function at 0x1001dc48
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0xe4
push esi
mov esi, eax
xor eax, eax
cmp byte [ebp + 0x7c], al
push edi
je 0x1001dca2
cmp byte [esi + 0x23], al
je 0x1001dc89
test byte [ebp + 0x78], 7
jbe 0x1001dc6c
inc eax
jmp 0x1001dc72
cmp byte [esi + 0x22], al
setne al
mov edi, dword [ebp + 0x78]
shr edi, 3
add edi, eax
lea edi, [edi*8 + 8]
lea eax, [edi - 8]
mov dword [ebp + 0x5c], eax
jmp 0x1001dcb6
test byte [ebp + 0x78], 7
jbe 0x1001dc92
inc eax
jmp 0x1001dc98
cmp byte [esi + 0x22], al
setne al
mov edi, dword [ebp + 0x78]
shr edi, 3
add edi, eax
jmp 0x1001dcb0
cmp byte [esi + 0x23], al
mov edi, dword [ebp + 0x78]
setne al
shr edi, 3
sub edi, eax
shl edi, 3
mov dword [ebp + 0x5c], edi
cmp dword [esi + 0x18], edi
jae 0x1001dce1
cmp byte [esi + 0x20], 0
jne 0x1001dcc8
xor al, al
jmp 0x1001df36
call fcn.1001dc21
lea eax, [edi + 1]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov dword [esi + 0x14], eax
mov byte [eax + edi], 0
pop ecx
mov dword [esi + 0x18], edi
lea eax, [ebp - 0x78]
push eax
lea eax, [esi + 4]
push eax
mov dword [esi + 0x1c], edi
call fcn.1001e023
cmp dword [esi + 0x24], 1
pop ecx
pop ecx
jbe 0x1001dd08
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 0xc]
push eax
call fcn.1001e023
pop ecx
pop ecx
cmp byte [esi + 0x23], 0
push ebx
mov ebx, dword [esi + 0x14]
mov dword [ebp + 0x50], ebx
je 0x1001dda2
cmp byte [ebp + 0x7c], 0
je 0x1001dd9a
and dword [ebp + 0x68], 0
call sub.MSVCRT.dll_rand
sar eax, 4
and eax, 0x800000ff
jns 0x1001dd39
dec eax
or eax, 0xffffff00
inc eax
mov ecx, dword [ebp + 0x68]
inc dword [ebp + 0x68]
cmp dword [ebp + 0x68], 8
mov byte [ebp + ecx + 0x54], al
jb 0x1001dd23
xor eax, eax
cmp byte [ebp + 0x7c], 1
sete al
and dword [ebp + 0x68], 0
cmp dword [esi + 0x24], 0
mov dword [ebp + 0x64], eax
jbe 0x1001dd92
mov eax, dword [ebp + 0x68]
push dword [ebp + 0x64]
and eax, 1
imul eax, eax, 0x60
lea ecx, [ebp + 0x54]
push ebx
lea eax, [ebp + eax - 0x78]
push ecx
call fcn.1001df3f
xor eax, eax
add esp, 0xc
cmp dword [ebp + 0x64], eax
sete al
inc dword [ebp + 0x68]
mov dword [ebp + 0x64], eax
mov eax, dword [ebp + 0x68]
cmp eax, dword [esi + 0x24]
jb 0x1001dd5f
add ebx, 8
mov dword [ebp + 0x50], ebx
jmp 0x1001dda2
add dword [ebp + 0x74], 8
sub dword [ebp + 0x78], 8
mov eax, dword [ebp + 0x78]
and dword [ebp + 0x68], 0
cmp dword [ebp + 0x5c], 0
mov dword [ebp + 0x60], eax
jbe 0x1001dee1
xor ecx, ecx
cmp byte [ebp + 0x7c], 1
mov dword [ebp + 0x78], ebx
sete cl
mov dword [ebp + 0x48], ecx
mov ecx, dword [ebp + 0x74]
sub ecx, ebx
mov dword [ebp + 0x4c], ecx
jmp 0x1001ddd5
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebp + 0x4c]
test eax, eax
push 8
jne 0x1001dde8
lea eax, [ebp + 0x54]
push 8
push eax
call sub.MSVCRT.dll_memset
jmp 0x1001de29
pop edx
cmp eax, edx
jae 0x1001de19
mov ecx, edx
sub ecx, eax
push ecx
sub edx, eax
push edx
lea eax, [ebp + eax + 0x54]
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [ebp + 0x78]
push dword [ebp + 0x60]
mov eax, dword [ebp + 0x4c]
add eax, ecx
push eax
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
jmp 0x1001de2c
mov eax, dword [ebp + 0x78]
push edx
add ecx, eax
push ecx
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp byte [esi + 0x23], 0
je 0x1001de55
cmp byte [ebp + 0x7c], 0
je 0x1001de55
mov eax, dword [ebp + 0x68]
lea ebx, [eax + ebx - 8]
lea eax, [ebp + 0x54]
xor ecx, ecx
sub ebx, eax
lea eax, [ebp + ecx + 0x54]
mov dl, byte [ebx + eax]
xor byte [eax], dl
inc ecx
cmp ecx, 8
jb 0x1001de46
mov eax, dword [ebp + 0x48]
xor ebx, ebx
cmp dword [esi + 0x24], ebx
mov dword [ebp + 0x64], eax
jbe 0x1001de9f
push dword [ebp + 0x64]
mov eax, ebx
push dword [ebp + 0x78]
and eax, 1
imul eax, eax, 0x60
lea ecx, [ebp + 0x54]
lea eax, [ebp + eax - 0x78]
push ecx
call fcn.1001df3f
xor eax, eax
cmp dword [ebp + 0x64], eax
push 8
push dword [ebp + 0x78]
sete al
mov dword [ebp + 0x64], eax
lea eax, [ebp + 0x54]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0x18
inc ebx
cmp ebx, dword [esi + 0x24]
jb 0x1001de62
cmp byte [esi + 0x23], 0
je 0x1001dec6
cmp byte [ebp + 0x7c], 0
jne 0x1001dec6
mov eax, dword [ebp + 0x74]
mov ecx, dword [ebp + 0x68]
lea ecx, [ecx + eax - 8]
mov eax, dword [ebp + 0x78]
push 8
sub ecx, eax
pop edx
mov bl, byte [ecx + eax]
xor byte [eax], bl
inc eax
dec edx
jne 0x1001debd
add dword [ebp + 0x68], 8
mov eax, dword [ebp + 0x68]
sub dword [ebp + 0x60], 8
add dword [ebp + 0x78], 8
cmp eax, dword [ebp + 0x5c]
mov ebx, dword [ebp + 0x50]
jb 0x1001ddcf
cmp byte [ebp + 0x7c], 0
jne 0x1001df33
cmp byte [esi + 0x22], 0
je 0x1001df33
mov cl, byte [ebx + edi - 1]
cmp cl, 8
ja 0x1001df33
movzx ecx, cl
mov dword [ebp + 0x7c], edi
sub dword [ebp + 0x7c], ecx
lea eax, [edi - 2]
mov dword [ebp + 0x78], ecx
jmp 0x1001df11
mov dl, byte [ebx + edi - 1]
cmp byte [eax + ebx], dl
jne 0x1001df33
dec eax
cmp eax, dword [ebp + 0x7c]
ja 0x1001df07
cmp byte [ebx + edi - 1], 0
je 0x1001df33
push ecx
sub ebx, ecx
push 0
add ebx, edi
push ebx
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x78]
add esp, 0xc
sub dword [esi + 0x1c], eax
mov al, 1
pop ebx
pop edi
pop esi
add ebp, 0x6c
leave
ret 0xc