Function at 0x1401d9330
Capabilities:
Parse pe header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xc8
mov rax, qword [0x14038a2b0]
xor rax, rsp
mov qword [rbp - 9], rax
mov r15, rdx
mov r13, rcx
mov qword [rbp - 0x69], rcx
mov qword [rbp - 0x21], rdx
mov qword [rbp - 0x19], r8
mov qword [rbp - 0x11], r9
movzx edi, byte [rbp + 0x77]
mov byte [rsp + 0x30], dil
mov rax, qword [rbp + 0x8f]
mov qword [rbp - 0x51], rax
mov rax, qword [rbp + 0x97]
mov qword [rbp - 0x49], rax
mov rcx, rdx
call fcn.140076390
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1401d9820
movsxd r14, dword [rax + 0x3c]
add r14, rax
cmp dword [r14], 0x4550
jne 0x1401d9820
mov eax, 0x20b
cmp word [r14 + 0x18], ax
je 0x1401d93ce
lea rdx, str.____Image_is_not_64_bit
jmp 0x1401d9827
mov ebx, dword [r14 + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
mov qword [rbp - 0x59], rax
test rax, rax
je 0x1401d9844
movzx eax, word [r14 + 0x14]
mov ecx, dword [rax + r14 + 0x24]
mov dword [rsp + 0x34], ecx
xor r12d, r12d
mov eax, r12d
test dil, dil
cmovne eax, ecx
mov dword [rbp - 0x79], eax
sub ebx, eax
mov qword [rbp - 0x71], r12
mov edx, ebx
mov qword [rsp + 0x40], rdx
cmp byte [rbp + 0x7f], r12b
je 0x1401d943a
lea r8, [rbp - 0x71]
mov rcx, r13
call fcn.1401d8f70
mov rdi, rax
jmp 0x1401d9519
test ebx, ebx
je 0x1401d94e8
mov r8d, 8
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x1403d34d8], eax
jle 0x1401d94bb
lea rcx, [0x1403d34d8]
call fcn.140266f58
cmp dword [0x1403d34d8], 0xffffffff
jne 0x1401d94b6
lea rdx, str.ExAllocatePoolWithTag
lea rcx, [rbp - 0x41]
call fcn.14000f350
nop
lea r8, [rbp - 0x41]
mov rdx, qword [0x14039b608]
mov rcx, r13
call fcn.1401d7040
mov qword [0x1403d3548], rax
lea rcx, [rbp - 0x41]
call fcn.14000f240
nop
lea rcx, [0x1403d34d8]
call fcn.140266ef8
mov rdx, qword [rsp + 0x40]
cmp qword [0x1403d3548], 0
jne 0x1401d94f9
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
mov rcx, rax
lea rdx, [0x1401d76d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov qword [rsp + 0x38], r12
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x1401d9745
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x38]
mov rcx, r13
call fcn.1401d80c0
test al, al
je 0x1401d94e8
mov rdi, qword [rsp + 0x38]
mov qword [rbp - 0x61], rdi
mov qword [rsp + 0x38], rdi
test rdi, rdi
jne 0x1401d9533
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x1401d9745
lea rdx, str.___Image_base_has_been_allocated_at_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x1401d76d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov ebx, dword [r14 + 0x54]
mov rcx, r15
call fcn.140076390
mov rdx, rax
mov r8d, ebx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memcpy
movzx eax, word [r14 + 0x14]
add rax, 0x24
xor ecx, ecx
cmp cx, word [r14 + 6]
jae 0x1401d95dd
lea rsi, [rax + r14]
mov r13, qword [rbp - 0x59]
test dword [rsi + 0x18], 0x80
ja 0x1401d95c0
mov edi, dword [rsi]
add rdi, r13
mov ebx, dword [rsi + 4]
mov rcx, r15
call fcn.140076390
mov edx, dword [rsi + 8]
add rdx, rax
mov r8d, ebx
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
inc r12d
add rsi, 0x28
movzx eax, word [r14 + 6]
cmp r12d, eax
jl 0x1401d9596
mov r13, qword [rbp - 0x69]
mov rdi, qword [rbp - 0x61]
mov rsi, qword [rbp - 0x59]
mov rbx, rdi
cmp byte [rsp + 0x30], 0
je 0x1401d963d
mov r12d, dword [rsp + 0x34]
sub rdi, r12
lea rdx, str.___Skipped_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
mov rcx, rax
lea rdx, [0x14012cc20]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, r12d
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes_of_PE_Header
call fcn.1401d74c0
mov rcx, rax
lea rdx, [0x1401d76d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rdx, rsi
lea rcx, [rbp - 0x41]
call fcn.1401da680
mov rdx, rdi
sub rdx, qword [r14 + 0x30]
mov rcx, rax
call fcn.1401d9870
mov rdx, rsi
lea rcx, [rbp - 0x41]
call fcn.1401da8b0
mov rdx, rax
mov rcx, r13
call fcn.1401d9950
test al, al
jne 0x1401d967f
lea rdx, str.____Failed_to_resolve_imports
jmp 0x1401d9745
mov r8d, dword [rbp - 0x79]
add r8, rsi
mov r9, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, r13
call fcn.1401d6a90
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
test al, al
jne 0x1401d96ad
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x1401d974c
mov r14d, dword [r14 + 0x28]
add r14, rdi
lea rdx, str.____Calling_DriverEntry_0x
call fcn.1401d74c0
mov rcx, rax
mov rdx, r14
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x1401d76d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov rax, qword [rbp - 0x51]
mov r12, qword [rbp - 0x71]
test rax, rax
je 0x1401d970d
mov qword [rsp + 0x20], r12
mov r9, qword [rsp + 0x40]
mov r8, rbx
lea rdx, [rbp - 0x11]
lea rcx, [rbp - 0x19]
call rax
test al, al
jne 0x1401d970d
lea rdx, str.____Callback_returns_false__failed_
jmp 0x1401d9745
xor eax, eax
mov dword [rsp + 0x34], eax
mov r9, qword [rbp - 0x19]
cmp byte [rbp + 0x87], al
cmovne r9, rbx
mov rax, qword [rbp - 0x11]
mov qword [rsp + 0x20], rax
mov r8, r14
lea rdx, [rsp + 0x34]
mov rcx, r13
call fcn.1401d9c10
test al, al
jne 0x1401d9784
lea rdx, str.____Failed_to_call_driver_entry
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
lea rdx, [0x1401d76d0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rdx, qword [rsp + 0x38]
mov rcx, r13
call fcn.1401d6f60
jmp 0x1401d9844
mov edi, dword [rsp + 0x34]
mov rax, qword [rbp - 0x49]
test rax, rax
je 0x1401d9793
mov dword [rax], edi
lea rdx, str.___DriverEntry_returned_0x
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
mov rcx, rax
lea rdx, [0x14012cc20]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov rcx, rax
mov edx, edi
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int____ptr64]
mov rcx, rax
lea rdx, [0x1401d76d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
cmp byte [rbp + 0x6f], 0
je 0x1401d9801
mov rdx, rbx
mov rcx, r13
cmp byte [rbp + 0x7f], 0
je 0x1401d97fc
mov r8, r12
call fcn.1401d6d80
mov rdx, r12
mov rcx, r13
call fcn.1401d6e80
mov rdx, r12
mov rcx, r13
call fcn.1401d6f60
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
nop
mov rcx, r15
call fcn.14013fcc0
mov rax, rbx
jmp 0x1401d984e
lea rdx, str.____Invalid_format_of_PE_image
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.1401d74c0
lea rdx, [0x1401d76d0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
nop
mov rcx, r15
call fcn.14013fcc0
xor eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140266db0
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret