Function at 0x100411930
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x20
mov rbp, qword [rcx + 0x58]
or r9, 0xffffffffffffffff
mov r13d, dword [rcx + 0x78]
mov r14d, r8d
mov rdi, rdx
mov rbx, rcx
lea esi, [r9 + 2]
test rbp, rbp
jne 0x1004119f8
mov edx, 0x40
mov eax, 4
mov dword [rcx + 0x54], edx
mov rcx, qword [rcx + 8]
mul rdx
mov r8, rax
cmovo r8, r9
test rcx, rcx
je 0x100411995
mov rax, qword [rcx]
mov rdx, r8
call qword [rax + 0x18]
jmp 0x1004119bb
mov rcx, qword [0x100432d18]
test rcx, rcx
je 0x1004119ac
mov rax, qword [rcx]
mov rdx, r8
call qword [rax + 0x18]
jmp 0x1004119bb
mov rcx, qword [0x100432d20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor edx, edx
test rax, rax
jne 0x1004119df
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff8007000e
mov ecx, 0xe0000002
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov r8d, dword [rbx + 0x54]
mov rcx, rax
shl r8, 2
mov qword [rbx + 0x58], rax
call fcn.10041cf50
jmp 0x100411afb
mov eax, dword [rcx + 0x54]
cmp r13d, eax
jbe 0x100411afb
lea r14d, [rax + rax]
cmp r14d, eax
jae 0x100411a2c
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff8002000a
xor edx, edx
mov ecx, 0xe0000002
mov r8d, esi
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov r15d, r14d
mov eax, 4
mul r15
mov rdx, qword [rcx + 8]
cmovo rax, r9
mov rcx, rax
call fcn.100407170
mov rcx, qword [rbx + 8]
mov qword [rbx + 0x58], rax
mov dword [rbx + 0x54], r14d
test rbp, rbp
je 0x100411a91
test rcx, rcx
je 0x100411a68
mov rax, qword [rcx]
mov rdx, rbp
call qword [rax + 0x28]
jmp 0x100411a91
mov rcx, qword [0x100432d18]
test rcx, rcx
je 0x100411a7f
mov rax, qword [rcx]
mov rdx, rbp
call qword [rax + 0x28]
jmp 0x100411a91
mov rcx, qword [0x100432d20]
mov r8, rbp
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [rbx + 0x58]
lea r8, [r14*4]
xor edx, edx
call fcn.10041cf50
mov r9d, esi
cmp r13d, esi
jbe 0x100411af6
mov r10d, 0x30
nop dword [rax]
nop word [rax + rax]
mov r8, qword [rbx + 0x70]
lea r10, [r10 + 0x30]
xor edx, edx
mov eax, dword [r8 + r10 - 0xc]
div dword [rbx + 0x54]
mov rax, qword [rbx + 0x58]
lea rdx, [rdx*4]
mov ecx, dword [rdx + rax]
mov dword [r8 + r10 - 8], ecx
mov rax, qword [rbx + 0x58]
mov dword [rdx + rax], r9d
inc r9d
cmp r9d, r13d
jb 0x100411ac0
mov r14d, dword [rsp + 0x70]
lea edx, [r13 + 1]
mov qword [rsp + 0x68], r12
cmp dword [rbx + 0x7c], edx
jae 0x100411b12
lea rcx, [rbx + 0x60]
call fcn.100412b90
mov r12d, dword [rsp + 0x80]
lea eax, [r14 + r12]
cmp eax, r14d
jae 0x100411b42
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff8002000a
mov r8d, esi
xor edx, edx
mov ecx, 0xe0000002
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rcx, qword [rbx + 8]
test eax, eax
cmove eax, esi
mov edx, eax
mov eax, 2
mul rdx
mov r8, rax
mov rax, 0xffffffffffffffff
cmovo r8, rax
test rcx, rcx
je 0x100411b73
mov rax, qword [rcx]
mov rdx, r8
call qword [rax + 0x18]
jmp 0x100411b99
mov rcx, qword [0x100432d18]
test rcx, rcx
je 0x100411b8a
mov rax, qword [rcx]
mov rdx, r8
call qword [rax + 0x18]
jmp 0x100411b99
mov rcx, qword [0x100432d20]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r15, rax
test rax, rax
jne 0x100411bc0
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff8007000e
mov r8d, esi
xor edx, edx
mov ecx, 0xe0000002
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov eax, dword [rbx + 0x78]
cmp dword [rbx + 0x7c], eax
jne 0x100411bd3
xor edx, edx
lea rcx, [rbx + 0x60]
call fcn.100412b90
mov eax, dword [rbx + 0x78]
lea r14, [rax + rax*2]
shl r14, 4
add r14, qword [rbx + 0x70]
inc eax
mov dword [rbx + 0x78], eax
xor eax, eax
mov qword [r14 + 8], rax
mov qword [r14 + 0x18], rax
mov qword [r14 + 0x20], rax
mov qword [r14 + 0x28], rax
mov eax, dword [rsp + 0x70]
mov ecx, eax
mov dword [r14 + 8], eax
mov qword [r14], r15
mov dword [r14 + 0x18], r12d
lea rbp, [rax + rax]
lea rax, [r15 + rbp]
mov qword [r14 + 0x10], rax
cmp rbp, rcx
jae 0x100411c3a
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff80004005
mov r8d, esi
xor edx, edx
mov ecx, 0xe0000002
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov r8, rbp
mov rdx, rdi
mov rcx, r15
call fcn.10041d8d0
cmp dword [r14 + 0x18], r12d
jae 0x100411c6d
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff80004005
mov r8d, esi
xor edx, edx
mov ecx, 0xe0000002
call qword [sym.imp.KERNEL32.dll_RaiseException]
lea r8, [r12 + r12]
cmp r8, r12
jae 0x100411c95
lea r9, [rsp + 0x60]
mov qword [rsp + 0x60], 0xffffffff80004005
mov r8d, esi
xor edx, edx
mov ecx, 0xe0000002
call qword [sym.imp.KERNEL32.dll_RaiseException]
mov rdx, qword [rsp + 0x78]
mov rcx, qword [r14 + 0x10]
call fcn.10041d8d0
mov eax, dword [rsp + 0x90]
xor edx, edx
mov dword [r14 + 0x1c], eax
movzx eax, byte [rsp + 0x88]
mov byte [r14 + 0x20], al
lea rax, [rdi + rbp]
mov r8d, dword [rbx + 0x50]
mov r9, rax
sub r9, rdi
inc r9
shr r9, 1
cmp rdi, rax
cmova r9, rdx
test r9, r9
je 0x100411cf6
nop dword [rax]
movzx ecx, word [rdi]
lea rdi, [rdi + 2]
imul r8d, r8d, 0x21
inc rdx
xor r8d, ecx
cmp rdx, r9
jb 0x100411ce0
mov r12, qword [rsp + 0x68]
xor edx, edx
mov dword [r14 + 0x24], r8d
mov eax, r8d
div dword [rbx + 0x54]
mov rax, qword [rbx + 0x58]
lea rdx, [rdx*4]
mov ecx, dword [rdx + rax]
mov dword [r14 + 0x28], ecx
mov rax, qword [rbx + 0x58]
mov dword [rdx + rax], r13d
add rsp, 0x20
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret