Function at 0x402687
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, 0x558
push ebx
push esi
push edi
xor ebx, ebx
push 0x40
lea eax, [ebp - 0x70]
push ebx
push eax
mov dword [ebp - 0x74], 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 - 0x17b]
push ebx
push eax
mov byte [ebp - 0x17c], bl
call sub.ntdll.dll_memset
push 0x2c8
lea eax, [ebp - 0x448]
push ebx
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x44c], ebx
call sub.ntdll.dll_memset
add esp, 0x24
mov esi, 0x104
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
mov word [ebp - 0x44], ax
lea eax, [ebp - 0x554]
push eax
push esi
mov dword [ebp - 0x74], 0x44
mov dword [ebp - 0x48], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x554]
push eax
push ebx
push 0xc
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x17c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4027a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405650
push 0x21c
mov edi, str.SysStartProcessWithSleep
push edi
mov esi, str.src_system.cpp
push esi
call fcn.00404366
lea eax, [ebp - 0x17c]
add esp, 0x14
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x402772
sub eax, ecx
cmp eax, ebx
lea eax, [ebp - 0x17c]
jne 0x40278a
mov eax, str.none
push eax
push str.break___s_n
push 0x21c
push edi
push esi
call fcn.00404366
add esp, 0x14
jmp 0x402946
lea eax, [ebp - 0x44c]
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x44c], 0x10007
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x4027df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405650
push 0x221
push str.SysStartProcessWithSleep
push str.src_system.cpp
jmp 0x402797
push 0x40
push 0x3000
push 8
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x40280c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405650
push 0x22d
jmp 0x4027d3
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 0x40283b
push 0x86
push 0xc
mov eax, esi
mov edx, 0x4088f4
call fcn.0040425a
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
cmp eax, ebx
je 0x40285a
push 0x90
push 5
mov edx, 0x408b58
call fcn.0040425a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea ecx, [ebp - 0x24]
push ecx
push 8
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp + 8]
mov dword [ebp - 9], eax
mov eax, dword [ebp - 0x20]
push eax
mov dword [ebp - 0x28], eax
call edi
mov esi, str.src_system.cpp
test eax, eax
jne 0x4028df
cmp dword [ebp - 0x24], 8
je 0x4028df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12b
jne 0x4028df
lea eax, [ebp - 0x24]
push eax
push 0xffffff08
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push dword [ebp - 0x28]
call edi
test eax, eax
jne 0x4028df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edi, 0x405650
push edi
push 0x1f9
push str.SysWriteProcessMemory
push esi
call fcn.00404366
add esp, 0x14
jmp 0x4028e4
mov edi, 0x405650
push ebx
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x39c], eax
lea eax, [ebp - 0x44c]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x402923
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x243
push str.SysStartProcessWithSleep
jmp 0x402796
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x402940
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x247
jmp 0x402919
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x1c], ebx
je 0x402962
cmp dword [ebp - 0x10], ebx
jne 0x40295a
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebp - 0x1c]
call fcn.00402574
cmp dword [ebp - 0x20], ebx
je 0x40297e
cmp dword [ebp - 0x10], ebx
jne 0x402976
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x20]
call fcn.00402574
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0x564]
pop edi
pop esi
pop ebx
leave
ret 4