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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f7408
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x98
mov eax, dword [0x513040]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x98], ecx
mov edi, dword [ebx + 8]
mov dword [ebp - 0xa4], edi
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov byte [ebp - 4], 1
mov esi, dword [ebx + 0x10]
sub esi, dword [ebx + 0xc]
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0xa0], esi
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
je 0x402459
cmp esi, 0x7fffffff
ja 0x402a0e
push esi
lea ecx, [ebp - 0x28]
call fcn.00405390
push dword [ebp - 0xa0]
mov eax, dword [ebp - 0x28]
add esi, eax
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x24], esi
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x9c], 0
call fcn.00405300
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
xor esi, esi
movq qword [ebp - 0x44], xmm0
xor eax, eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 3
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x2c], eax
push 0xc
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
call fcn.004f5ee9
mov ecx, eax
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x34], ecx
xorps xmm0, xmm0
add esp, 4
lea eax, [ecx + 0xc]
mov dword [ebp - 0x2c], eax
movq qword [ecx], xmm0
mov dword [ecx + 8], esi
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x30], eax
call fcn.00405300
mov byte [ebp - 4], 4
mov eax, dword [ebx + 0xc]
lea ecx, [eax + 0xf]
add eax, 3
sub ecx, eax
push ecx
push eax
push dword [ebp - 0x34]
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebx + 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0xa0]
add ecx, eax
add eax, 0xf
sub ecx, eax
push ecx
push eax
push dword [ebp - 0x28]
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea eax, [ebp - 0x48]
push esi
push esi
push 0x4fb764
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov dword [ebp - 0x94], eax
test eax, eax
jns 0x402635
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.BCryptOpenAlgorithmProvider_failed_with_status:
call fcn.00404990
push dword [ebp - 0x94]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int_]
push 0x404b70
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xorps xmm0, xmm0
mov ecx, edi
movups xmmword [edi], xmm0
push 0
mov dword [edi + 0x10], 0
push 0x4fb681
mov dword [edi + 0x14], 0
call fcn.00404da0
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x4025b1
mov edx, dword [ebp - 0x2c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402592
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4025fa
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4025db
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x40262e
mov edx, dword [ebx + 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402624
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
add esp, 8
mov eax, edi
jmp 0x4029ee
push 0
push 0x20
push str.ChainingModeGCM
push str.ChainingMode
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptSetProperty]
mov dword [ebp - 0x94], eax
test eax, eax
jns 0x402691
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.BCryptSetProperty_failed_with_status:
call fcn.00404990
push dword [ebp - 0x94]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int_]
push 0x404b70
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
jmp 0x402546
mov eax, dword [ebp - 0x98]
push 0
mov eax, dword [eax]
push dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x4c]
push 0
push 0
push eax
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptGenerateSymmetricKey]
mov dword [ebp - 0x98], eax
test eax, eax
jns 0x4026d3
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.BcryptGenertaeSymmetricKey_failed_with_status:
call fcn.00404990
push dword [ebp - 0x98]
jmp 0x40266c
mov edx, dword [ebp - 0xa0]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x28]
add edx, 0xffffffe1
mov eax, dword [ebp - 0x34]
push 0
mov dword [ebp - 0x88], eax
lea eax, [ecx + edx]
movlpd qword [ebp - 0x80], xmm0
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x90]
movlpd qword [ebp - 0x70], xmm0
push eax
push edx
push ecx
push dword [ebp - 0x4c]
movlpd qword [ebp - 0x68], xmm0
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
mov dword [ebp - 0x90], 0x40
mov dword [ebp - 0x8c], 1
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x84], 0xc
mov dword [ebp - 0x74], 0x10
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov dword [ebp - 0x98], eax
test eax, eax
jns 0x40277a
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.BCryptDecrypt__1__failed_with_status:
call fcn.00404990
push dword [ebp - 0x98]
jmp 0x402531
mov ecx, dword [ebp - 0x38]
test ecx, ecx
je 0x40279a
push ecx
push ecx
lea ecx, [ebp - 0x44]
call fcn.00405d00
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x44]
mov dword [ebp - 0x9c], eax
push 0
lea eax, [ebp - 0x38]
push eax
push ecx
push esi
push 0
push 0
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x94]
push dword [ebp - 0x28]
push dword [ebp - 0x4c]
call dword [sym.imp.bcrypt.dll_BCryptDecrypt]
mov dword [ebp - 0x98], eax
test eax, eax
jns 0x40289d
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.BCrypt_Decrypt__2__failed_with_status:
call fcn.00404990
push dword [ebp - 0x98]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___long_int_]
push 0x404b70
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xorps xmm0, xmm0
mov ecx, edi
push 0
movups xmmword [edi], xmm0
push 0x4fb681
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.00404da0
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x402863
mov edx, dword [ebp - 0x2c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402844
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
test esi, esi
je 0x4025b1
mov ecx, dword [ebp - 0x9c]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x402891
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push ecx
push esi
call fcn.004f5f19
jmp 0x4025ae
push 0
push dword [ebp - 0x48]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
push ecx
push dword [ebp - 0x40]
mov ecx, edi
push esi
call fcn.00404ba0
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x4028fd
mov edx, dword [ebp - 0x2c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4028de
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
test esi, esi
je 0x402931
mov ecx, dword [ebp - 0x9c]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x402927
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push ecx
push esi
call fcn.004f5f19
add esp, 8
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x402976
mov edx, dword [ebp - 0x20]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402957
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4029a8
push edx
push ecx
call fcn.004f5f19
add esp, 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x40262e
mov edx, dword [ebx + 0x14]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x402624
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402624
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xa4]
xorps xmm0, xmm0
push 0
push 0x4fb681
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.00404da0
mov eax, 0x4029dd
ret
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004f5edb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
call fcn.00405380
int3