Function at 0x1001e646
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 0x1001e6a0
cmp byte [esi + 0x23], al
je 0x1001e687
test byte [ebp + 0x78], 7
jbe 0x1001e66a
inc eax
jmp 0x1001e670
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 0x1001e6b4
test byte [ebp + 0x78], 7
jbe 0x1001e690
inc eax
jmp 0x1001e696
cmp byte [esi + 0x22], al
setne al
mov edi, dword [ebp + 0x78]
shr edi, 3
add edi, eax
jmp 0x1001e6ae
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 0x1001e6df
cmp byte [esi + 0x20], 0
jne 0x1001e6c6
xor al, al
jmp 0x1001e934
call fcn.1001e61f
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.1001ea21
cmp dword [esi + 0x24], 1
pop ecx
pop ecx
jbe 0x1001e706
lea eax, [ebp - 0x18]
push eax
lea eax, [esi + 0xc]
push eax
call fcn.1001ea21
pop ecx
pop ecx
cmp byte [esi + 0x23], 0
push ebx
mov ebx, dword [esi + 0x14]
mov dword [ebp + 0x50], ebx
je 0x1001e7a0
cmp byte [ebp + 0x7c], 0
je 0x1001e798
and dword [ebp + 0x68], 0
call sub.MSVCRT.dll_rand
sar eax, 4
and eax, 0x800000ff
jns 0x1001e737
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 0x1001e721
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 0x1001e790
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.1001e93d
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 0x1001e75d
add ebx, 8
mov dword [ebp + 0x50], ebx
jmp 0x1001e7a0
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 0x1001e8df
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 0x1001e7d3
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebp + 0x4c]
test eax, eax
push 8
jne 0x1001e7e6
lea eax, [ebp + 0x54]
push 8
push eax
call sub.MSVCRT.dll_memset
jmp 0x1001e827
pop edx
cmp eax, edx
jae 0x1001e817
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 0x1001e82a
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 0x1001e853
cmp byte [ebp + 0x7c], 0
je 0x1001e853
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 0x1001e844
mov eax, dword [ebp + 0x48]
xor ebx, ebx
cmp dword [esi + 0x24], ebx
mov dword [ebp + 0x64], eax
jbe 0x1001e89d
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.1001e93d
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 0x1001e860
cmp byte [esi + 0x23], 0
je 0x1001e8c4
cmp byte [ebp + 0x7c], 0
jne 0x1001e8c4
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 0x1001e8bb
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 0x1001e7cd
cmp byte [ebp + 0x7c], 0
jne 0x1001e931
cmp byte [esi + 0x22], 0
je 0x1001e931
mov cl, byte [ebx + edi - 1]
cmp cl, 8
ja 0x1001e931
movzx ecx, cl
mov dword [ebp + 0x7c], edi
sub dword [ebp + 0x7c], ecx
lea eax, [edi - 2]
mov dword [ebp + 0x78], ecx
jmp 0x1001e90f
mov dl, byte [ebx + edi - 1]
cmp byte [eax + ebx], dl
jne 0x1001e931
dec eax
cmp eax, dword [ebp + 0x7c]
ja 0x1001e905
cmp byte [ebx + edi - 1], 0
je 0x1001e931
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