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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1580]
mov eax, 0x1680
call fcn.1400046f0
sub rsp, rax
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rbp + 0x1570], rax
xor r12d, r12d
mov dword [rsp + 0x24], r12d
xorps xmm0, xmm0
movups xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], 0xf
lea ecx, [r12 + 0x50]
call fcn.1400038c0
mov rbx, rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x68], 0x4c
mov qword [rbp - 0x60], 0x4f
movaps xmm0, xmmword [str.C:Users.1_source_reposConsoleApplication3x64ReleaseConsoleApplication3]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [0x140005540]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [0x140005550]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [0x140005560]
movups xmmword [rax + 0x30], xmm1
movsd xmm0, qword [0x140005570]
movsd qword [rax + 0x40], xmm0
mov eax, dword [0x140005578]
mov dword [rbx + 0x48], eax
mov byte [rbx + 0x4c], r12b
xor edx, edx
mov r8d, 0x110
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x140000000]
lea rax, [rax + 0x56b0]
mov qword [rbp - 0x40], rax
lea rcx, [rbp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov r13d, 1
mov dword [rsp + 0x24], r13d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x40]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x40], rdi
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx - 0x44], edx
lea rcx, [rbp - 0x30]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x30], rax
mov byte [rbp + 0x4c], r12b
mov byte [rbp + 0x41], r12b
lea rcx, [rbp - 0x30]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x50], r12
mov rax, qword [0x140008a00]
mov qword [rbp + 0x44], rax
mov qword [rbp + 0x38], r12
lea r8d, [r12 + 0x21]
mov rdx, rbx
lea rcx, [rbp - 0x30]
call fcn.140002ce0
test rax, rax
jne 0x140001431
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x40]
add rcx, rax
xor r8d, r8d
lea edx, [r12 + 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 rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x40], rdi
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx - 0x44], edx
cmp qword [rbp + 0x50], 0
jne 0x140001499
lea rdx, str.Failed_to_open_file:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002e50
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 0xf
cmova rdx, qword [rbp - 0x78]
mov r8, qword [rbp - 0x68]
mov rcx, rax
call fcn.140003370
mov rcx, rax
lea rdx, [0x140003020]
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 0x140001aad
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x40], r12
mov word [rsp + 0x48], 1
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
mov rax, qword [rbp + rcx + 8]
mov qword [rsp + 0x30], rax
test rax, rax
sete byte [rsp + 0x38]
mov byte [rsp + 0x39], 0
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x50], rcx
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movaps xmm1, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm1
movzx esi, byte [rsp + 0x39]
mov rbx, qword [rsp + 0x30]
movzx r15d, byte [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
test rax, rax
jne 0x140001524
movzx r14d, byte [rsp + 0x38]
jmp 0x140001542
test rbx, rbx
je 0x14000153c
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
je 0x14000153c
movzx esi, al
jmp 0x14000153f
mov rbx, r12
mov r14b, 1
test r15b, r15b
jne 0x140001560
test rdi, rdi
je 0x14000155a
mov rcx, rdi
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
jne 0x14000155d
mov rdi, r12
mov r15b, 1
test rbx, rbx
jne 0x14000165a
test rdi, rdi
jne 0x140001663
lea rcx, [rbp - 0x30]
call fcn.140002c20
test rax, rax
jne 0x14000159c
mov rax, qword [rbp - 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x40]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rdi, qword [rsp + 0x60]
sub rdi, qword [rsp + 0x58]
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rbp + 0x1564], 0xffffffff
mov dword [rbp + 0x1e4], eax
mov rdx, r13
nop
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rbp + rdx*4 + 0x1e4], eax
inc rdx
cmp rdx, 0x270
jb 0x1400015c0
mov dword [rbp + 0x1e0], 0x270
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov rbx, r12
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x50], r12
xor r15d, r15d
mov qword [rbp - 0x48], r15
movabs rax, 0x7fffffffffffffff
test rdi, rdi
je 0x140001702
cmp rdi, rax
ja 0x140001b2e
cmp rdi, 0x1000
jb 0x1400016d7
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x140001b34
call fcn.1400038c0
test rax, rax
je 0x140001a4c
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x1400016e2
test rdi, rdi
jne 0x140001572
test r14b, r14b
jne 0x140001683
test rbx, rbx
je 0x140001680
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void____ptr64]
cmp eax, 0xffffffff
je 0x140001680
movzx esi, al
jmp 0x140001683
mov rbx, r12
mov byte [rsp + 0x20], sil
mov rax, qword [rsp + 0x60]
cmp rax, qword [rsp + 0x68]
je 0x14000169e
mov byte [rax], sil
inc qword [rsp + 0x60]
jmp 0x1400016b2
lea r8, [rsp + 0x20]
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x58]
call fcn.1400036c0
test rbx, rbx
je 0x14000153c
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_int___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::sbumpc_void____ptr64]
cmp eax, 0xffffffff
je 0x14000153c
mov byte [rsp + 0x38], 0
jmp 0x140001524
mov rcx, rdi
call fcn.1400038c0
mov rbx, rax
mov qword [rbp - 0x58], rbx
lea r12, [rbx + rdi]
mov r15, r12
mov qword [rbp - 0x48], r12
mov r8, rdi
xor edx, edx
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
mov qword [rbp - 0x50], r12
xor esi, esi
test rdi, rdi
je 0x140001731
nop dword [rax]
lea rcx, [rbp + 0x1e0]
call fcn.140003530
mov ecx, eax
shl rcx, 8
shr rcx, 0x20
mov byte [rsi + rbx], cl
inc rsi
cmp rsi, rdi
jb 0x140001710
xorps xmm0, xmm0
mov rax, qword [rsp + 0x60]
mov r14, rax
mov r8, qword [rsp + 0x58]
sub r14, r8
movdqu xmmword [rsp + 0x70], xmm0
mov esi, 0
mov qword [rbp - 0x80], rsi
je 0x1400017d3
movabs rax, 0x7fffffffffffffff
cmp r14, rax
ja 0x140001b3a
cmp r14, 0x1000
jb 0x14000179a
lea rcx, [r14 + 0x27]
cmp rcx, r14
jbe 0x140001b28
call fcn.1400038c0
test rax, rax
je 0x140001a10
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x1400017a5
mov rcx, r14
call fcn.1400038c0
mov rdi, rax
mov qword [rsp + 0x70], rdi
lea rsi, [rdi + r14]
mov qword [rbp - 0x80], rsi
mov r8, r14
xor edx, edx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memset
mov r14, rsi
mov qword [rsp + 0x78], rsi
mov rax, qword [rsp + 0x60]
mov r8, qword [rsp + 0x58]
jmp 0x1400017dd
mov r14, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x70]
xor ecx, ecx
cmp rax, r8
je 0x14000181a
sub r12, rbx
nop word [rax + rax]
xor edx, edx
mov rax, rcx
div r12
movzx eax, byte [rcx + r8]
xor al, byte [rdx + rbx]
not al
mov byte [rdi + rcx], al
inc rcx
mov rax, qword [rsp + 0x60]
mov r8, qword [rsp + 0x58]
sub rax, r8
cmp rcx, rax
jb 0x1400017f0
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0xd0]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x140000000]
lea rax, [rax + 0x56a8]
mov qword [rbp + 0xd0], rax
lea rcx, [rbp + 0x178]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x24], 0xf
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0xd8]
lea rcx, [rbp + 0xd0]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rbp + 0xd0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0xd0], rax
mov rax, qword [rbp + 0xd0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0xcc], edx
lea rcx, [rbp + 0xd8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp + 0xd8], rax
mov byte [rbp + 0x154], 0
mov byte [rbp + 0x149], 0
lea rcx, [rbp + 0xd8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
xor r12d, r12d
mov qword [rbp + 0x158], r12
mov rax, qword [0x140008a00]
mov qword [rbp + 0x14c], rax
mov qword [rbp + 0x140], r12
lea r8d, [r12 + 0x22]
lea rdx, str.encrypted_file.bin
lea rcx, [rbp + 0xd8]
call fcn.140002ce0
test rax, rax
jne 0x14000193c
mov rax, qword [rbp + 0xd0]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0xd0]
add rcx, rax
xor r8d, r8d
lea edx, [r12 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
cmp qword [rbp + 0x158], 0
jne 0x14000196b
lea rdx, str.Failed_to_create_encrypted_file
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002e50
mov rcx, rax
lea rdx, [0x140003020]
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 0x1400019da
sub r14, rdi
mov r8, r14
mov rdx, rdi
lea rcx, [rbp + 0xd0]
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]
lea rcx, [rbp + 0xd8]
call fcn.140002c20
test rax, rax
jne 0x1400019b4
mov rax, qword [rbp + 0xd0]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0xd0]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rdx, str.File_encrypted_successfully.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140002e50
mov rcx, rax
lea rdx, [0x140003020]
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]
mov r13d, r12d
lea rcx, [rbp + 0xd0]
call fcn.140001c00
nop
test rdi, rdi
je 0x140001a23
sub rsi, rdi
mov rax, rdi
cmp rsi, 0x1000
jb 0x140001a17
add rsi, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a17
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rdx, rsi
mov rcx, rdi
call fcn.1400038fc
nop
test rbx, rbx
je 0x140001a5f
sub r15, rbx
mov rax, rbx
cmp r15, 0x1000
jb 0x140001a53
add r15, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a53
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rdx, r15
mov rcx, rbx
call fcn.1400038fc
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140001aad
mov rdx, qword [rsp + 0x68]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001a99
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001a99
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400038fc
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
lea rcx, [rbp - 0x40]
call fcn.140001b40
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 0xf
jbe 0x140001af5
inc rdx
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001af0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001af0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400038fc
mov eax, r13d
mov rcx, qword [rbp + 0x1570]
xor rcx, rsp
call fcn.1400038a0
lea r11, [rsp + 0x1680]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140001110
nop
call fcn.140003350
int3
call fcn.140001110
nop
call fcn.140003350
int3