Function at 0x140002ea0
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x1420]
mov eax, 0x1520
call fcn.140007d90
sub rsp, rax
mov rax, qword [0x14000d040]
xor rax, rsp
mov qword [rbp + 0x1410], rax
mov rbx, rcx
xor edx, edx
mov r8d, 0x118
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x18], 0xf
jbe 0x140002ef3
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call fcn.1400052b0
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x30], r14
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb8]
mov dword [rsp + rcx + 0x2c], edx
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
test al, al
je 0x140002f6b
lea rdx, str.Failed_to_open_file_for_appending.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140005500
lea rdx, [0x1400056e0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140003344
mov rcx, qword [0x14000da50]
sub rcx, qword [0x14000da48]
xorps xmm0, xmm0
movq rdx, xmm0
add rdx, rcx
neg rdx
mov r8d, 2
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int____ptr64]
xorps xmm0, xmm0
xor eax, eax
mov rdi, qword [0x14000da50]
sub rdi, qword [0x14000da48]
movdqu xmmword [rbp + 0x68], xmm0
mov esi, eax
mov qword [rbp + 0x78], rax
je 0x140002fdc
mov rdx, rdi
lea rcx, [rbp + 0x68]
call fcn.140002e10
mov rcx, qword [rbp + 0x68]
lea rbx, [rcx + rdi]
mov r8, rdi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x70], rbx
jmp 0x140002fe0
mov rbx, qword [rbp + 0x70]
mov rdx, qword [rbp + 0x68]
sub rbx, rdx
mov r8, rbx
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
mov rbx, qword [0x14000da50]
mov rdx, qword [0x14000da48]
sub rbx, rdx
mov r8, qword [rbp + 0x70]
mov rcx, qword [rbp + 0x68]
sub r8, rcx
cmp r8, rbx
jne 0x1400031a1
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x1400031a1
xorps xmm0, xmm0
movq rdx, xmm0
add rdx, 0x10
add rdx, rbx
neg rdx
mov r8d, 2
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int____ptr64]
xorps xmm0, xmm0
movups xmmword [rbp + 0x50], xmm0
mov qword [rbp + 0x50], rsi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], rsi
mov edx, send
lea rcx, [rbp + 0x50]
call fcn.140002e10
mov rax, qword [rbp + 0x50]
lea r8, [rax + 0x10]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rbp + 0x58], r8
mov rdx, qword [rbp + 0x50]
sub r8, rdx
lea rcx, [rsp + 0x30]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1404], 0xffffffff
mov dword [rbp + 0x84], eax
mov ecx, 1
nop word [rax + rax]
mov edx, eax
shr edx, 0x1e
xor edx, eax
imul eax, edx, 0x6c078965
add eax, ecx
mov dword [rbp + rcx*4 + 0x84], eax
inc rcx
cmp rcx, 0x270
jb 0x1400030b0
mov dword [rbp + 0x80], 0x270
mov rbx, rsi
mov rdi, qword [rbp + 0x50]
cmp qword [rbp + 0x58], rdi
je 0x140003115
nop dword [rax]
lea rcx, [rbp + 0x80]
call fcn.140005ff0
shr eax, 0x19
mov byte [rdi + rbx], al
inc rbx
mov rax, qword [rbp + 0x58]
mov rdi, qword [rbp + 0x50]
sub rax, rdi
cmp rbx, rax
jb 0x1400030f0
mov rcx, qword [0x14000da50]
sub rcx, qword [0x14000da48]
add rcx, 0x10
xorps xmm0, xmm0
movq rdx, xmm0
add rdx, rcx
neg rdx
mov r8d, 2
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::seekp_long_long___int64___int____ptr64]
mov r8, qword [rbp + 0x58]
mov rdx, qword [rbp + 0x50]
sub r8, rdx
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
nop
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400032cc
mov rdx, qword [rbp + 0x60]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400032c7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400032c7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x50], xmm1
mov qword [rbp + 0x60], rsi
mov edx, send
lea rcx, [rbp + 0x50]
call fcn.140002e10
mov rax, qword [rbp + 0x50]
lea rcx, [rax + 0x10]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rbp + 0x58], rcx
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1404], 0xffffffff
mov dword [rbp + 0x84], eax
mov ecx, 1
nop dword [rax + rax]
mov edx, eax
shr edx, 0x1e
xor edx, eax
imul eax, edx, 0x6c078965
add eax, ecx
mov dword [rbp + rcx*4 + 0x84], eax
inc rcx
cmp rcx, 0x270
jb 0x1400031f0
mov dword [rbp + 0x80], 0x270
mov rdi, qword [rbp + 0x58]
mov rbx, qword [rbp + 0x50]
cmp rbx, rdi
je 0x140003249
nop dword [rax]
lea rcx, [rbp + 0x80]
call fcn.140005ff0
shr eax, 0x19
mov byte [rbx], al
inc rbx
cmp rbx, rdi
jne 0x140003230
xor edx, edx
mov r8d, 2
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::seekp_long_long___int64___int____ptr64]
mov r8, qword [rbp + 0x58]
mov rdx, qword [rbp + 0x50]
sub r8, rdx
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
mov r8, qword [0x14000da50]
mov rdx, qword [0x14000da48]
sub r8, rdx
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
nop
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400032cc
mov rdx, qword [rbp + 0x60]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400032c7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400032c7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
lea rcx, [rsp + 0x48]
call fcn.1400051f0
test rax, rax
jne 0x1400032fb
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x30]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rcx, qword [rbp + 0x68]
test rcx, rcx
je 0x140003344
mov rdx, qword [rbp + 0x78]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003333
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003333
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x68], xmm0
mov qword [rbp + 0x78], rsi
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x30], r14
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb8]
mov dword [rsp + rcx + 0x2c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x48], rax
cmp qword [rbp - 0x38], 0
je 0x1400033a0
lea rcx, [rbp - 0x48]
mov rax, qword [rsp + 0x60]
cmp qword [rax], rcx
jne 0x1400033a0
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov qword [rax], rcx
mov rax, qword [rbp - 0x80]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x68]
mov dword [rax], edx
cmp byte [rbp - 0x3c], 0
je 0x1400033b0
lea rcx, [rsp + 0x48]
call fcn.1400051f0
lea rcx, [rsp + 0x48]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp - 0x18]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rbp + 0x1410]
xor rcx, rsp
call fcn.140006d30
lea r11, [rsp + 0x1520]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret