Function at 0x140039680
Capabilities:
Encrypt data using dpapi

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x230
mov rax, qword [0x1400ab008]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov r15, rcx
mov qword [rsp + 0x48], rcx
xor r13d, r13d
mov dword [rsp + 0x44], r13d
mov r14b, 1
mov rax, qword [rcx + 0xe0]
add rcx, 0xe0
call qword [rax + 0x10]
mov rdi, rax
mov rcx, rax
call fcn.140059834
mov r12, rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x200], rax
mov rax, qword [r15 + 0xe0]
mov r8, rdi
mov rdx, r12
lea rcx, [r15 + 0xe0]
call qword [rax + 8]
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x80]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x80]
call fcn.14003b1a0
nop
mov qword [rsp + 0x1c0], r13
mov qword [rsp + 0x1d0], r13
mov esi, 7
mov qword [rsp + 0x1d8], rsi
mov word [rsp + 0x1c0], r13w
mov rax, qword [rsp + 0x80]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x80]
add rcx, rax
lea edx, [rsi - 1]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::ios_base::exceptions_int____ptr64]
mov dword [rsp + 0x70], edi
mov qword [rsp + 0x78], r12
lea rdx, [r15 + 0x70]
cmp qword [r15 + 0x88], 8
jb 0x140039786
mov rdx, qword [r15 + 0x70]
mov qword [rsp + 0x1a0], r13
mov qword [rsp + 0x1b0], r13
mov qword [rsp + 0x1b8], 7
mov word [rsp + 0x1a0], r13w
mov r8, qword [r15 + 0x80]
lea rcx, [rsp + 0x1a0]
call fcn.140006a60
nop
lea rcx, [rsp + 0x1a0]
cmp qword [rsp + 0x1b8], 8
cmovae rcx, qword [rsp + 0x1a0]
mov r9d, 0xffffffff
mov r8d, 6
lea rdx, [rsp + 0x1e0]
call fcn.140059ebc
mov edx, eax
test eax, eax
jne 0x140039832
mov ebx, dword [rsp + 0x1f0]
bt ebx, 0xa
jae 0x140039827
mov eax, dword [rsp + 0x1f4]
cmp eax, 0xa000000c
jne 0x140039819
lea ebx, [rdx + 4]
jmp 0x14003985d
cmp eax, 0xa0000003
jne 0x140039827
mov ebx, 0xa
jmp 0x14003985d
and ebx, 0x10
or ebx, 0x20
shr ebx, 4
jmp 0x14003985d
sub eax, 2
je 0x14003984a
sub eax, 1
je 0x14003984a
sub eax, 0x32
je 0x14003984a
cmp eax, 0x46
je 0x14003984a
xor al, al
jmp 0x14003984c
mov al, 1
movzx ebx, al
lea eax, [rbx - 1]
test eax, 0xfffffff7
jne 0x140039c11
mov rdx, qword [rsp + 0x1b8]
cmp rdx, 8
jb 0x1400398a8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x1a0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400398a3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400398a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140058b40
cmp ebx, 4
je 0x140039abf
lea rdx, [r15 + 0x70]
cmp qword [r15 + 0x88], 8
jb 0x1400398c3
mov rdx, qword [r15 + 0x70]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
lea rcx, [rsp + 0x70]
call qword [sym.imp.CRYPT32.dll_CryptProtectData]
test eax, eax
je 0x140039abf
lea rbx, [r15 + 0x90]
lea rax, [rsp + 0x1c0]
cmp rax, rbx
je 0x14003992d
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x140039914
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x10]
lea rcx, [rsp + 0x1c0]
call fcn.140006a60
mov rsi, qword [rsp + 0x1d8]
mov qword [rsp + 0x1e0], r13
mov qword [rsp + 0x1f0], r13
mov qword [rsp + 0x1f8], 7
mov word [rsp + 0x1e0], r13w
mov dword [rsp + 0x44], 7
lea rcx, [rsp + 0x1a0]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x1a0]
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
mov rdx, qword [rsp + 0x58]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140039990
lea rcx, [rsp + 0x1e0]
call fcn.140006a60
lea rcx, [rsp + 0x58]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
lea rdx, [rsp + 0x1e0]
mov rcx, rbx
call fcn.140009a20
nop
mov rdx, qword [rsp + 0x1f8]
cmp rdx, 8
jb 0x140039a0f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x1e0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140039a0a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140039a0a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140058b40
mov r8d, dword [r15 + 0x48]
lea rdx, [r15 + 0x70]
lea rcx, [rsp + 0x80]
call fcn.14003b080
mov r8d, dword [r15 + 0x40]
cmp qword [rbx + 0x18], 8
jb 0x140039a32
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rsp + 0x90]
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 r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
lea rcx, [rsp + 0x90]
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, [rsp + 0x98]
call fcn.14003b500
test rax, rax
jne 0x140039a92
mov rax, qword [rsp + 0x80]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x80]
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]
nop
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140039ac2
xor r14b, r14b
cmp rsi, 8
jb 0x140039b06
lea rdx, [rsi*2 + 2]
mov rcx, qword [rsp + 0x1c0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140039b00
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140039b00
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140058b40
nop
mov rax, qword [rsp + 0x80]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x80], rax
mov rax, qword [rsp + 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb8]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x98], rax
cmp qword [rsp + 0x118], 0
je 0x140039b90
mov rax, qword [rsp + 0xb0]
lea rcx, [rsp + 0x108]
cmp qword [rax], rcx
jne 0x140039b90
mov rdx, qword [rsp + 0x128]
mov rcx, qword [rsp + 0x120]
mov qword [rax], rcx
mov rax, qword [rsp + 0xd0]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rsp + 0xe8]
mov dword [rax], edx
cmp byte [rsp + 0x114], 0
je 0x140039ba7
lea rcx, [rsp + 0x98]
call fcn.14003b500
lea rcx, [rsp + 0x98]
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 + 0xa0]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x138]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov edx, 1
mov rcx, r12
call fcn.140058b40
movzx eax, r14b
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.140058b20
lea r11, [rsp + 0x230]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
lea r8, [rsp + 0x1a0]
call fcn.140010da0
int3