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

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push r15
lea rbp, [rax - 0x568]
sub rsp, 0x658
xor r15d, r15d
mov qword [rax + 0x20], rbx
mov qword [rdx], r15
mov edx, dword [rcx + 8]
mov qword [rax - 0x18], rsi
mov rsi, r9
mov qword [rbp - 0x60], r15
mov qword [rbp - 0x50], r15
mov qword [rsp + 0x78], r15
mov qword [rbp - 0x68], r15
mov qword [r8], r15
sub edx, 1
je 0x140001e55
sub edx, 1
je 0x140001e4e
cmp edx, 1
jne 0x140001e55
mov edx, 0x460
jmp 0x140001e5a
mov edx, 0x20
jmp 0x140001e5a
mov edx, 0x28
mov rax, qword gs:[0x30]
mov r8, rdx
mov qword [rbp - 0x70], rdx
mov edx, 8
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov qword [rbp - 0x40], rax
mov rbx, rax
test rax, rax
jne 0x140001eb2
lea rdx, str.____Error__payload_header_not_allocated_r_n
mov ecx, 1
call fcn.140012590
mov ecx, 0xc0000001
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400024f6
lea rdx, [rbp - 0x50]
mov qword [rsp + 0x648], rdi
lea rcx, [rbp - 0x68]
call fcn.1400121b0
mov edi, eax
test eax, eax
jns 0x140001edd
mov edx, eax
lea rcx, str.____Error__shared_section_SD_not_allocated
call fcn.1400133e0
jmp 0x140001eff
lea rcx, [rbp - 0x80]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
je 0x140001f14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Cannot_allocate_shared_section_UUID
call fcn.1400134b0
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400024ee
mov qword [rsp + 0x640], r12
mov rcx, rsi
mov qword [rsp + 0x630], r14
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov edx, dword [rax + 0x50]
mov rax, qword gs:[0x30]
mov r14d, edx
mov dword [rbp - 0x54], edx
mov r8d, edx
mov qword [rbp - 0x48], rdx
mov edx, 8
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov r12, rax
test rax, rax
je 0x1400024bd
mov r8d, r14d
mov qword [rsp + 0x638], r13
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea rcx, str.___Resolving_kernel_import_for_input_driver_r_n
call fcn.140001980
mov rcx, r12
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov r13, qword [rbp + 0x590]
cmp dword [rax + 0x84], 1
jbe 0x140002074
mov ecx, dword [rax + 0x90]
mov qword [rsp + 0x70], rcx
test rcx, rcx
je 0x140002074
mov eax, dword [rcx + r12]
test eax, eax
jne 0x140001fc5
mov eax, dword [rcx + r12 + 0x10]
mov esi, eax
mov r14d, r15d
add rsi, r12
mov rax, qword [rsi]
test rax, rax
je 0x140002074
mov rbx, qword [rsp + 0x70]
mov rcx, rax
nop dword [rax]
nop word [rax + rax]
mov edx, dword [rbx + r12 + 0x10]
mov dword [rbp - 0x58], edx
mov qword [rsp + 0x70], r15
test rax, rax
js 0x14000201a
lea rdx, [r12 + 2]
add rdx, rcx
lea rcx, [rbp + 8]
call qword [sym.imp.ntdll.dll_RtlInitString]
lea rdx, [rbp + 8]
jmp 0x14000202b
movzx edx, cx
lea rcx, [rbp + 0x18]
call qword [sym.imp.ntdll.dll_RtlInitString]
lea rdx, [rbp + 0x18]
lea r9, [rsp + 0x70]
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.ntdll.dll_LdrGetProcedureAddress]
mov rdi, qword [rsp + 0x70]
mov ecx, dword [rbp - 0x58]
sub rdi, r13
add rdi, qword [rbp + 0x598]
test eax, eax
mov edx, r14d
cmovs rdi, r15
add rcx, r12
add rsi, 8
inc r14d
mov qword [rcx + rdx*8], rdi
mov rax, qword [rsi]
mov rcx, rax
test rax, rax
jne 0x140001ff0
mov rbx, qword [rbp - 0x40]
movzx edx, byte [rbp - 0x73]
lea rdi, [rbp + 0x40]
movzx r8d, byte [rbp - 0x75]
xor eax, eax
movzx r9d, byte [rbp - 0x76]
mov ecx, 0xc8
movzx r10d, byte [rbp - 0x77]
movzx r11d, byte [rbp - 0x78]
movzx esi, word [rbp - 0x7a]
movzx r14d, word [rbp - 0x7c]
rep stosb byte [rdi], al
movzx ecx, byte [rbp - 0x72]
movzx eax, byte [rbp - 0x71]
movzx edi, byte [rbp - 0x74]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], ecx
lea rcx, [rbp + 0x40]
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 - 0x80]
mov dword [rsp + 0x38], r10d
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r14d
call fcn.140001c40
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x28]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rbp - 0x48]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x18], rax
lea r9, [rbp - 0x38]
mov rax, qword [rbp - 0x68]
lea r8, [rbp - 0x28]
mov qword [rbp - 8], rax
add rcx, 0xfff
mov rax, qword [rbp - 0x70]
mov esi, 4
add rax, rcx
mov qword [rsp + 0x30], r15
mov rcx, qword [rbp + 0x580]
and rax, 0xfffffffffffff000
mov dword [rsp + 0x28], 0x8000000
mov edx, 0xf001f
mov dword [rbp - 0x28], 0x30
mov qword [rbp - 0x20], r15
mov qword [rcx], rax
lea rcx, [rbp - 0x60]
mov dword [rbp - 0x10], 0x40
mov qword [rbp], r15
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x38], rax
mov dword [rsp + 0x20], esi
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov edi, eax
test eax, eax
jns 0x140002191
lea rcx, str.____Error__cannot_create_shared_section
jmp 0x140002480
mov rcx, qword [rbp - 0x60]
lea rax, [rbp - 0x30]
mov dword [rsp + 0x48], esi
lea r8, [rsp + 0x78]
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 dword [rbp + 0x580], eax
mov edi, eax
test eax, eax
js 0x140002479
lea rcx, str.___Resolving_payload_import_r_n
call fcn.140001980
mov r14, qword [rbp + 0x570]
mov r8, r13
mov r9, qword [rbp + 0x598]
mov rdx, rbx
mov ecx, dword [r14 + 8]
call fcn.140010f10
test al, al
je 0x140002466
mov r8d, dword [rbp - 0x54]
test r8d, r8d
je 0x14000223d
mov eax, dword [r14 + 0xc]
mov edx, r8d
mov rcx, r12
nop dword [rax]
xor byte [rcx], al
lea rcx, [rcx + 1]
rol eax, 1
add edx, 0xffffffff
jne 0x140002230
mov dword [rbx], r8d
mov dword [rbx + 8], 0xc0000001
cmp dword [r14 + 8], 3
jne 0x140002405
cmp word [r14 + 0x54], r15w
je 0x140002453
xor eax, eax
lea rdi, [rbp + 0x110]
mov ecx, 0x20c
lea r9, str.Driver_
rep stosb byte [rdi], al
lea rax, [r14 + 0x58]
mov edx, 0x104
lea rcx, [rbp + 0x114]
mov qword [rsp + 0x20], rax
lea r8, str._ws_ws
call fcn.140001c40
lea rcx, [rbp + 0x114]
call fcn.1400248b0
add ax, ax
lea rdi, [rbp + 0x110]
movzx ecx, ax
mov word [rbp + 0x110], cx
lea eax, [rcx + 2]
shr rcx, 1
mov word [rbp + 0x112], ax
mov rax, rsi
mov word [rbp + rcx*2 + 0x114], r15w
lea rcx, [rbx + 0x48]
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rdi]
movups xmm1, xmmword [rdi + 0x10]
lea rdi, [rdi + 0x80]
movups xmmword [rcx - 0x80], xmm0
movups xmm0, xmmword [rdi - 0x60]
movups xmmword [rcx - 0x70], xmm1
movups xmm1, xmmword [rdi - 0x50]
movups xmmword [rcx - 0x60], xmm0
movups xmm0, xmmword [rdi - 0x40]
movups xmmword [rcx - 0x50], xmm1
movups xmm1, xmmword [rdi - 0x30]
movups xmmword [rcx - 0x40], xmm0
movups xmm0, xmmword [rdi - 0x20]
movups xmmword [rcx - 0x30], xmm1
movups xmm1, xmmword [rdi - 0x10]
movups xmmword [rcx - 0x20], xmm0
movups xmmword [rcx - 0x10], xmm1
sub rax, 1
jne 0x1400022d2
mov rax, qword [rdi]
lea r8, str.REGISTRYMACHINESYSTEMCurrentControlSetServices_ws
mov qword [rcx], rax
mov r9d, 0x58
mov eax, dword [rdi + 8]
mov edx, 0x104
mov dword [rcx + 8], eax
mov eax, 0x264
cmp word [r14 + 0x260], r15w
lea rcx, [rbp + 0x324]
cmovne r9d, eax
add r9, r14
call fcn.140001c40
lea rcx, [rbp + 0x324]
call fcn.1400248b0
add ax, ax
lea rdx, [rbx + 0x254]
movzx ecx, ax
mov word [rbp + 0x320], cx
lea eax, [rcx + 2]
shr rcx, 1
mov word [rbp + 0x322], ax
lea rax, [rbp + 0x320]
mov word [rbp + rcx*2 + 0x324], r15w
lea rdx, [rdx + 0x80]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rdx - 0x80], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rdx - 0x70], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rdx - 0x60], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rdx - 0x50], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rdx - 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rdx - 0x30], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rdx - 0x20], xmm0
movups xmmword [rdx - 0x10], xmm1
sub rsi, 1
jne 0x1400023a0
mov rcx, qword [rax]
mov edi, dword [rbp + 0x580]
mov qword [rdx], rcx
mov ecx, dword [rax + 8]
mov dword [rdx + 8], ecx
mov r8, qword [rbp - 0x70]
mov rdx, rbx
mov rcx, qword [rsp + 0x78]
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x78]
mov rdx, r12
add rcx, qword [rbp - 0x70]
mov r8, qword [rbp - 0x48]
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0x78]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rcx, qword [rbp + 0x578]
mov r15d, 1
mov rax, qword [rbp - 0x60]
mov qword [rcx], rax
jmp 0x140002487
lea rdx, str.____Error__cannot_store_additional_data_for_shellcode_r_n
mov ecx, 1
call fcn.140012590
jmp 0x140002487
lea rdx, str.____Error__resolving_additional_import_failed_r_n
mov ecx, 1
call fcn.140012590
jmp 0x140002487
lea rcx, str.____Error__shared_section_not_mapped
mov edx, edi
call fcn.1400133e0
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, qword gs:[0x30]
mov r8, r12
xor edx, edx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
mov r13, qword [rsp + 0x638]
jmp 0x1400024de
lea rdx, str.____Could_not_allocate_memory_for_image_r_n
mov ecx, 1
call fcn.140012590
mov ecx, edi
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r12, qword [rsp + 0x640]
mov r14, qword [rsp + 0x630]
mov rdi, qword [rsp + 0x648]
cmp qword [rbp - 0x68], 0
mov rsi, qword [rsp + 0x650]
je 0x140002522
mov rax, qword gs:[0x30]
xor edx, edx
mov r8, qword [rbp - 0x68]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
test rbx, rbx
je 0x140002543
mov rax, qword gs:[0x30]
mov r8, rbx
xor edx, edx
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
cmp qword [rbp - 0x50], 0
mov rbx, qword [rsp + 0x688]
je 0x14000256f
mov rax, qword gs:[0x30]
xor edx, edx
mov r8, qword [rbp - 0x50]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
test r15d, r15d
jne 0x14000259a
mov rdx, qword [rsp + 0x78]
test rdx, rdx
je 0x14000258b
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x14000259a
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, r15d
add rsp, 0x658
pop r15
pop rbp
ret