Function at 0x10111140
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
sub rsp, 0x3d8
cmp byte [rcx + 0x59], 0
mov qword [rax - 0x18], r14
mov r14, rcx
je 0x10111466
mov qword [rax - 0x20], r15
mov r15, qword [rcx + 0x68]
test r15, r15
je 0x1011117b
mov rdx, qword [rcx + 0x60]
lea rcx, [rax - 0x2f8]
mov r8, r15
call sub.msvcrt.dll_memcpy
cmp byte [r14 + 0x58], 0
je 0x10111192
mov rax, qword [r14 + 0x50]
add r15, 8
mov qword [rsp + r15 + 0xd8], rax
mov qword [rsp + 0x3e0], rbx
mov qword [rsp + 0x3e8], rbp
mov qword [rsp + 0x3f0], rsi
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x3f8], rdi
mov qword [rsp + 0x3c8], r13
call fcn.1012f760
xor esi, esi
lea eax, [r15 + 3]
lea edi, [r15 - 0x40]
mov r13d, esi
mov ebp, esi
mov dword [rsp + 0x28], eax
mov rbx, rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x24], edi
mov qword [rsp + 0x3d0], r12
nop
nop
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x60]
mov r8, r15
call fcn.1012fe70
lea r11d, [r13 + 0x40]
lea r12d, [rdi + r11]
and r12d, 0xffffffc0
cmp r12d, r11d
jbe 0x10111346
movsxd rax, r13d
mov edi, r13d
and edi, 0xffffffc0
add edi, 0x40
movsxd rcx, edi
sub rcx, rax
lea rax, [rsp + 0x270]
lea r9, [rsp + rcx + 0xe0]
sub rcx, rax
lea r11, [rsp + rcx + 0xe0]
nop
nop
nop
mov rdx, rsi
lea rax, [r11 + rdx*4]
inc rdx
cmp rdx, 0x10
mov ecx, dword [rsp + rax + 0x270]
bswap ecx
mov dword [rsp + rdx*4 + 0x26c], ecx
jb 0x10111253
lea r10, [rsp + 0x290]
mov ebx, 0x10
nop
mov edx, dword [r10 - 0x18]
mov ecx, dword [r10 - 0x14]
mov r8d, dword [r10 - 0x20]
xor r8d, dword [r10 + 0x14]
mov eax, dword [r10 - 0x1c]
add r10, 0x10
xor eax, dword [r10 + 8]
xor r8d, edx
xor eax, dword [r10 - 0xc]
xor r8d, dword [r10 - 0x10]
xor eax, ecx
rol r8d, 1
rol eax, 1
mov dword [r10 + 0x10], r8d
mov dword [r10 + 0x14], eax
mov eax, dword [r10 + 0xc]
xor eax, dword [r10 - 0x20]
xor eax, dword [r10 - 8]
xor eax, edx
rol eax, 1
mov dword [r10 + 0x18], eax
mov eax, dword [r10 - 0x1c]
xor eax, dword [r10 - 4]
xor eax, r8d
xor eax, ecx
rol eax, 1
dec rbx
mov dword [r10 + 0x1c], eax
jne 0x10111280
lea rcx, [rsp + 0x370]
add edi, 0x40
add r9, 0x40
mov rax, qword [rcx]
add r11, 0x40
cmp edi, r12d
mov qword [r9 - 0x40], rax
mov rax, qword [rcx + 8]
mov qword [r9 - 0x38], rax
mov rax, qword [rcx + 0x10]
mov qword [r9 - 0x30], rax
mov rax, qword [rcx + 0x18]
mov qword [r9 - 0x28], rax
mov rax, qword [rcx + 0x20]
mov qword [r9 - 0x20], rax
mov rax, qword [rcx + 0x28]
mov qword [r9 - 0x18], rax
mov rax, qword [rcx + 0x30]
mov qword [r9 - 0x10], rax
mov rax, qword [rcx + 0x38]
mov qword [r9 - 8], rax
jne 0x10111250
mov rbx, qword [rsp + 0x30]
mov edi, dword [rsp + 0x24]
mov eax, ebp
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x60]
shr eax, 8
mov r8d, 3
mov byte [rsp + 0x20], bpl
mov byte [rsp + 0x21], al
mov eax, ebp
shr eax, 0x10
mov byte [rsp + 0x22], al
call fcn.1012fe70
add r13d, dword [rsp + 0x28]
test ebp, 0x3fff
jne 0x101113bd
lea rcx, [rsp + 0x1f0]
lea rdx, [rsp + 0x60]
mov r8d, 0x80
call sub.msvcrt.dll_memcpy
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x1f0]
call fcn.1012ff20
movzx eax, byte [rsp + 0x53]
mov r11, rbx
shr r11, 0xe
mov byte [r11 + r14 + 0x80], al
inc rbx
inc ebp
cmp ebp, 0x40000
mov qword [rsp + 0x30], rbx
jb 0x101111f0
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.1012ff20
mov r15, qword [rsp + 0x3b8]
mov r13, qword [rsp + 0x3c8]
mov r12, qword [rsp + 0x3d0]
mov rdi, qword [rsp + 0x3f8]
mov rbp, qword [rsp + 0x3e8]
mov rbx, qword [rsp + 0x3e0]
lea r8, [r14 + 0x72]
nop
nop
nop
lea eax, [rsi + 3]
add r8, 4
movzx eax, byte [rsp + rax + 0x40]
mov byte [r8 - 6], al
lea eax, [rsi + 2]
movzx eax, byte [rsp + rax + 0x40]
mov byte [r8 - 5], al
lea eax, [rsi + 1]
movzx eax, byte [rsp + rax + 0x40]
mov byte [r8 - 4], al
movzx eax, byte [rsp + rsi + 0x40]
add esi, 4
cmp esi, 0x10
mov byte [r8 - 3], al
jb 0x10111420
mov rsi, qword [rsp + 0x3f0]
mov byte [r14 + 0x59], 0
mov r14, qword [rsp + 0x3c0]
add rsp, 0x3d8
ret