Function at 0x1400022c0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
push r13
sub rsp, 0x208
mov rbp, rcx
lea rcx, [rsp + 0x100]
xor r13d, r13d
xor edx, edx
mov r8d, 0x100
mov dword [rsp + 0x248], r13d
call fcn.14001e580
mov rax, qword [0x14003c030]
lea rdx, [rsp + 0x50]
mov qword [rdx], rax
mov rax, qword [0x14003c038]
lea rdi, [0x14003b9cc]
mov qword [rdx + 8], rax
mov rax, qword [rbp + 0x1390]
mov ecx, 1
mov rsi, rax
repe cmpsw word [rsi], word [rdi]
je 0x1400026c8
mov qword [rsp + 0x30], r13
lea r8d, [r13 + 3]
xor r9d, r9d
mov edx, 0xc0000000
mov rcx, rax
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x1400026c8
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x38], r13
mov rax, qword [rcx]
lea r9d, [r13 + 0x18]
lea r8, [rsp + 0x60]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov rcx, rdi
mov qword [rdx + 8], rax
lea rax, [rsp + 0x40]
mov edx, 0x2f0003
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x248]
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x74], 1
mov dword [rsp + 0x70], r13d
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rdi, rdi
je 0x1400023d8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x1400026c8
mov ecx, dword [rsp + 0x248]
test ecx, ecx
jne 0x1400023fb
lea eax, [rcx + 1]
add rsp, 0x208
pop r13
pop rdi
pop rsi
pop rbp
ret
lea rdx, [rcx + rcx*2]
mov dword [rbp], ecx
mov eax, 4
mov qword [rsp + 0x230], rbx
mov qword [rsp + 0x200], r14
mov r14, 0xffffffffffffffff
mul rdx
cmovo rax, r14
mov rcx, rax
call fcn.140007e4c
test rax, rax
mov rbx, rax
je 0x14000269f
mov eax, dword [rsp + 0x248]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x238], r12
lea r12d, [rax + rax*2]
mov rax, qword [0x14003c030]
lea rdi, [0x14003b9cc]
mov qword [rcx], rax
mov rax, qword [0x14003c038]
shl r12d, 2
mov qword [rcx + 8], rax
mov rax, qword [rbp + 0x1390]
mov ecx, 1
mov rsi, rax
repe cmpsw word [rsi], word [rdi]
je 0x1400026bc
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov edx, 0xc0000000
lea r8d, [r9 + 3]
mov rcx, rax
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, r14
mov rdi, rax
je 0x1400026bc
lea rdx, [rsp + 0x60]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], r13
mov rcx, qword [rax]
lea r8, [rsp + 0x60]
mov r9d, 0x18
mov qword [rdx], rcx
mov rcx, qword [rax + 8]
lea rax, [rsp + 0x40]
mov qword [rdx + 8], rcx
mov qword [rsp + 0x30], rax
mov edx, 0x2f0003
mov rcx, rdi
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x74], 1
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov esi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rdi, rdi
je 0x140002531
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x1400026bc
mov esi, dword [rsp + 0x248]
lea rcx, [rsp + 0x100]
mov rdx, rbx
lea rdi, [rsi*8]
mov r12, rsi
mov r8, rdi
call fcn.14001e840
shr rdi, 2
lea r8, [rsi*4]
lea rdx, [rbx + rdi*4]
lea rcx, [rsp + 0x80]
call fcn.14001e840
test esi, esi
je 0x140002692
mov ebx, dword [rsp + 0x58]
mov esi, dword [rsp + 0x54]
mov r8d, dword [rsp + 0x50]
mov r9d, dword [rsp + 0x24c]
mov r10d, dword [rsp + 0x248]
lea rdx, [rbp + 0x90]
add rbp, 0x9c
lea r11, [rsp + 0x80]
lea rdi, [rsp + 0x104]
nop
mov ecx, dword [rdi - 4]
mov eax, r8d
add rdx, 0x9c
xor eax, ecx
add rbp, 0x9c
add rdi, 8
movzx eax, al
add r11, 4
xor r8d, eax
mov eax, ecx
shr ecx, 0xc
shr eax, 8
mov dword [rsp + 0x50], r8d
xor eax, esi
and eax, 0xf
xor esi, eax
mov eax, ebx
mov ebx, ecx
and eax, 0xfff00000
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x54], esi
or ebx, eax
mov dword [rsp + 0x58], ebx
mov eax, dword [rcx]
mov dword [rdx - 0x11c], eax
mov eax, dword [rcx + 4]
mov dword [rdx - 0x118], eax
mov eax, dword [rcx + 8]
mov ecx, dword [rdi - 8]
mov dword [rdx - 0x114], eax
mov eax, r10d
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, r9d
xor r10d, eax
movzx eax, cx
xor r9d, eax
mov dword [rsp + 0x248], r10d
mov dword [rsp + 0x24c], r9d
mov rax, qword [rsp + 0x248]
mov qword [rdx - 0x9c], rax
mov eax, dword [r11 - 4]
mov dword [rdx - 0x94], eax
xor eax, eax
sub r12, 1
mov dword [rbp - 0x9c], eax
mov dword [rbp - 0x98], eax
mov dword [rbp - 0x94], eax
mov dword [rdx - 0x84], r14d
jne 0x1400025c0
mov eax, 1
mov r12, qword [rsp + 0x238]
mov rbx, qword [rsp + 0x230]
mov r14, qword [rsp + 0x200]
add rsp, 0x208
pop r13
pop rdi
pop rsi
pop rbp
ret
mov rcx, rbx
call fcn.140007e44
xor eax, eax
jmp 0x140002697
xor eax, eax
add rsp, 0x208
pop r13
pop rdi
pop rsi
pop rbp
ret