Function at 0x140004050
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
push rbp
push r13
push r15
lea rbp, [rax - 0x3a8]
sub rsp, 0x490
mov rax, qword [0x14005b178]
xor rax, rsp
mov qword [rbp + 0x380], rax
and dword [rsp + 0x20], 0
lea rcx, [rsp + 0x24]
xor edx, edx
mov r8d, 0x234
call fcn.140018a40
mov edi, 0x104
lea rcx, [rbp + 0x161]
mov r8d, edi
xor edx, edx
mov byte [rbp + 0x160], 0
call fcn.140018a40
lea rcx, [rbp + 0x271]
mov r8d, edi
xor edx, edx
mov byte [rbp + 0x270], 0
call fcn.140018a40
xor ebx, ebx
lea ecx, [rbx + 0x18]
call fcn.140007580
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400040ed
xor eax, eax
jmp 0x1400042c9
xor eax, eax
mov r13d, 0x238
lea rdi, [rsp + 0x20]
mov ecx, r13d
rep stosb byte [rdi], al
mov rax, qword [0x1400a07b8]
mov dword [rsp + 0x20], r13d
test rax, rax
jne 0x140004126
lea edx, [rax + 0x2b]
xor ecx, ecx
call fcn.140007338
mov qword [0x1400a07b8], rax
test rax, rax
je 0x140004130
lea rdx, [rsp + 0x20]
mov rcx, rsi
call rax
mov r15d, 0x105
test eax, eax
je 0x140004293
mov r12d, 1
lea r13, [0x140000000]
lea rax, [rbp + 0x50]
xor ecx, ecx
test rax, rax
je 0x140004183
lea rdx, [rbp + 0x50]
or rax, 0xffffffffffffffff
inc rax
cmp byte [rdx + rax], cl
jne 0x14000415e
test eax, eax
je 0x140004183
lea rdx, [rbp + 0x50]
mov edi, eax
movsx eax, byte [rdx]
imul ecx, ecx, 0x811c9dc5
add rdx, r12
xor ecx, eax
sub rdi, r12
jne 0x140004170
shr ecx, 1
mov r8, r15
xor edx, edx
add dword [0x1400a0710], ecx
lea rcx, [rbp + 0x160]
call fcn.140018a40
xor edi, edi
or rax, 0xffffffffffffffff
lea rcx, [rsp + 0x50]
inc rax
cmp byte [rcx + rax], dil
jne 0x1400041a7
test rax, rax
je 0x1400041e0
movsx ecx, byte [rsp + rdi + 0x50]
call fcn.140012d58
lea rcx, [rsp + 0x50]
mov byte [rbp + rdi + 0x160], al
add rdi, r12
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x1400041d2
cmp rdi, rax
jb 0x1400041b5
lea rdx, [rbp + 0x160]
lea rcx, [rbp + 0x160]
mov r9b, 0xa
mov r8d, r15d
call fcn.14000fa70
xor edi, edi
mov rcx, qword [rdi + r13 + 0x34250]
lea rdx, [rbp + 0x160]
call fcn.140012db4
test eax, eax
cmove ebx, r12d
add rdi, 8
cmp rdi, 0x30
jb 0x1400041fb
xor edi, edi
mov rcx, qword [rdi + r13 + 0x34220]
lea rdx, [rbp + 0x270]
mov r8d, r15d
call fcn.14000fe00
lea rdx, [rbp + 0x270]
lea rcx, [rbp + 0x50]
call fcn.140010108
test rax, rax
cmovne ebx, r12d
add rdi, 8
cmp rdi, 0x30
jb 0x140004221
mov rax, qword [0x1400a07b0]
test rax, rax
jne 0x14000427b
lea edx, [rax + 0x2c]
xor ecx, ecx
call fcn.140007338
mov qword [0x1400a07b0], rax
test rax, rax
je 0x140004285
lea rdx, [rsp + 0x20]
mov rcx, rsi
call rax
test eax, eax
jne 0x14000414b
mov r13d, 0x238
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x160]
mov rdx, r15
call fcn.140010a84
lea rcx, [rsp + 0x20]
mov rdx, r13
call fcn.140010a84
lea rcx, [rbp + 0x270]
mov rdx, r15
call fcn.140010a84
mov eax, ebx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140012b40
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r13
pop rbp
ret