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

Disassembly:
jmp 0x1400319d0
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
sub rsp, 0x538
lea rbp, [rsp + 0x70]
lea rdi, [rsp + 0x70]
mov ecx, 0xd2
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x568]
lea rcx, [0x140095570]
call fcn.140021040
mov dword [rbp + 4], 0
mov dword [rbp + 0x24], 0xc0000001
mov qword [rbp + 0x48], 0
mov qword [rbp + 0x68], 0
mov qword [rbp + 0x88], 0
mov qword [rbp + 0xa8], 0
mov qword [rbp + 0x168], 0
mov rax, qword [rbp + 0x4f8]
mov qword [rax], 0
mov rax, qword [rbp + 0x500]
mov qword [rax], 0
mov rax, qword [rbp + 0x4f0]
mov eax, dword [rax + 8]
mov dword [rbp + 0x4b4], eax
cmp dword [rbp + 0x4b4], 1
je 0x140031abb
cmp dword [rbp + 0x4b4], 2
je 0x140031aae
cmp dword [rbp + 0x4b4], 3
je 0x140031aa1
jmp 0x140031abb
mov qword [rbp + 0x2c8], 0x460
jmp 0x140031ac6
mov qword [rbp + 0x2c8], 0x20
jmp 0x140031ac6
mov qword [rbp + 0x2c8], 0x28
mov rcx, qword [rbp + 0x2c8]
call fcn.1400202ee
mov qword [rbp + 0x2a8], rax
cmp qword [rbp + 0x2a8], 0
jne 0x140031af9
lea rdx, str.____Error__payload_header_not_allocated_r_n
mov ecx, 1
call fcn.1400204b0
jmp 0x140031fc0
lea rdx, [rbp + 0x68]
lea rcx, [rbp + 0x168]
call fcn.1400210ea
mov dword [rbp + 0x24], eax
cmp dword [rbp + 0x24], 0
jge 0x140031b26
mov edx, dword [rbp + 0x24]
lea rcx, str.____Error__shared_section_SD_not_allocated
call fcn.140020249
jmp 0x140031fc0
lea rcx, [rbp + 0x188]
call qword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
je 0x140031b50
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Cannot_allocate_shared_section_UUID
call fcn.140020c49
jmp 0x140031fc0
mov rcx, qword [rbp + 0x508]
call qword [sym.imp.ntdll.dll_RtlImageNtHeader]
mov qword [rbp + 0xc8], rax
mov rax, qword [rbp + 0xc8]
mov eax, dword [rax + 0x50]
mov dword [rbp + 0x2e4], eax
mov eax, dword [rbp + 0x2e4]
mov ecx, eax
call fcn.1400202ee
mov qword [rbp + 0xa8], rax
cmp qword [rbp + 0xa8], 0
je 0x140031bd6
mov eax, dword [rbp + 0x2e4]
mov r8d, eax
mov rdx, qword [rbp + 0x508]
mov rcx, qword [rbp + 0xa8]
call fcn.1400207c6
lea rcx, str.___Resolving_kernel_import_for_input_driver_r_n
call fcn.140020f41
mov r8, qword [rbp + 0x518]
mov rdx, qword [rbp + 0x510]
mov rcx, qword [rbp + 0xa8]
call fcn.140020c03
jmp 0x140031bec
lea rdx, str.____Could_not_allocate_memory_for_image_r_n
mov ecx, 1
call fcn.1400204b0
jmp 0x140031fc0
mov edx, 0xc8
lea rcx, [rbp + 0x1c0]
call fcn.140020b7c
mov eax, 1
imul rax, rax, 7
movzx eax, byte [rbp + rax + 0x190]
mov ecx, 1
imul rcx, rcx, 6
movzx ecx, byte [rbp + rcx + 0x190]
mov edx, 1
imul rdx, rdx, 5
movzx edx, byte [rbp + rdx + 0x190]
mov r8d, 1
imul r8, r8, 4
movzx r8d, byte [rbp + r8 + 0x190]
mov r9d, 1
imul r9, r9, 3
movzx r9d, byte [rbp + r9 + 0x190]
mov r10d, 1
imul r10, r10, 2
movzx r10d, byte [rbp + r10 + 0x190]
mov r11d, 1
imul r11, r11, 1
movzx r11d, byte [rbp + r11 + 0x190]
mov ebx, 1
imul rbx, rbx, 0
movzx ebx, byte [rbp + rbx + 0x190]
movzx edi, word [rbp + 0x18e]
movzx esi, word [rbp + 0x18c]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], ecx
mov dword [rsp + 0x58], edx
mov dword [rsp + 0x50], r8d
mov dword [rsp + 0x48], r9d
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], esi
mov r9d, dword [rbp + 0x188]
lea r8, str.BaseNamedObjects_08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
mov edx, 0x64
lea rcx, [rbp + 0x1c0]
call fcn.140020aa5
lea rdx, [rbp + 0x1c0]
lea rcx, [rbp + 0xe8]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov dword [rbp + 0x118], 0x30
mov qword [rbp + 0x120], 0
mov dword [rbp + 0x130], 0x40
lea rax, [rbp + 0xe8]
mov qword [rbp + 0x128], rax
mov rax, qword [rbp + 0x168]
mov qword [rbp + 0x138], rax
mov qword [rbp + 0x140], 0
mov eax, dword [rbp + 0x2e4]
mov rcx, qword [rbp + 0x2c8]
lea rax, [rax + rcx + 0xfff]
and rax, 0xfffffffffffff000
mov qword [rbp + 0x328], rax
mov rax, qword [rbp + 0x328]
mov qword [rbp + 0x308], rax
mov rax, qword [rbp + 0x500]
mov rcx, qword [rbp + 0x328]
mov qword [rax], rcx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x308]
lea r8, [rbp + 0x118]
mov edx, 0xf001f
lea rcx, [rbp + 0x48]
call qword [sym.imp.ntdll.dll_NtCreateSection]
mov dword [rbp + 0x24], eax
cmp dword [rbp + 0x24], 0
jge 0x140031dd4
mov edx, dword [rbp + 0x24]
lea rcx, str.____Error__cannot_create_shared_section
call fcn.140020249
jmp 0x140031fc0
mov dword [rsp + 0x48], 4
mov dword [rsp + 0x40], 0x100000
mov dword [rsp + 0x38], 2
lea rax, [rbp + 0x328]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x1000
xor r9d, r9d
lea r8, [rbp + 0x88]
mov rdx, 0xffffffffffffffff
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ntdll.dll_NtMapViewOfSection]
mov dword [rbp + 0x24], eax
cmp dword [rbp + 0x24], 0
jl 0x140031fa7
lea rcx, str.___Resolving_payload_import_r_n
call fcn.140020f41
mov r9, qword [rbp + 0x518]
mov r8, qword [rbp + 0x510]
mov rdx, qword [rbp + 0x2a8]
mov rax, qword [rbp + 0x4f0]
mov ecx, dword [rax + 8]
call fcn.140020b27
movzx eax, al
test eax, eax
je 0x140031f94
mov rax, qword [rbp + 0x4f0]
mov r8d, dword [rax + 0xc]
mov edx, dword [rbp + 0x2e4]
mov rcx, qword [rbp + 0xa8]
call fcn.1400204c4
mov rax, qword [rbp + 0x4f0]
mov eax, dword [rax + 8]
mov dword [rbp + 0x4b4], eax
cmp dword [rbp + 0x4b4], 1
je 0x140031ed9
cmp dword [rbp + 0x4b4], 2
je 0x140031ec8
cmp dword [rbp + 0x4b4], 3
je 0x140031eb7
jmp 0x140031ed9
mov rax, qword [rbp + 0x2a8]
mov ecx, dword [rbp + 0x2e4]
mov dword [rax], ecx
jmp 0x140031ee8
mov rax, qword [rbp + 0x2a8]
mov ecx, dword [rbp + 0x2e4]
mov dword [rax], ecx
jmp 0x140031ee8
mov rax, qword [rbp + 0x2a8]
mov ecx, dword [rbp + 0x2e4]
mov dword [rax], ecx
mov rax, qword [rbp + 0x2a8]
mov dword [rax + 8], 0xc0000001
mov rdx, qword [rbp + 0x2a8]
mov rcx, qword [rbp + 0x4f0]
call fcn.140020da7
movzx eax, al
test eax, eax
jne 0x140031f26
lea rdx, str.____Error__cannot_store_additional_data_for_shellcode_r_n
mov ecx, 1
call fcn.1400204b0
jmp 0x140031fc0
mov r8, qword [rbp + 0x2c8]
mov rdx, qword [rbp + 0x2a8]
mov rcx, qword [rbp + 0x88]
call fcn.1400207c6
mov eax, dword [rbp + 0x2e4]
mov rcx, qword [rbp + 0x2c8]
mov rdx, qword [rbp + 0x88]
add rdx, rcx
mov rcx, rdx
mov r8d, eax
mov rdx, qword [rbp + 0xa8]
call fcn.1400207c6
mov rdx, qword [rbp + 0x88]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
mov rax, qword [rbp + 0x4f8]
mov rcx, qword [rbp + 0x48]
mov qword [rax], rcx
mov dword [rbp + 4], 1
jmp 0x140031fa5
lea rdx, str.____Error__resolving_additional_import_failed_r_n
mov ecx, 1
call fcn.1400204b0
jmp 0x140031fb6
mov edx, dword [rbp + 0x24]
lea rcx, str.____Error__shared_section_not_mapped
call fcn.140020249
xor eax, eax
test eax, eax
jne 0x140031a74
mov ecx, dword [rbp + 0x24]
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp qword [rbp + 0xa8], 0
je 0x140031fe7
mov rcx, qword [rbp + 0xa8]
call fcn.140020aaa
cmp qword [rbp + 0x168], 0
je 0x140031ffd
mov rcx, qword [rbp + 0x168]
call fcn.140020aaa
cmp qword [rbp + 0x2a8], 0
je 0x140032013
mov rcx, qword [rbp + 0x2a8]
call fcn.140020aaa
cmp qword [rbp + 0x68], 0
je 0x140032023
mov rcx, qword [rbp + 0x68]
call fcn.140020aaa
cmp dword [rbp + 4], 0
jne 0x140032058
cmp qword [rbp + 0x88], 0
je 0x140032047
mov rdx, qword [rbp + 0x88]
mov rcx, 0xffffffffffffffff
call qword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
cmp qword [rbp + 0x48], 0
je 0x140032058
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ntdll.dll_NtClose]
mov eax, dword [rbp + 4]
mov edi, eax
lea rcx, [rbp - 0x70]
lea rdx, [0x14006d9a0]
call fcn.140020d66
mov eax, edi
lea rsp, [rbp + 0x4c8]
pop rdi
pop rsi
pop rbx
pop rbp
ret