Function at 0x180042410
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
imul r15d, edx, 0x384
mov r14d, edx
mov rdi, rcx
mov esi, edx
cmp edx, r15d
ja 0x180042612
mov ebp, dword [rsp + 0x68]
lea r12, [0x1801f1150]
xor ebx, ebx
lea r13, [0x1801f1950]
cmp esi, 0xfc8
ja 0x1800425e6
je 0x1800425d5
mov eax, esi
sub eax, 0x28
je 0x1800425c1
sub eax, 0x13
je 0x1800424a5
sub eax, 0x2d
je 0x1800426fe
cmp eax, 0x62
jne 0x1800426ea
mov ebp, ebx
cmp qword [rdi + 0x138], rbx
je 0x1800426ea
mov r8, rdi
lea ecx, [rax - 0x3f]
xor edx, edx
call fcn.18009d880
jmp 0x1800426ea
mov r11d, 0x80000000
mov dword [0x1801f1150], ebx
mov r10d, 1
nop word [rax + rax]
mov ecx, r11d
lea eax, [r11 + r11]
sar ecx, 0x1f
and ecx, 0x1edc6f41
mov r11d, ecx
xor r11d, eax
mov eax, ebx
test r10d, r10d
je 0x1800424f9
mov r9, r12
mov r8d, dword [r9]
lea ecx, [rax + r10]
xor r8d, r11d
lea r9, [r9 + 4]
inc eax
mov dword [r12 + rcx*4], r8d
cmp eax, r10d
jb 0x1800424e0
add r10d, r10d
cmp r10d, 0x100
jb 0x1800424c0
mov r8, r13
mov r9d, 0x100
nop
mov ecx, dword [r8 - 0x800]
lea r8, [r8 + 4]
mov eax, ecx
shl ecx, 8
shr rax, 0x18
mov edx, dword [r12 + rax*4]
xor edx, ecx
mov dword [r8 - 0x404], edx
mov eax, edx
shr rax, 0x18
shl edx, 8
mov ecx, dword [r12 + rax*4]
xor ecx, edx
mov dword [r8 - 4], ecx
mov eax, ecx
shr rax, 0x18
shl ecx, 8
mov edx, dword [r12 + rax*4]
xor edx, ecx
mov dword [r8 + 0x3fc], edx
mov eax, edx
shr rax, 0x18
shl edx, 8
mov ecx, dword [r12 + rax*4]
xor ecx, edx
mov dword [r8 + 0x7fc], ecx
mov eax, ecx
shr rax, 0x18
shl ecx, 8
mov edx, dword [r12 + rax*4]
xor edx, ecx
mov dword [r8 + 0xbfc], edx
mov eax, edx
shr rax, 0x18
shl edx, 8
mov ecx, dword [r12 + rax*4]
xor ecx, edx
mov dword [r8 + 0xffc], ecx
mov eax, ecx
shr rax, 0x18
shl ecx, 8
mov eax, dword [r12 + rax*4]
xor eax, ecx
mov dword [r8 + 0x13fc], eax
sub r9, 1
jne 0x180042510
jmp 0x1800426ea
mov rax, qword [rdi]
cmp dword [rax], 0x7f2bb70f
je 0x1800426ea
mov rax, rbx
jmp 0x180042617
mov rax, qword [rdi]
add rax, 0x14
mov qword [rsp + 0x70], rax
jmp 0x1800426ea
cmp esi, 0x1f68
je 0x180042612
cmp esi, 0x4fb2
je 0x18004262c
cmp esi, 0x9e9a
je 0x1800426c4
cmp esi, 0xed82
jne 0x1800426ea
mov dword [rsp + 0x70], ebp
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x18004265d
test byte [rdi + 0xe4], 2
je 0x18004264a
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 8], rbx
jmp 0x18004265d
xor r9d, r9d
mov r8d, 0xc5
mov rdx, rdi
xor ecx, ecx
call fcn.18004c8d0
mov rcx, qword [rdi]
test rcx, rcx
je 0x18004266e
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi], rbx
mov ecx, dword [rdi + 0x10]
cmp ecx, 0xffffffff
je 0x18004267e
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
mov ebp, eax
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x180042691
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rdi + 0x30], rbx
mov rcx, qword [0x1801f3320]
lea rdx, [0x1801f3320]
test rcx, rcx
je 0x1800426ea
cmp rcx, rdi
je 0x1800426ba
lea rdx, [rcx + 0x100]
mov rcx, qword [rdx]
test rcx, rcx
jne 0x1800426a4
jmp 0x1800426ea
mov rax, qword [rdi + 0x100]
mov qword [rdx], rax
xor edx, edx
mov r8d, 0x150
mov rcx, rdi
mov esi, 0x9e9a
call sub.VCRUNTIME140.dll_memset
test rdi, rdi
je 0x1800426ea
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, rbx
imul eax, r14d, 0x64
add esi, eax
cmp esi, r15d
jbe 0x180042450
jmp 0x180042612
mov dword [rsp + 0x70], 0xa
jmp 0x180042612