Function at 0x140053970
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 [0x14007a010]
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 [0x14007a050], ax
jne 0x140053d78
movsxd rdi, dword [0x14007a08c]
lea rax, [0x14007a050]
add rdi, rax
cmp dword [rdi], 0x4550
jne 0x140053d78
mov eax, 0x20b
cmp word [rdi + 0x18], ax
je 0x1400539fd
lea rdx, str.____Image_is_not_64_bit
jmp 0x140053d7f
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 0x140053d9b
movzx eax, word [rdi + 0x14]
mov r13d, dword [rax + rdi + 0x24]
sub ebx, r13d
mov edx, ebx
mov qword [rbp - 0x69], rdx
je 0x140053b2f
mov r8d, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [r8 + rcx]
cmp dword [0x14007cd34], eax
jle 0x140053b02
lea rcx, [0x14007cd34]
call fcn.14005a400
cmp dword [0x14007cd34], 0xffffffff
jne 0x140053afe
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.140006c00
nop
lea r8, [rbp - 0x51]
mov rdx, qword [0x14007c998]
mov rcx, r12
call fcn.1400504c0
mov qword [0x14007cd98], rax
mov rdx, qword [rbp - 0x39]
cmp rdx, 0x10
jb 0x140053af2
inc rdx
mov rcx, qword [rbp - 0x51]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140053aec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140053aec
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005a350
nop
lea rcx, [0x14007cd34]
call fcn.14005a394
mov rdx, qword [rbp - 0x69]
cmp qword [0x14007cd98], 0
jne 0x140053b68
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, qword [0x14005e3a8]
call fcn.140007ba0
lea rdx, [0x140007d80]
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 [0x14005e3a8]
call fcn.140007ba0
lea rdx, [0x140007d80]
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 0x140053d9b
mov qword [rbp - 0x59], rsi
mov qword [rsp + 0x20], rdx
lea rdx, [rbp - 0x59]
mov rcx, r12
call fcn.140052990
test al, al
je 0x140053b2f
mov r15, qword [rbp - 0x59]
test r15, r15
je 0x140053b2f
mov r8d, dword [rdi + 0x54]
lea rdx, [0x14007a050]
mov rcx, r14
call sub.VCRUNTIME140.dll_memcpy
movzx ebx, word [rdi + 0x14]
add rbx, 0x28
xor eax, eax
cmp ax, word [rdi + 6]
jae 0x140053be6
add rbx, rdi
lea r15, [0x14007a050]
test dword [rbx + 0x14], 0x80
ja 0x140053bd4
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r15
mov ecx, dword [rbx - 4]
add rcx, r14
call sub.VCRUNTIME140.dll_memcpy
inc esi
add rbx, 0x28
movzx eax, word [rdi + 6]
cmp esi, eax
jl 0x140053bb7
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.140054a50
mov rdx, rbx
mov rcx, rax
call fcn.140053dd0
mov rdx, rsi
mov rcx, r14
call fcn.140053ed0
test al, al
jne 0x140053c25
lea rdx, str.____Failed_to_fix_cookie
jmp 0x140053d7f
mov rdx, r14
lea rcx, [rbp - 0x51]
call fcn.140054ba0
mov rdx, rax
mov rcx, r12
call fcn.140053fc0
test al, al
jne 0x140053c4c
lea rdx, str.____Failed_to_resolve_imports
jmp 0x140053d33
lea rax, [r14 + r13]
test rax, rax
je 0x140053d2c
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 0x140053d2c
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.140007b90
test al, al
jne 0x140053cdc
lea rdx, str.____Callback_returns_false__failed_
jmp 0x140053d33
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.1400542c0
test al, al
jne 0x140053d08
lea rdx, str.____Failed_to_call_driver_entry
jmp 0x140053d33
mov rax, qword [rbp - 0x61]
test rax, rax
je 0x140053d16
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 0x140053d9d
lea rdx, str.____Failed_to_write_local_image_to_remote_image
mov rcx, qword [0x14005e3a8]
call fcn.140007ba0
lea rdx, [0x140007d80]
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.140050380
test al, al
jne 0x140053d9b
lea rdx, str.____Warning_failed_to_free_memory_
jmp 0x140053d7f
lea rdx, str.____Invalid_format_of_PE_image
mov rcx, qword [0x14005e3a8]
call fcn.140007ba0
lea rdx, [0x140007d80]
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.14005a330
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