Function at 0x180018890
Capabilities:
Access pe header
Map section object

Disassembly:
mov r11, rsp
push rbp
push r15
lea rbp, [r11 - 0x148]
sub rsp, 0x238
mov rax, qword [0x1801e4940]
xor rax, rsp
mov qword [rbp + 0xf0], rax
xor r15d, r15d
mov qword [r11 - 0x18], rbx
mov qword [r11 - 0x20], rsi
mov rsi, r9
mov qword [r11 - 0x28], rdi
mov qword [rdx], r15
mov qword [r11 - 0x30], r12
mov qword [r11 - 0x38], r13
mov r13, rcx
mov qword [r8], r15
mov ecx, dword [rcx + 8]
mov qword [rbp - 0x60], r9
mov qword [rbp - 0x50], r8
mov qword [rbp - 0x38], rdx
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x68], r15
mov qword [rsp + 0x70], r15
mov qword [rbp - 0x70], r15
sub ecx, 1
je 0x180018917
sub ecx, 1
je 0x18001890f
cmp ecx, 1
jne 0x180018917
mov r12d, 0x460
jmp 0x18001891d
mov r12d, 0x20
jmp 0x18001891d
mov r12d, 0x28
mov rcx, r12
call fcn.180021290
mov rbx, rax
test rax, rax
jne 0x180018956
lea rdx, str.____Error__payload_header_not_allocated_r_n
mov ecx, 1
call fcn.1800224a0
mov ecx, 0xc0000001
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x180018cc4
lea rdx, [rbp - 0x68]
lea rcx, [rbp - 0x70]
call fcn.180020860
mov edi, eax
test eax, eax
jns 0x18001898c
mov edx, eax
lea rcx, str.____Error__shared_section_SD_not_allocated
call fcn.180023040
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x180018cc4
lea rcx, [rbp + 0x10]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
je 0x1800189b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Cannot_allocate_shared_section_UUID
call fcn.180023120
jmp 0x180018977
mov rcx, rsi
mov qword [rsp + 0x208], r14
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov eax, dword [rax + 0x50]
mov ecx, eax
mov dword [rbp - 0x78], eax
mov r14d, eax
mov qword [rbp - 0x58], rax
call fcn.180021290
mov qword [rsp + 0x78], rax
mov rsi, rax
test rax, rax
je 0x180018c9b
mov rdx, qword [rbp - 0x60]
mov r8d, r14d
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea rcx, str.___Resolving_kernel_import_for_input_driver_r_n
call fcn.1800140c0
mov r8, qword [rbp + 0x178]
mov rcx, rsi
mov rdx, qword [rbp + 0x170]
call fcn.180022920
movzx edx, byte [rbp + 0x1d]
lea rdi, [rbp + 0x20]
movzx r8d, byte [rbp + 0x1b]
xor eax, eax
movzx r9d, byte [rbp + 0x1a]
mov ecx, 0xc8
movzx r10d, byte [rbp + 0x19]
movzx r11d, byte [rbp + 0x18]
movzx esi, word [rbp + 0x16]
movzx r14d, word [rbp + 0x14]
rep stosb byte [rdi], al
movzx ecx, byte [rbp + 0x1e]
movzx eax, byte [rbp + 0x1f]
movzx edi, byte [rbp + 0x1c]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], ecx
lea rcx, [rbp + 0x20]
mov dword [rsp + 0x58], edx
mov edx, 0x64
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x48], r8d
lea r8, str.BaseNamedObjects_08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
mov dword [rsp + 0x40], r9d
mov r9d, dword [rbp + 0x10]
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r14d
call fcn.180015b10
lea rdx, [rbp + 0x20]
lea rcx, [rbp]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rbp - 0x50]
lea rax, [rbp]
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x48]
mov rax, qword [rbp - 0x70]
lea r8, [rbp - 0x30]
mov qword [rbp - 0x10], rax
mov edx, 0xf001f
mov rax, qword [rbp - 0x58]
add rax, 0xfff
mov qword [rsp + 0x30], r15
add rax, r12
mov dword [rsp + 0x28], 0x8000000
and rax, 0xfffffffffffff000
mov dword [rbp - 0x30], 0x30
mov qword [rcx], rax
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x28], r15
mov dword [rbp - 0x18], 0x40
mov qword [rbp - 8], r15
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x48], rax
mov dword [rsp + 0x20], 4
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov edi, eax
test eax, eax
jns 0x180018b4f
mov edx, eax
lea rcx, str.____Error__cannot_create_shared_section
call fcn.180023040
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rsi, qword [rsp + 0x78]
mov rcx, rsi
call fcn.1800212b0
jmp 0x180018cbc
mov rcx, qword [rbp - 0x80]
lea rax, [rbp - 0x40]
mov dword [rsp + 0x48], 4
lea r8, [rsp + 0x70]
mov dword [rsp + 0x40], 0x100000
xor r9d, r9d
mov dword [rsp + 0x38], 2
mov rdx, 0xffffffffffffffff
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], 0x1000
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov edi, eax
test eax, eax
js 0x180018c6e
lea rcx, str.___Resolving_payload_import_r_n
call fcn.1800140c0
mov r9, qword [rbp + 0x178]
mov rdx, rbx
mov r8, qword [rbp + 0x170]
mov ecx, dword [r13 + 8]
call fcn.1800155f0
test al, al
je 0x180018c5b
mov r14d, dword [rbp - 0x78]
mov rsi, qword [rsp + 0x78]
mov edx, r14d
mov r8d, dword [r13 + 0xc]
mov rcx, rsi
call fcn.180023bb0
mov dword [rbx], r14d
mov rdx, rbx
mov rcx, r13
mov dword [rbx + 8], 0xc0000001
call fcn.1800158d0
test al, al
jne 0x180018c13
lea rdx, str.____Error__cannot_store_additional_data_for_shellcode_r_n
mov ecx, 1
call fcn.1800224a0
jmp 0x180018c81
mov rcx, qword [rsp + 0x70]
mov r8, r12
mov rdx, rbx
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x70]
mov r8, r14
add rcx, r12
mov rdx, rsi
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x70]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rcx, qword [rbp - 0x38]
mov r15d, 1
mov rax, qword [rbp - 0x80]
mov qword [rcx], rax
jmp 0x180018c81
lea rdx, str.____Error__resolving_additional_import_failed_r_n
mov ecx, 1
call fcn.1800224a0
jmp 0x180018c7c
mov edx, edi
lea rcx, str.____Error__shared_section_not_mapped
call fcn.180023040
mov rsi, qword [rsp + 0x78]
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rsi
call fcn.1800212b0
jmp 0x180018cbc
lea rdx, str.____Could_not_allocate_memory_for_image_r_n
mov ecx, 1
call fcn.1800224a0
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r14, qword [rsp + 0x208]
mov rcx, qword [rbp - 0x70]
mov r13, qword [rsp + 0x210]
mov r12, qword [rsp + 0x218]
mov rdi, qword [rsp + 0x220]
mov rsi, qword [rsp + 0x228]
test rcx, rcx
je 0x180018cf2
call fcn.1800212b0
test rbx, rbx
je 0x180018cff
mov rcx, rbx
call fcn.1800212b0
mov rcx, qword [rbp - 0x68]
mov rbx, qword [rsp + 0x230]
test rcx, rcx
je 0x180018d15
call fcn.1800212b0
test r15d, r15d
jne 0x180018d40
mov rdx, qword [rsp + 0x70]
test rdx, rdx
je 0x180018d31
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x180018d40
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, r15d
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.180028780
add rsp, 0x238
pop r15
pop rbp
ret