Function at 0x14012bcf0
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, 0xb8
mov rax, qword [0x1401ab100]
xor rax, rsp
mov qword [rbp - 9], rax
mov qword [rbp - 0x69], rdx
mov rdi, rcx
mov qword [rbp - 0x19], r8
mov qword [rbp - 0x11], r9
movzx esi, byte [rbp + 0x77]
mov byte [rsp + 0x30], sil
mov rcx, qword [rbp + 0x8f]
mov qword [rbp - 0x29], rcx
mov rcx, qword [rbp + 0x97]
mov qword [rbp - 0x21], rcx
mov ecx, 0x5a4d
cmp word [rdx], cx
jne 0x14012c12f
movsxd r14, dword [rdx + 0x3c]
add r14, rdx
cmp dword [r14], 0x4550
jne 0x14012c12f
mov eax, 0x20b
cmp word [r14 + 0x18], ax
je 0x14012bd7f
lea rdx, str.____Image_is_not_64_bit
jmp 0x14012c136
mov r15d, dword [r14 + 0x50]
mov edx, r15d
xor ecx, ecx
lea r9d, [rcx + 4]
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
mov qword [rbp - 0x51], rax
test rax, rax
je 0x14012c14a
movzx eax, word [r14 + 0x14]
mov ecx, dword [rax + r14 + 0x24]
mov dword [rbp - 0x79], ecx
xor r8d, r8d
mov eax, r8d
test sil, sil
cmovne eax, ecx
mov dword [rbp - 0x61], eax
sub r15d, eax
mov dword [rbp - 0x7d], r15d
mov r13d, r8d
mov qword [rbp - 0x59], r8
lea rsi, [0x140263710]
mov eax, dword [rbp + 0x7f]
cmp eax, 1
jne 0x14012bdfc
mov edx, r15d
lea r8, [rbp - 0x59]
mov rcx, rdi
call fcn.14012c440
mov r12, rax
mov r13, qword [rbp - 0x59]
jmp 0x14012bea9
cmp eax, 2
jne 0x14012be14
mov edx, r15d
mov rcx, rdi
call fcn.14012c220
mov r12, rax
jmp 0x14012bea9
test r15, r15
je 0x14012be5f
mov edx, reloc.WS2_32.dll_sendto
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x1402652c0], eax
jg 0x14012c17d
jmp 0x14012be3e
xor r8d, r8d
cmp qword [0x1402653b0], 0
jne 0x14012be8c
lea rdx, str.____Failed_to_find_ExAllocatePool
mov rcx, rsi
call fcn.14001dbe0
mov rcx, rax
call fcn.14001dea0
lea rdx, str.____Failed_to_allocate_remote_image_in_kernel
mov rcx, rsi
call fcn.14001dbe0
mov rcx, rax
call fcn.14001dea0
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14012c14a
mov qword [rbp - 0x71], r8
mov qword [rsp + 0x20], r15
lea rdx, [rbp - 0x71]
mov rcx, rdi
call fcn.14001f740
test al, al
je 0x14012be5f
mov r12, qword [rbp - 0x71]
test r12, r12
je 0x14012be5f
mov r8d, dword [r14 + 0x54]
mov rdx, qword [rbp - 0x69]
mov rcx, rbx
call fcn.140152160
movzx ebx, word [r14 + 0x14]
add rbx, 0x28
xor eax, eax
mov r15d, eax
cmp ax, word [r14 + 6]
jae 0x14012bf19
add rbx, r14
mov rsi, qword [rbp - 0x51]
mov r13, qword [rbp - 0x69]
nop
test dword [rbx + 0x14], 0x80
ja 0x14012befd
mov r8d, dword [rbx]
mov edx, dword [rbx + 4]
add rdx, r13
mov ecx, dword [rbx - 4]
add rcx, rsi
call fcn.140152160
inc r15d
add rbx, 0x28
movzx eax, word [r14 + 6]
cmp r15d, eax
jl 0x14012bee0
lea rsi, [0x140263710]
mov r13, qword [rbp - 0x59]
mov r15, r12
cmp byte [rsp + 0x30], 0
je 0x14012bf29
mov eax, dword [rbp - 0x79]
sub r12, rax
mov rbx, r12
sub rbx, qword [r14 + 0x30]
mov rdx, qword [rbp - 0x51]
lea rcx, [rbp - 0x49]
call fcn.14014a5a0
mov rdx, rbx
mov rcx, rax
call fcn.14012bbf0
mov rdx, r12
mov rbx, qword [rbp - 0x51]
mov rcx, rbx
call fcn.14012bb00
test al, al
jne 0x14012bf6a
lea rdx, str.____Failed_to_fix_cookie
mov rcx, rsi
jmp 0x14012c13d
mov rdx, rbx
lea rcx, [rbp - 0x49]
call fcn.14014a6f0
mov rdx, rax
mov rcx, rdi
call fcn.14012b960
test al, al
jne 0x14012bf91
lea rdx, str.____Failed_to_resolve_imports
jmp 0x14012c024
mov r9d, dword [rbp - 0x7d]
mov r8d, dword [rbp - 0x61]
add r8, rbx
mov rdx, r15
mov rcx, rdi
call fcn.14012a6d0
test al, al
jne 0x14012bfb4
lea rdx, str.____Failed_to_write_local_image_to_remote_image
jmp 0x14012c024
mov r14d, dword [r14 + 0x28]
add r14, r12
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x14012bfe7
mov qword [rsp + 0x20], r13
mov r9d, dword [rbp - 0x7d]
mov r8, r15
lea rdx, [rbp - 0x11]
lea rcx, [rbp - 0x19]
call rax
test al, al
jne 0x14012bfe7
lea rdx, str.____Callback_returns_false__failed_
jmp 0x14012c024
mov dword [rbp - 0x79], 0
mov r9, qword [rbp - 0x19]
cmp byte [rbp + 0x87], 0
cmovne r9, r15
mov rax, qword [rbp - 0x11]
mov qword [rsp + 0x20], rax
mov r8, r14
lea rdx, [rbp - 0x79]
mov rcx, rdi
call fcn.140021b30
test al, al
jne 0x14012c0a3
lea rdx, str.____Failed_to_call_driver_entry
mov rcx, rsi
call fcn.14001dbe0
mov rcx, rax
call fcn.14001dea0
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [rbp + 0x7f]
mov rdx, r15
cmp eax, 1
jne 0x14012c090
mov r8, r13
mov rcx, rdi
call fcn.1401299e0
test al, al
je 0x14012c081
mov rdx, r13
mov rcx, rdi
call fcn.1401298b0
test al, al
je 0x14012c081
mov rdx, r13
mov rcx, rdi
call fcn.140129630
test al, al
jne 0x14012c14a
lea rdx, str.____WARNING:_Failed_to_free_memory_
mov rcx, rsi
jmp 0x14012c13d
cmp eax, 2
jne 0x14012c071
mov r8d, dword [rbp - 0x7d]
mov rcx, rdi
call fcn.14012a050
jmp 0x14012c079
mov rcx, qword [rbp - 0x21]
test rcx, rcx
je 0x14012c0b1
mov eax, dword [rbp - 0x79]
mov dword [rcx], eax
cmp byte [rbp + 0x6f], 0
je 0x14012c106
mov eax, dword [rbp + 0x7f]
mov rdx, r15
cmp eax, 1
jne 0x14012c11c
mov r8, r13
mov rcx, rdi
call fcn.1401299e0
test al, al
je 0x14012c0ef
mov rdx, r13
mov rcx, rdi
call fcn.1401298b0
test al, al
je 0x14012c0ef
mov rdx, r13
mov rcx, rdi
call fcn.140129630
test al, al
jne 0x14012c106
lea rdx, str.____WARNING:_Failed_to_free_memory_
mov rcx, rsi
call fcn.14001dbe0
mov rcx, rax
call fcn.14001dea0
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rax, r15
jmp 0x14012c14c
cmp eax, 2
jne 0x14012c0e3
mov r8d, dword [rbp - 0x7d]
mov rcx, rdi
call fcn.14012a050
jmp 0x14012c0eb
lea rdx, str.____Invalid_format_of_PE_image
lea rcx, [0x140263710]
call fcn.14001dbe0
mov rcx, rax
call fcn.14001dea0
xor eax, eax
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140074b80
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, [0x1402652c0]
call fcn.140074be4
jmp 0x14012be3b
lea rcx, [0x1402652c0]
call fcn.140074c50
cmp dword [0x1402652c0], 0xffffffff
jne 0x14012be3b
xorps xmm0, xmm0
movups xmmword [rbp - 0x49], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x39], xmm1
mov r8d, reloc.WS2_32.dll_setsockopt
lea rdx, str.ExAllocatePoolWithTag
lea rcx, [rbp - 0x49]
call fcn.1400115f0
nop
lea r8, [rbp - 0x49]
mov rdx, qword [0x140264f48]
mov rcx, rdi
call fcn.1401292f0
mov qword [0x1402653b0], rax
mov rdx, qword [rbp - 0x31]
cmp rdx, 0xf
jbe 0x14012c16c
inc rdx
mov rcx, qword [rbp - 0x49]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14012c20e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14012c20e
call fcn.140087618
int3
call fcn.140074ba0
jmp 0x14012c16c