Function at 0x140004770
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x140014040]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov r14, rdx
mov rsi, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x58], xmm1
mov r8d, 0xe
lea rdx, str.ZwResumeThread
lea rcx, [rsp + 0x48]
call fcn.140008960
nop
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_new]
mov rbx, rax
test rax, rax
je 0x140004b64
call qword [sym.imp.libcrypto_3_x64.dll_EVP_aes_128_cbc]
mov rdx, rax
mov qword [rsp + 0x20], r14
mov r9, rsi
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.libcrypto_3_x64.dll_EVP_EncryptInit_ex]
mov rcx, rbx
cmp eax, 1
jne 0x140004b87
lea r9, [rsp + 0x48]
cmp qword [rsp + 0x60], 0xf
cmova r9, qword [rsp + 0x48]
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x20], eax
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x50]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_EncryptUpdate]
mov rcx, rbx
cmp eax, 1
jne 0x140004bb0
movsxd rdi, dword [rsp + 0x68]
lea rdx, [rbp - 0x50]
add rdx, rdi
lea r8, [rsp + 0x68]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_EncryptFinal_ex]
mov rcx, rbx
cmp eax, 1
jne 0x140004bd9
add edi, dword [rsp + 0x68]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
movsxd r8, edi
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x70]
call fcn.140008960
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 0xf
jbe 0x1400048c4
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400048be
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400048be
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b180
nop
movdqa xmm0, xmmword [0x14000e180]
movdqu xmmword [rsp + 0x58], xmm0
mov byte [rsp + 0x48], 0
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_new]
mov rbx, rax
test rax, rax
je 0x140004c02
call qword [sym.imp.libcrypto_3_x64.dll_EVP_aes_128_cbc]
mov rdx, rax
mov qword [rsp + 0x20], r14
mov r9, rsi
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.libcrypto_3_x64.dll_EVP_DecryptInit_ex]
mov rcx, rbx
cmp eax, 1
jne 0x140004c25
lea r9, [rsp + 0x70]
cmp qword [rbp - 0x78], 0xf
cmova r9, qword [rsp + 0x70]
mov eax, dword [rbp - 0x80]
mov dword [rsp + 0x20], eax
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x50]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_DecryptUpdate]
mov rcx, rbx
cmp eax, 1
jne 0x140004c4e
movsxd rdi, dword [rsp + 0x68]
lea rdx, [rbp - 0x50]
add rdx, rdi
lea r8, [rsp + 0x68]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_DecryptFinal_ex]
mov rcx, rbx
cmp eax, 1
jne 0x140004b3a
add edi, dword [rsp + 0x68]
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x60], xmm1
movsxd r8, edi
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x70]
call fcn.140008960
nop
lea rcx, [0x14000d868]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r11, rax
mov rsi, qword [rbp - 0x58]
mov rdi, qword [rbp - 0x70]
test rax, rax
jne 0x1400049ba
lea rdx, str.Failed_to_get_module_handle_for_ntdll.dll
jmp 0x140004a7b
lea rcx, [rbp - 0x70]
cmp rsi, 0xf
jbe 0x1400049d0
mov rcx, rdi
test rdi, rdi
je 0x140004a74
xor r8d, r8d
movzx eax, byte [rcx]
test al, al
je 0x1400049f5
nop word [rax + rax]
ror r8d, 0xd
movsx eax, al
add r8d, eax
lea rcx, [rcx + 1]
movzx eax, byte [rcx]
test al, al
jne 0x1400049e0
movsxd rax, dword [r11 + 0x3c]
mov ecx, dword [rax + r11 + 0x88]
add rcx, r11
mov r10d, dword [rcx + 0x20]
add r10, r11
mov r14d, dword [rcx + 0x24]
add r14, r11
mov r15d, dword [rcx + 0x1c]
add r15, r11
xor r9d, r9d
mov ebx, dword [rcx + 0x18]
test ebx, ebx
je 0x140004a74
mov edx, dword [r10]
add rdx, r11
xor ecx, ecx
movzx eax, byte [rdx]
test al, al
je 0x140004a53
nop dword [rax]
nop word [rax + rax]
ror ecx, 0xd
movsx eax, al
add ecx, eax
lea rdx, [rdx + 1]
movzx eax, byte [rdx]
test al, al
jne 0x140004a40
cmp ecx, r8d
je 0x140004a66
inc r9d
add r10, 4
cmp r9d, ebx
jb 0x140004a23
jmp 0x140004a74
movzx ecx, word [r14 + r9*2]
mov ebx, dword [r15 + rcx*4]
add rbx, r11
jne 0x140004a99
lea rdx, str.Failed_to_resolve_ZwResumeThread
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140008430
lea rdx, [0x140008610]
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]
xor ebx, ebx
cmp rsi, 0xf
jbe 0x140004ad4
lea rdx, [rsi + 1]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140004acb
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004acb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rdi
call fcn.14000b180
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 0xf
jbe 0x140004b14
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004b0e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004b0e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b180
nop
mov rax, rbx
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.14000ae00
mov rbx, qword [rsp + 0x180]
add rsp, 0x140
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
nop
lea rdx, str.Failed_to_finalize_decryption
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Failed_to_create_cipher_context
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
lea rdx, str.Failed_to_initialize_encryption
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
lea rdx, str.Failed_to_encrypt
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
lea rdx, str.Failed_to_finalize_encryption
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
lea rdx, str.Failed_to_create_cipher_context
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
lea rdx, str.Failed_to_initialize_decryption
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
call qword [sym.imp.libcrypto_3_x64.dll_EVP_CIPHER_CTX_free]
lea rdx, str.Failed_to_decrypt
lea rcx, [rsp + 0x30]
call fcn.140001520
lea rdx, [0x140011300]
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3