Function at 0x140009ec0
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xa0
mov rax, qword [0x140020010]
xor rax, rsp
mov qword [rbp - 9], rax
mov rax, qword [rbp + 0x8f]
xor ebx, ebx
mov qword [rbp - 0x49], rax
mov r13, rdx
mov eax, 0x5a4d
mov qword [rbp - 0x19], rbx
mov rsi, rcx
mov qword [rbp - 0x29], rbx
cmp word [rdx], ax
jne 0x14000a38a
movsxd rdi, dword [rdx + 0x3c]
add rdi, rdx
cmp dword [rdi], 0x4550
jne 0x14000a38a
mov eax, 0x20b
cmp word [rdi + 0x18], ax
je 0x140009f3d
lea rdx, str.____Image_is_not_64_bit
jmp 0x14000a391
mov r15d, dword [rdi + 0x50]
xor ecx, ecx
mov edx, r15d
mov r8d, 0x3000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
test rax, rax
je 0x14000a3ad
movzx eax, word [rdi + 0x14]
mov rcx, rsi
mov eax, dword [rax + rdi + 0x24]
sub r15d, eax
cmp dword [rbp + 0x77], 1
mov dword [rbp - 0x61], eax
jne 0x140009f83
mov edx, r15d
call fcn.140009d88
jmp 0x140009f8b
mov r8d, r15d
call fcn.140002774
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov r12, rax
mov qword [rbp - 0x59], rax
mov qword [rbp - 0x51], rax
test rax, rax
jne 0x140009fd4
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
call fcn.14000574c
lea rdx, [0x1400058d0]
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, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14000a3ad
lea rdx, str.___Image_base_has_been_allocated_at_0x
call fcn.14000574c
mov rdx, r12
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___void_const____ptr64____ptr64]
lea rbx, [0x1400058d0]
mov rcx, rax
mov rdx, rbx
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 r8d, dword [rdi + 0x54]
mov rdx, r13
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movzx eax, word [rdi + 0x14]
xor edx, edx
add rax, 0x28
mov dword [rbp - 0x69], edx
mov ecx, edx
cmp dx, word [rdi + 6]
jae 0x14000a063
lea r12, [rax + rdi]
test dword [r12 + 0x14], 0x80
ja 0x14000a04e
mov edx, dword [r12 + 4]
mov ecx, dword [r12 - 4]
add rdx, r13
mov r8d, dword [r12]
add rcx, r14
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rbp - 0x69]
movzx eax, word [rdi + 6]
inc ecx
add r12, 0x28
mov dword [rbp - 0x69], ecx
cmp ecx, eax
jl 0x14000a027
mov r12, qword [rbp - 0x59]
mov eax, dword [rbp - 0x61]
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]
mov r13, r12
sub r12, rax
call fcn.14000574c
lea rdx, [0x140001234]
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::ios_base____ptr64____cdecl___class_std::ios_base____ptr64_____ptr64]
mov edx, dword [rbp - 0x61]
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___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, str._bytes_of_PE_Header
call fcn.14000574c
mov rdx, rbx
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]
mov rax, r12
lea rcx, [rbp - 0x41]
sub rax, qword [rdi + 0x30]
mov rdx, r14
mov qword [rbp - 0x59], rax
call fcn.14000b044
mov qword [rbp - 0x69], rax
mov r10, qword [rax + 8]
mov rdx, qword [rax]
cmp rdx, r10
je 0x14000a133
mov r11, qword [rbp - 0x59]
xor eax, eax
mov r9d, eax
cmp dword [rdx + 0x10], eax
jbe 0x14000a126
mov rax, qword [rdx + 8]
mov ecx, r9d
movzx r8d, word [rax + rcx*2]
mov ecx, 0xf000
movzx eax, r8w
and ax, cx
mov ecx, 0xa000
cmp ax, cx
jne 0x14000a11b
mov rax, qword [rdx]
and r8d, 0xfff
add qword [r8 + rax], r11
inc r9d
cmp r9d, dword [rdx + 0x10]
jb 0x14000a0eb
xor eax, eax
add rdx, 0x18
cmp rdx, r10
jne 0x14000a0e3
mov rax, qword [rbp - 0x69]
mov rcx, rax
call fcn.14000a73c
mov rdx, r12
mov rcx, r14
call fcn.14000a3d8
test al, al
jne 0x14000a165
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.____Failed_to_fix_cookie
call fcn.14000574c
mov rdx, rbx
jmp 0x14000a3a4
mov rdx, r14
lea rcx, [rbp - 0x41]
call fcn.14000b198
mov rdx, rax
mov rcx, rsi
call fcn.14000a4e0
test al, al
jne 0x14000a18c
lea rdx, str.____Failed_to_resolve_imports
jmp 0x14000a23c
mov r8d, dword [rbp - 0x61]
mov rdx, r13
add r8, r14
mov r9d, r15d
mov rcx, rsi
call fcn.1400022e8
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 0x14000a1b8
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x14000a243
mov edi, dword [rdi + 0x28]
lea rdx, str.____Calling_DriverEntry_0x
add rdi, r12
call fcn.14000574c
mov rdx, rdi
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___void_const____ptr64____ptr64]
mov rcx, rax
mov rdx, rbx
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 r9d, r15d
lea rdx, [rbp - 0x19]
mov r8, r13
lea rcx, [rbp - 0x29]
call fcn.140008a78
xor r12d, r12d
test al, al
jne 0x14000a205
lea rdx, str.____Callback_returns_false__failed_
jmp 0x14000a23c
mov r9, qword [rbp - 0x29]
lea rdx, [rbp - 0x69]
mov rax, qword [rbp - 0x19]
mov r8, rdi
cmp byte [rbp + 0x7f], r12b
mov rcx, rsi
mov dword [rbp - 0x69], r12d
cmovne r9, r13
mov qword [rsp + 0x20], rax
call fcn.14000a82c
test al, al
jne 0x14000a2c2
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.14000574c
mov rdx, rbx
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, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.___Freeing_memory
call fcn.14000574c
mov rdx, rbx
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]
cmp dword [rbp + 0x77], 1
mov rcx, rsi
mov rdx, qword [rbp - 0x51]
jne 0x14000a29b
mov r8d, r15d
call fcn.14000257c
jmp 0x14000a2a0
call fcn.1400028bc
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.___Memory_has_been_released
test al, al
jne 0x14000a158
lea rdx, str.____WARNING:_Failed_to_free_memory_
jmp 0x14000a158
mov rax, qword [rbp - 0x49]
mov edi, dword [rbp - 0x69]
test rax, rax
je 0x14000a2d0
mov dword [rax], edi
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.___DriverEntry_returned_0x
call fcn.14000574c
lea rdx, [0x140001234]
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::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
mov rdx, rbx
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 + 0x67], r12b
je 0x14000a374
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.___Freeing_memory
call fcn.14000574c
mov rdx, rbx
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]
cmp dword [rbp + 0x77], 1
mov rdx, r13
mov rcx, rsi
jne 0x14000a345
mov r8d, r15d
call fcn.14000257c
jmp 0x14000a34a
call fcn.1400028bc
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
lea rdx, str.___Memory_has_been_released
test al, al
jne 0x14000a363
lea rdx, str.____WARNING:_Failed_to_free_memory_
call fcn.14000574c
mov rdx, rbx
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, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r13
jmp 0x14000a3af
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.14000574c
lea rdx, [0x1400058d0]
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 eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.14000d420
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret