Function at 0x140052310
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, 0xb0
mov rax, qword [0x140078010]
xor rax, rsp
mov qword [rbp - 9], rax
mov r12, rcx
mov rax, qword [rbp + 0x7f]
mov qword [rbp - 0x61], rax
xor esi, esi
mov qword [rbp - 0x29], rsi
mov qword [rbp - 0x19], rsi
mov eax, 0x5a4d
cmp word [0x140078050], ax
jne 0x140052718
movsxd rdi, dword [0x14007808c]
lea rax, [0x140078050]
add rdi, rax
cmp dword [rdi], 0x4550
jne 0x140052718
mov eax, 0x20b
cmp word [rdi + 0x18], ax
je 0x14005239d
lea rdx, str.____Image_is_not_64_bit
jmp 0x14005271f
mov ebx, dword [rdi + 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 0x14005273b
movzx eax, word [rdi + 0x14]
mov r13d, dword [rax + rdi + 0x24]
sub ebx, r13d
mov edx, ebx
mov qword [rbp - 0x69], rdx
je 0x1400524cf
mov r8d, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x14007ad24], eax
jle 0x1400524a2
lea rcx, [0x14007ad24]
call fcn.140058380
cmp dword [0x14007ad24], 0xffffffff
jne 0x14005249e
xorps xmm0, xmm0
movups xmmword [rbp - 0x51], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x41], xmm1
mov r8d, 0x15
lea rdx, str.ExAllocatePoolWithTag
lea rcx, [rbp - 0x51]
call fcn.140006b90
nop
lea r8, [rbp - 0x51]
mov rdx, qword [0x14007a988]
mov rcx, r12
call fcn.14004ee60
mov qword [0x14007ad88], rax
mov rdx, qword [rbp - 0x39]
cmp rdx, 0x10
jb 0x140052492
inc rdx
mov rcx, qword [rbp - 0x51]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005248c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005248c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400582d0
nop
lea rcx, [0x14007ad24]
call fcn.140058314
mov rdx, qword [rbp - 0x69]
cmp qword [0x14007ad88], 0
jne 0x140052508
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, qword [0x14005c3a8]
call fcn.140007b30
lea rdx, [0x140007d10]
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]
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
mov rcx, qword [0x14005c3a8]
call fcn.140007b30
lea rdx, [0x140007d10]
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 0x14005273b
mov qword [rbp - 0x59], rsi
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x59]
mov rcx, r12
call fcn.140051330
test al, al
je 0x1400524cf
mov r15, qword [rbp - 0x59]
test r15, r15
je 0x1400524cf
mov r8d, dword [rdi + 0x54]
lea rdx, [0x140078050]
mov rcx, r14
call fcn.14005947a
movzx ebx, word [rdi + 0x14]
add rbx, 0x28
xor eax, eax
cmp ax, word [rdi + 6]
jae 0x140052586
add rbx, rdi
lea r15, [0x140078050]
test dword [rbx + 0x14], 0x80
ja 0x140052574
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r15
mov ecx, dword [rbx - 4]
add rcx, r14
call fcn.14005947a
inc esi
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp esi, eax
jl 0x140052557
mov r15, qword [rbp - 0x59]
mov rsi, r15
sub rsi, r13
mov rbx, rsi
sub rbx, qword [rdi + 0x30]
mov rdx, r14
lea rcx, [rbp - 0x51]
call fcn.1400533f0
mov rdx, rbx
mov rcx, rax
call fcn.140052770
mov rdx, rsi
mov rcx, r14
call fcn.140052870
test al, al
jne 0x1400525c5
lea rdx, str.____Failed_to_fix_cookie
jmp 0x14005271f
mov rdx, r14
lea rcx, [rbp - 0x51]
call fcn.140053540
mov rdx, rax
mov rcx, r12
call fcn.140052960
test al, al
jne 0x1400525ec
lea rdx, str.____Failed_to_resolve_imports
jmp 0x1400526d3
lea rax, [r14 + r13]
test rax, rax
je 0x1400526cc
xor ecx, ecx
mov qword [rbp - 0x49], rcx
mov qword [rbp - 0x51], 0x33
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x39], r15
mov r13, qword [rbp - 0x69]
mov qword [rbp - 0x31], r13
mov dword [rbp - 0x59], ecx
mov qword [rsp + 0x38], rcx
lea rax, [rbp - 0x59]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
lea r9d, [rcx + 0x28]
lea r8, [rbp - 0x51]
mov edx, 0x80862007
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1400526cc
mov ebx, dword [rdi + 0x28]
add rbx, rsi
xor edi, edi
mov qword [rsp + 0x20], rdi
mov r9, r13
mov r8, r15
lea rdx, [rbp - 0x29]
lea rcx, [rbp - 0x19]
call fcn.140007b20
test al, al
jne 0x14005267c
lea rdx, str.____Callback_returns_false__failed_
jmp 0x1400526d3
mov dword [rbp - 0x59], edi
mov rax, qword [rbp - 0x29]
mov qword [rsp + 0x20], rax
mov r9, qword [rbp - 0x19]
mov r8, rbx
lea rdx, [rbp - 0x59]
mov rcx, r12
call fcn.140052c60
test al, al
jne 0x1400526a8
lea rdx, str.____Failed_to_call_driver_entry
jmp 0x1400526d3
mov rax, qword [rbp - 0x61]
test rax, rax
je 0x1400526b6
mov ecx, dword [rbp - 0x59]
mov dword [rax], ecx
xor edx, edx
mov r8d, 0x8000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r15
jmp 0x14005273d
lea rdx, str.____Failed_to_write_local_image_to_remote_image
mov rcx, qword [0x14005c3a8]
call fcn.140007b30
lea rdx, [0x140007d10]
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, r15
mov rcx, r12
call fcn.14004ed20
test al, al
jne 0x14005273b
lea rdx, str.____Warning_failed_to_free_memory_
jmp 0x14005271f
lea rdx, str.____Invalid_format_of_PE_image
mov rcx, qword [0x14005c3a8]
call fcn.140007b30
lea rdx, [0x140007d10]
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.1400582b0
lea r11, [rsp + 0xb0]
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