Function at 0x140012770
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 7]
sub rsp, 0xc0
mov rax, qword [0x140028030]
xor rax, rsp
mov qword [rbp - 9], rax
mov r13, rcx
mov qword [rbp - 0x59], rcx
xor r12d, r12d
mov eax, 0x5a4d
cmp word [0x140028050], ax
jne 0x140012d7d
movsxd rsi, dword [0x14002808c]
lea rdi, [0x140028050]
add rsi, rdi
cmp dword [rsi], 0x4550
jne 0x140012d7d
mov eax, 0x20b
cmp word [rsi + 0x18], ax
je 0x1400127f2
lea rdx, str.____Image_is_not_64_bit
jmp 0x140012d84
mov ebx, dword [rsi + 0x50]
mov edx, ebx
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
test rax, rax
je 0x140012da0
movzx eax, word [rsi + 0x14]
mov r15d, dword [rax + rsi + 0x24]
sub ebx, r15d
mov edx, ebx
mov qword [rbp - 0x61], rdx
je 0x140012985
mov r8d, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x14002a2cc], eax
jle 0x140012927
lea rcx, [0x14002a2cc]
call fcn.140015388
cmp dword [0x14002a2cc], 0xffffffff
jne 0x140012923
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rbp - 0x71], r12
mov qword [rbp - 0x69], 0xf
mov ecx, 0x20
call fcn.140015498
mov qword [rsp + 0x38], rax
mov qword [rbp - 0x71], 0x15
mov qword [rbp - 0x69], 0x1f
movups xmm0, xmmword [str.ExAllocatePoolWithTag]
movups xmmword [rax], xmm0
mov ecx, dword [0x140021678]
mov dword [rax + 0x10], ecx
movzx ecx, byte [0x14002167c]
mov byte [rax + 0x14], cl
mov byte [rax + 0x15], 0
lea r8, [rsp + 0x38]
mov rdx, qword [0x14002a218]
mov rcx, r13
call fcn.14000ddb0
mov qword [0x14002a330], rax
mov rdx, qword [rbp - 0x69]
cmp rdx, 0x10
jb 0x140012917
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012911
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140012911
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400158d0
nop
lea rcx, [0x14002a2cc]
call fcn.140015328
mov rdx, qword [rbp - 0x61]
cmp qword [0x14002a330], 0
jne 0x140012960
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, qword [0x140017360]
call fcn.140010e00
mov rcx, rax
lea rdx, [0x140010fe0]
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]
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x140012ced
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.140011020
test al, al
je 0x140012985
mov r12, qword [rsp + 0x30]
test r12, r12
jne 0x140012991
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
jmp 0x140012ced
lea rdx, str.___Image_base_has_been_allocated_at_0x
mov rcx, qword [0x140017360]
call fcn.140010e00
mov rcx, rax
mov rdx, r12
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, [0x140010fe0]
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 [rsi + 0x54]
mov rdx, rdi
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rsi + 0x14]
add rbx, 0x24
xor eax, eax
mov edi, eax
cmp ax, word [rsi + 6]
jae 0x140012a1f
add rbx, rsi
lea r13, [0x140028050]
nop dword [rax + rax]
test dword [rbx + 0x18], 0x80
ja 0x140012a0d
mov ecx, dword [rbx]
add rcx, r14
mov r8d, dword [rbx + 4]
mov edx, dword [rbx + 8]
add rdx, r13
call sub.VCRUNTIME140.dll_memcpy
inc edi
add rbx, 0x28
movzx eax, word [rsi + 6]
cmp edi, eax
jl 0x1400129f0
mov r13, qword [rbp - 0x59]
mov qword [rbp - 0x31], r15
mov rax, r12
sub rax, r15
mov qword [rbp - 0x51], rax
lea rdx, str.___Skipped_0x
mov rcx, qword [0x140017360]
call fcn.140010e00
mov rcx, rax
lea rdx, [0x14000ca70]
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, r15d
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.140010e00
mov rcx, rax
lea rdx, [0x140010fe0]
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 eax, 0x5a4d
cmp word [r14], ax
jne 0x140012b5e
movsxd rax, dword [r14 + 0x3c]
cmp dword [rax + r14], 0x4550
jne 0x140012b5e
xorps xmm0, xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x21], xmm1
xor r8d, r8d
mov qword [rbp - 0x11], r8
mov ecx, dword [rax + r14 + 0xb0]
test ecx, ecx
jne 0x140012ac6
movdqu xmmword [rbp - 0x49], xmm0
xor edi, edi
jmp 0x140012b68
lea rbx, [r14 + rcx]
mov edi, dword [rax + r14 + 0xb4]
add rdi, rbx
cmp rbx, rdi
jae 0x140012b4a
mov rdx, qword [rbp - 0x19]
nop
mov ecx, dword [rbx + 4]
test ecx, ecx
je 0x140012b45
mov eax, dword [rbx]
add rax, r14
mov qword [rsp + 0x38], rax
lea rax, [rbx + 8]
mov qword [rbp - 0x79], rax
lea rax, [rcx - 8]
shr rax, 1
mov dword [rbp - 0x71], eax
cmp rdx, r8
je 0x140012b24
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rdx], xmm0
movsd xmm1, qword [rbp - 0x71]
movsd qword [rdx + 0x10], xmm1
add rdx, 0x18
mov qword [rbp - 0x19], rdx
jmp 0x140012b3a
lea r8, [rsp + 0x38]
lea rcx, [rbp - 0x21]
call fcn.140013eb0
mov r8, qword [rbp - 0x11]
mov rdx, qword [rbp - 0x19]
mov eax, dword [rbx + 4]
add rbx, rax
cmp rbx, rdi
jb 0x140012ae0
movdqu xmm1, xmmword [rbp - 0x21]
movups xmmword [rbp - 0x49], xmm1
movsd xmm0, qword [rbp - 0x11]
movsd qword [rbp - 0x39], xmm0
mov rdi, qword [rbp - 0x39]
jmp 0x140012b68
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
xor edi, edi
mov r15, qword [rbp - 0x51]
mov r10, r15
sub r10, qword [rsi + 0x30]
mov r11, qword [rbp - 0x49]
mov rbx, qword [rbp - 0x41]
cmp r11, rbx
je 0x140012be9
lea r9, [r11 + 0x10]
mov r13d, 0xf000
mov r15d, 0xa000
xor r12d, r12d
mov edx, r12d
cmp dword [r9], r12d
jbe 0x140012bcf
nop dword [rax + rax]
mov ecx, edx
mov rax, qword [r9 - 8]
movzx r8d, word [rax + rcx*2]
movzx eax, r8w
and ax, r13w
cmp ax, r15w
jne 0x140012bc8
and r8d, 0xfff
mov rax, qword [r9 - 0x10]
add qword [r8 + rax], r10
inc edx
cmp edx, dword [r9]
jb 0x140012ba0
add r9, 0x18
lea rax, [r9 - 0x10]
cmp rax, rbx
jne 0x140012b93
mov r12, qword [rsp + 0x30]
mov r13, qword [rbp - 0x59]
mov r15, qword [rbp - 0x51]
test r11, r11
je 0x140012c44
sub rdi, r11
movabs rax, 0x2aaaaaaaaaaaaaab
imul rdi
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rdx, [rdx + rdx*2]
shl rdx, 3
mov rax, r11
cmp rdx, 0x1000
jb 0x140012c3c
add rdx, 0x27
mov r11, qword [r11 - 8]
sub rax, r11
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140012c3c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r11
call fcn.1400158d0
mov rdx, r14
lea rcx, [rsp + 0x38]
call fcn.140013810
mov rdx, rax
mov rcx, r13
call fcn.140012dd0
test al, al
jne 0x140012c6c
lea rdx, str.____Failed_to_resolve_imports
jmp 0x140012ced
mov r8, qword [rbp - 0x31]
add r8, r14
mov r9, qword [rbp - 0x61]
mov rdx, r12
mov rcx, r13
call fcn.14000d970
mov rcx, qword [0x140017360]
test al, al
jne 0x140012c96
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x140012cf4
mov ebx, dword [rsi + 0x28]
add rbx, r15
lea rdx, str.____Calling_DriverEntry_0x
call fcn.140010e00
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___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x140010fe0]
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 dword [rsp + 0x30], eax
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, rbx
lea rdx, [rsp + 0x30]
mov rcx, r13
call fcn.140013190
test al, al
jne 0x140012d27
lea rdx, str.____Failed_to_call_driver_entry
mov rcx, qword [0x140017360]
call fcn.140010e00
lea rdx, [0x140010fe0]
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 rdx, r12
mov rcx, r13
call fcn.14000dc60
jmp 0x140012da0
lea rdx, str.___DriverEntry_returned_0x
mov rcx, qword [0x140017360]
call fcn.140010e00
mov rcx, rax
lea rdx, [0x14000ca70]
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, dword [rsp + 0x30]
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, [0x140010fe0]
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, r12
jmp 0x140012da2
lea rdx, str.____Invalid_format_of_PE_image
mov rcx, qword [0x140017360]
call fcn.140010e00
lea rdx, [0x140010fe0]
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.1400151e0
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret