Function at 0x140006ba0
Capabilities:
Encrypt data using dpapi

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x2b0
movaps xmmword [rsp + 0x2a0], xmm6
mov rax, qword [0x140046040]
xor rax, rsp
mov qword [rsp + 0x298], rax
mov rbx, rdx
mov rdi, rcx
mov qword [rsp + 0x68], rcx
xor r15d, r15d
mov dword [rsp + 0x40], r15d
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x180]
call sub.VCRUNTIME140.dll_memset
cmp qword [rbx + 0x18], 0xf
jbe 0x140006c00
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rsp + 0x180]
call fcn.1400166b0
mov rax, qword [rsp + 0x180]
movsxd rcx, dword [rax + 4]
lea r12, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x180], r12
mov rax, qword [rsp + 0x180]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x17c], edx
mov qword [rsp + 0x100], r15
mov word [rsp + 0x108], 1
mov rax, qword [rsp + 0x180]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rsp + rcx + 0x1c8]
mov qword [rsp + 0xf0], rcx
test rcx, rcx
sete byte [rsp + 0xf8]
mov byte [rsp + 0xf9], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x150], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x160], xmm1
movaps xmm0, xmmword [rsp + 0xf0]
movaps xmmword [rsp + 0xf0], xmm0
movaps xmm6, xmmword [rsp + 0x100]
test rcx, rcx
je 0x140006d02
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 0x140006ce5
mov byte [rsp + 0xf9], al
mov rax, qword [rsp + 0xf0]
mov byte [rsp + 0xf8], 1
movaps xmm0, xmmword [rsp + 0xf0]
jmp 0x140006d07
mov rax, r15
mov qword [rsp + 0xf0], rax
mov byte [rsp + 0xf8], 1
movaps xmm0, xmmword [rsp + 0xf0]
jmp 0x140006d07
movq rax, xmm0
test rax, rax
movq rax, xmm6
jne 0x140006e43
test rax, rax
je 0x140006e4c
movdqa xmmword [rsp + 0x100], xmm6
movdqa xmmword [rsp + 0xf0], xmm0
lea r8, [rsp + 0x100]
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x150]
call fcn.14001ee40
nop
lea rax, [rsp + 0x70]
mov qword [rsp + 0xa8], r15
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x170]
call fcn.140018430
nop
lea rax, [rsp + 0x48]
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x60], r15
mov r8d, 8
lea rdx, str.os_crypt
lea rcx, [rsp + 0x48]
call fcn.140019740
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x170]
call fcn.14001ba10
mov rbx, rax
lea rax, [rsp + 0x130]
xorps xmm0, xmm0
movups xmmword [rsp + 0x130], xmm0
mov qword [rsp + 0x140], r15
mov qword [rsp + 0x148], r15
mov r8d, recv
lea rdx, str.encrypted_key
lea rcx, [rsp + 0x130]
call fcn.140019740
lea rdx, [rsp + 0x130]
mov rcx, rbx
call fcn.14001ba10
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x110], xmm0
mov rcx, r15
mov qword [rsp + 0x120], rcx
mov qword [rsp + 0x128], recv
mov byte [rsp + 0x110], cl
mov dword [rsp + 0x40], 8
cmp byte [rax], 3
jne 0x14000726b
jmp 0x140006e6a
test rax, rax
je 0x140006d1e
movdqa xmm0, xmmword [0x14003b170]
movdqu xmmword [rsp + 0x160], xmm0
mov byte [rsp + 0x150], 0
jmp 0x140006d4e
mov rdx, qword [rax + 8]
lea rax, [rsp + 0x110]
cmp rax, rdx
je 0x140006e9e
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 0xf
jbe 0x140006e89
mov rdx, qword [rdx]
lea rcx, [rsp + 0x110]
call fcn.140014ee0
mov rcx, qword [rsp + 0x120]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
mov r8, qword [rsp + 0x120]
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x110]
cmp qword [rsp + 0x128], 0xf
cmova rcx, qword [rsp + 0x110]
mov rsi, 0xffffffffffffffff
mov edx, esi
call qword [sym.imp.libcrypto_3_x64.dll_BIO_new_mem_buf]
mov rbx, rax
call qword [sym.imp.libcrypto_3_x64.dll_BIO_f_base64]
mov rcx, rax
call qword [sym.imp.libcrypto_3_x64.dll_BIO_new]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.libcrypto_3_x64.dll_BIO_push]
mov rbx, rax
mov edx, 0x100
mov rcx, rax
call qword [sym.imp.libcrypto_3_x64.dll_BIO_set_flags]
mov r8d, dword [rsp + 0x120]
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.libcrypto_3_x64.dll_BIO_read]
xorps xmm0, xmm0
movups xmmword [rsp + 0x130], xmm0
mov qword [rsp + 0x140], r15
mov qword [rsp + 0x148], r15
movsxd r8, eax
mov rdx, r14
lea rcx, [rsp + 0x130]
call fcn.140019740
mov rcx, rbx
call qword [sym.imp.libcrypto_3_x64.dll_BIO_free_all]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
mov rax, qword [rsp + 0x140]
cmp rax, 5
jb 0x1400072ad
add rax, 0xfffffffffffffffb
cmp rax, 0xffffffffffffffff
cmovb rsi, rax
lea rdx, [rsp + 0x130]
cmp qword [rsp + 0x148], 0xf
cmova rdx, qword [rsp + 0x130]
add rdx, 5
mov r8, rsi
lea rcx, [rsp + 0x48]
call fcn.140019740
nop
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], recv
mov byte [rdi], 0
mov dword [rsp + 0x40], reloc.WS2_32.dll_WSACleanup
lea rax, [rsp + 0x48]
cmp qword [rsp + 0x60], 0xf
cmova rax, qword [rsp + 0x48]
mov qword [rsp + 0xf8], rax
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0xf0], eax
lea rax, [rsp + 0x100]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xf0]
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
je 0x14000705b
mov r8d, dword [rsp + 0x100]
mov rdx, qword [rsp + 0x108]
mov rcx, rdi
call fcn.140014ee0
mov rcx, qword [rsp + 0x108]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14000707f
lea rdx, str.CryptUnprotectData_failed.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140018210
lea rdx, [0x1400183f0]
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]
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 0xf
jbe 0x1400070c0
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400070ba
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400070ba
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400329e0
nop
mov rdx, qword [rsp + 0x148]
cmp rdx, 0xf
jbe 0x140007107
inc rdx
mov rcx, qword [rsp + 0x130]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140007101
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140007101
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400329e0
nop
mov rdx, qword [rsp + 0x128]
cmp rdx, 0xf
jbe 0x14000714d
inc rdx
mov rcx, qword [rsp + 0x110]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140007148
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140007148
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400329e0
mov qword [rsp + 0x120], r15
mov qword [rsp + 0x128], recv
mov byte [rsp + 0x110], 0
movzx edx, byte [rsp + 0x170]
lea rcx, [rsp + 0x178]
call fcn.1400173e0
nop
mov rdx, qword [rsp + 0x168]
cmp rdx, 0xf
jbe 0x1400071c5
inc rdx
mov rcx, qword [rsp + 0x150]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400071c0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400071c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400329e0
movdqa xmm0, xmmword [0x14003b170]
movdqu xmmword [rsp + 0x160], xmm0
mov byte [rsp + 0x150], 0
mov rcx, qword [rsp + 0x180]
movsxd rdx, dword [rcx + 4]
mov qword [rsp + rdx + 0x180], r12
mov rcx, qword [rsp + 0x180]
movsxd rdx, dword [rcx + 4]
lea r8d, [rdx - 0xb0]
mov dword [rsp + rdx + 0x17c], r8d
lea rcx, [rsp + 0x190]
call fcn.140014430
lea rcx, [rsp + 0x198]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rsp + 0x230]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rax, rdi
jmp 0x14000723b
mov rcx, qword [rsp + 0x298]
xor rcx, rsp
call fcn.1400329c0
mov rbx, qword [rsp + 0x2f0]
movaps xmm6, xmmword [rsp + 0x2a0]
add rsp, 0x2b0
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
mov rcx, rax
call fcn.14001b980
mov qword [rsp + 0x68], rax
lea r8, [rsp + 0x68]
lea rcx, [rsp + 0x48]
call fcn.14002cc40
nop
mov r8, rax
lea rcx, [rsp + 0xb0]
call fcn.14001ec10
lea rdx, [0x1400430c0]
lea rcx, [rsp + 0xb0]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call fcn.140017930
int3