Function at 0x404a40
Capabilities:
Create process on windows
Create process suspended
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x414b1c]
push ebx
xor ebx, ebx
push esi
cmp eax, ebx
push edi
jne 0x404ad0
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
cmp edi, ebx
je 0x404ac6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Module32First
push edi
mov dword [0x414b20], eax
call esi
push str.Module32Next
push edi
mov dword [0x414b24], eax
call esi
push str.Process32First
push edi
mov dword [0x414b28], eax
call esi
push str.Process32Next
push edi
mov dword [0x414b2c], eax
call esi
push str.Thread32First
push edi
mov dword [0x414b30], eax
call esi
push str.Thread32Next
push edi
mov dword [0x414b34], eax
call esi
mov dword [0x414b38], eax
mov dword [0x414b1c], 1
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
cmp eax, ebx
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
jge 0x404af7
cmp ecx, ebx
jge 0x404af7
mov dword [ebp - 0x28], 1
jmp 0x404b04
mov dword [ebp - 0x28], 5
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x54]
push ecx
push edx
mov ax, word [ebp + 0xc]
push ebx
push ebx
push ebx
push ebx
push ebx
mov word [ebp - 0x22], bx
mov dword [ebp - 0x20], ebx
push ebx
mov ebx, dword [ebp + 8]
push ebx
push 0
mov word [ebp - 0x24], ax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x404c37
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
mov esi, str.cmd.exe__c
jb 0x404b4c
mov esi, str.command.com__c
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
push eax
call fcn.004058d0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x404c2d
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x54]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x404bf4
push ebx
call fcn.00406fc0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call fcn.00406fc0
mov eax, dword [0x414b20]
add esp, 4
test eax, eax
je 0x404c4f
mov eax, dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [ebp - 0xc]
push ecx
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x414b20]
test eax, eax
je 0x404c4f
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
push edx
push eax
call fcn.00404610
jmp 0x404c5c
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
push ecx
push edx
call fcn.00404890
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
mov edi, eax
mov eax, dword [ebp - 0x10]
push eax
call esi
mov ecx, dword [ebp - 0xc]
push ecx
call esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret