Function at 0x180003690
Capabilities:
Encrypt or decrypt data via bcrypt

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x250]
sub rsp, 0x350
mov rax, qword [0x180056040]
xor rax, rsp
mov qword [rbp + 0x240], rax
mov r12, rdx
mov r13, rcx
mov dword [rsp + 0x60], 0
mov qword [rbp - 0x68], 0
mov qword [rbp - 0x70], 0
xor edx, edx
mov r8d, 0x110
lea rcx, [rbp + 0xb0]
call sub.VCRUNTIME140.dll_memset
mov rbx, r13
cmp qword [r13 + 0x18], 0xf
jbe 0x180003700
mov rbx, qword [r13]
lea rax, [0x180000000]
lea rax, [rax + 0x49bb8]
mov qword [rbp + 0xb0], rax
lea rcx, [rbp + 0x160]
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 + 0x60], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0xc0]
lea rcx, [rbp + 0xb0]
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 + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0xb0], rax
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0xac], edx
lea rcx, [rbp + 0xc0]
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 + 0xc0], rax
mov byte [rbp + 0x13c], 0
mov byte [rbp + 0x131], 0
lea rcx, [rbp + 0xc0]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x140], 0
mov rax, qword [0x180056ff8]
mov qword [rbp + 0x134], rax
mov qword [rbp + 0x128], 0
mov r8d, 0x21
mov rdx, rbx
lea rcx, [rbp + 0xc0]
call fcn.1800056e0
test rax, rax
jne 0x180003810
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0xb0]
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 rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0xb0], rax
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0xac], edx
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0xb0]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
je 0x180003f05
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x1c8], xmm0
mov qword [rbp + 0x1d8], rax
mov qword [rsp + 0x70], rax
mov word [rsp + 0x78], 1
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
mov rax, qword [rbp + rcx + 0xf8]
mov qword [rbp + 0x1e0], rax
test rax, rax
sete byte [rbp + 0x1e8]
mov byte [rbp + 0x1e9], 0
movdqu xmmword [rbp + 0x1c8], xmm0
mov qword [rbp + 0x1d8], 0
lea rcx, [rbp + 0x1c8]
mov qword [rbp + 0x200], rcx
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x60], xmm0
movaps xmm1, xmmword [rbp + 0x1e0]
movdqa xmmword [rsp + 0x70], xmm1
movzx esi, byte [rsp + 0x79]
mov rbx, qword [rsp + 0x70]
movzx r15d, byte [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
test rax, rax
jne 0x18000390a
movzx r14d, byte [rsp + 0x78]
jmp 0x180003927
test rbx, rbx
je 0x180003922
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 0x180003922
movzx esi, al
jmp 0x180003924
xor ebx, ebx
mov r14b, 1
test r15b, r15b
jne 0x180003944
test rdi, rdi
je 0x18000393f
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 0x180003941
xor edi, edi
mov r15b, 1
test rbx, rbx
jne 0x180003dae
test rdi, rdi
jne 0x180003db7
lea rcx, [rbp + 0xc0]
call fcn.1800055a0
test rax, rax
jne 0x18000398a
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0xb0]
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]
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x180049a28]
lea rcx, [rbp - 0x68]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x180003ec2
xor esi, esi
mov dword [rbp + 0x1c0], esi
mov dword [rbp + 0x200], esi
mov dword [rsp + 0x28], esi
lea rax, [rbp + 0x200]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp + 0x1c0]
lea rdx, str.ObjectLength
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
test eax, eax
js 0x180003ec2
xorps xmm0, xmm0
mov r9d, dword [rbp + 0x1c0]
mov edi, r9d
movdqu xmmword [rbp + 0x208], xmm0
mov qword [rbp + 0x218], rsi
test r9d, r9d
je 0x180003a40
mov edx, r9d
lea rcx, [rbp + 0x208]
call fcn.180006720
mov rcx, qword [rbp + 0x208]
lea rbx, [rcx + rdi]
mov r8d, edi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x210], rbx
mov r9d, dword [rbp + 0x1c0]
mov ecx, dword [r12 + 0x30]
lea rax, [r12 + 0x20]
cmp qword [rax + 0x18], 0xf
jbe 0x180003a54
mov rax, qword [rax]
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
mov r8, qword [rbp + 0x208]
lea rdx, [rbp - 0x70]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
test eax, eax
js 0x180003e7e
mov dword [rbp + 0x1c4], esi
mov ecx, dword [r12 + 0x10]
mov rax, r12
cmp qword [r12 + 0x18], 0xf
jbe 0x180003a98
mov rax, qword [r12]
mov r8d, dword [rbp + 0x1d0]
mov rdx, qword [rbp + 0x1c8]
sub r8d, edx
mov dword [rsp + 0x48], 1
lea r9, [rbp + 0x1c4]
mov qword [rsp + 0x40], r9
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
js 0x180003e7e
xorps xmm0, xmm0
mov edi, dword [rbp + 0x1c4]
movdqu xmmword [rbp + 0x1e0], xmm0
mov qword [rbp + 0x1f0], rsi
mov ebx, esi
test rdi, rdi
je 0x180003b2d
mov edx, edi
lea rcx, [rbp + 0x1e0]
call fcn.180006720
mov rcx, qword [rbp + 0x1e0]
lea rbx, [rcx + rdi]
mov r8d, edi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x1e8], rbx
mov rax, qword [rbp + 0x1e0]
sub ebx, eax
mov ecx, dword [r12 + 0x10]
cmp qword [r12 + 0x18], 0xf
jbe 0x180003b47
mov r12, qword [r12]
mov r8d, dword [rbp + 0x1d0]
mov rdx, qword [rbp + 0x1c8]
sub r8d, edx
mov dword [rsp + 0x48], 1
lea r9, [rbp + 0x1c4]
mov qword [rsp + 0x40], r9
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.bcrypt.dll_BCryptEncrypt]
test eax, eax
js 0x180003e3a
mov rdx, r13
lea rcx, [rsp + 0x70]
call fcn.1800051c0
mov rdx, rax
lea rcx, [rbp + 0x220]
call fcn.180004080
nop
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll_memset
lea rbx, [rbp + 0x220]
cmp qword [rbp + 0x238], 0xf
cmova rbx, qword [rbp + 0x220]
lea rax, [0x180000000]
lea rax, [rax + 0x49b80]
mov qword [rbp - 0x60], rax
lea rcx, [rbp + 0x48]
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 + 0x60], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x60]
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 - 0x60]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rdi
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
lea rcx, [rbp - 0x58]
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 - 0x58], rax
mov byte [rbp + 0x24], 0
mov byte [rbp + 0x19], 0
lea rcx, [rbp - 0x58]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp + 0x28], rsi
mov rax, qword [0x180056ff8]
mov qword [rbp + 0x1c], rax
mov qword [rbp + 0x10], rsi
mov r8d, 0x22
mov rdx, rbx
lea rcx, [rbp - 0x58]
call fcn.1800056e0
test rax, rax
jne 0x180003ca7
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
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 rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x60], rdi
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
je 0x180003d26
mov r8, qword [rbp + 0x1e8]
mov rdx, qword [rbp + 0x1e0]
sub r8, rdx
lea rcx, [rbp - 0x60]
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 - 0x58]
call fcn.1800055a0
test rax, rax
jne 0x180003d26
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rbp - 0x60]
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 rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x60], rdi
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
lea rcx, [rbp - 0x58]
call fcn.180004f10
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x48]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rdx, qword [rbp + 0x238]
cmp rdx, 0xf
jbe 0x180003e3a
inc rdx
mov rcx, qword [rbp + 0x220]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003e34
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180003e34
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
test rdi, rdi
jne 0x180003956
test r14b, r14b
jne 0x180003dd6
test rbx, rbx
je 0x180003dd4
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 0x180003dd4
movzx esi, al
jmp 0x180003dd6
xor ebx, ebx
mov byte [rsp + 0x50], sil
mov rax, qword [rbp + 0x1d0]
cmp rax, qword [rbp + 0x1d8]
je 0x180003df7
mov byte [rax], sil
inc qword [rbp + 0x1d0]
jmp 0x180003e0f
lea r8, [rsp + 0x50]
mov rdx, qword [rbp + 0x1d0]
lea rcx, [rbp + 0x1c8]
call fcn.1800069a0
test rbx, rbx
je 0x180003922
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 0x180003922
mov byte [rsp + 0x78], 0
jmp 0x18000390a
call fcn.180027ccc
nop
mov rcx, qword [rbp + 0x1e0]
test rcx, rcx
je 0x180003e7e
mov rdx, qword [rbp + 0x1f0]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003e78
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180003e78
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180027ccc
nop
mov rcx, qword [rbp + 0x208]
test rcx, rcx
je 0x180003ec2
mov rdx, qword [rbp + 0x218]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003ebc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180003ebc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180027ccc
nop
mov rcx, qword [rbp + 0x1c8]
test rcx, rcx
je 0x180003f05
mov rdx, qword [rbp + 0x1d8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180003f00
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180003f00
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180027ccc
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.bcrypt.dll_BCryptDestroyKey]
xor edx, edx
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
nop
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0xb0], rax
mov rax, qword [rbp + 0xb0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rbp + rcx + 0xac], edx
lea rcx, [rbp + 0xc0]
call fcn.180004f10
lea rcx, [rbp + 0xc8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x160]
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 + 0x240]
xor rcx, rsp
call fcn.180027890
mov rbx, qword [rsp + 0x3a0]
add rsp, 0x350
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret