Function at 0x405820
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0xbc
mov esi, dword [edx]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x84], 0x4b50bc
test esi, esi
je 0x405b3b
lea edi, [edx + 4]
lea eax, [ebp - 0x84]
mov ebx, edi
mov dword [ebp - 0x8c], eax
mov edi, eax
mov dword [ebp - 0x90], ecx
mov dword [esp], esi
add ebx, 4
call sub.msvcrt.dll_strlen
mov ecx, edi
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.00478cc0
mov ecx, edi
sub esp, 8
mov dword [esp + 4], 1
mov dword [esp], 0x4b93a0
call fcn.00478cc0
mov esi, dword [ebx - 4]
sub esp, 8
test esi, esi
jne 0x405861
mov ebx, dword [ebp - 0x90]
mov eax, dword [ebp - 0x84]
mov eax, dword [eax - 0xc]
lea ecx, [ebp - 0x5c]
mov edi, dword [ebp - 0x8c]
mov dword [esp + 4], 0
sub eax, 1
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.0047a020
lea eax, [ebp - 0x5c]
mov ecx, edi
sub esp, 0xc
mov dword [esp], eax
call fcn.00478a80
mov eax, dword [ebp - 0x5c]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x4b50b0
jne 0x405c3b
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x8c], eax
xor eax, eax
mov ecx, 0x11
lea edi, [ebp - 0x5c]
test ebx, ebx
rep stosd dword es:[edi], eax
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x5c], 0x44
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x7c], 0x4b50bc
je 0x405b31
mov eax, dword [ebx]
test eax, eax
je 0x405b31
lea esi, [ebp - 0x74]
jmp 0x4059cd
cmp ecx, dword [edx - 8]
ja 0x405a21
mov dword [esp + 8], edi
mov ecx, esi
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00479370
mov edx, dword [eax]
sub esp, 0xc
mov dword [ebp - 0x70], edx
mov dword [eax], 0x4b50bc
lea eax, [ebp - 0x70]
lea ecx, [ebp - 0x7c]
mov dword [esp], eax
call fcn.00478dd0
mov eax, dword [ebp - 0x70]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x4b50b0
jne 0x405c13
mov eax, dword [ebp - 0x78]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b50b0
jne 0x405bee
mov eax, dword [ebp - 0x74]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b50b0
jne 0x405bc9
add ebx, 4
mov edi, dword [ebx]
test edi, edi
je 0x405a40
lea eax, [ebp - 0x86]
mov ecx, esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b93a2
call fcn.00479f70
lea eax, [ebp - 0x87]
lea ecx, [ebp - 0x78]
sub esp, 0xc
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00479f20
mov eax, dword [ebp - 0x78]
mov edx, dword [ebp - 0x74]
mov edi, dword [eax - 0xc]
mov ecx, dword [edx - 0xc]
sub esp, 8
add ecx, edi
cmp ecx, dword [eax - 8]
ja 0x405950
mov dword [esp], esi
lea ecx, [ebp - 0x78]
call fcn.00478dd0
mov edx, dword [eax]
sub esp, 4
mov dword [ebp - 0x70], edx
mov dword [eax], 0x4b50bc
jmp 0x40597d
mov edx, dword [ebp - 0x7c]
mov ecx, dword [edx - 0xc]
xor eax, eax
mov edi, dword [ebp - 0x8c]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
test ecx, ecx
cmovne eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x84]
mov dword [esp + 0x24], edi
lea edi, [ebp - 0x5c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
sub esp, 0x28
test eax, eax
je 0x405b51
mov eax, dword [ebp - 0x6c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x80]
sub esp, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x6c]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 8
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x68]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x80]
sub esp, 4
test eax, eax
jne 0x405ba1
xor eax, eax
mov edx, dword [ebp - 0x7c]
lea ecx, [edx - 0xc]
cmp ecx, 0x4b50b0
jne 0x405cbc
mov edx, dword [ebp - 0x84]
lea ecx, [edx - 0xc]
cmp ecx, 0x4b50b0
jne 0x405c8b
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 0x4b50bc
jmp 0x405a43
lea edx, [ebp - 0x84]
mov eax, 0x4b50bc
mov dword [ebp - 0x8c], edx
jmp 0x4058a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00427ed0
mov eax, dword [ebp - 0x70]
mov dword [esp + 4], str.CreateProcess_failed:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004057f0
mov eax, dword [ebp - 0x70]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b50b0
jne 0x405c66
mov eax, 0xffffffff
jmp 0x405b02
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 4], str._s_failed:__lu_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004057f0
jmp 0x405b97
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4059c4
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.004787f0
sub esp, 4
jmp 0x4059c4
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4059b2
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.004787f0
sub esp, 4
jmp 0x4059b2
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4059a0
lea eax, [ebp - 0x85]
mov dword [esp], eax
call fcn.004787f0
sub esp, 4
jmp 0x4059a0
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
lea eax, [ebp - 0x6c]
test edx, edx
mov dword [ebp - 0x8c], eax
jg 0x4058fa
mov dword [esp], eax
call fcn.004787f0
sub esp, 4
jmp 0x4058fa
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x405b97
lea eax, [ebp - 0x74]
mov dword [esp], eax
call fcn.004787f0
sub esp, 4
jmp 0x405b97
mov ebx, 0xffffffff
lock xadd dword [edx - 4], ebx
test ebx, ebx
jg 0x405b29
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [ebp - 0x8c], eax
call fcn.004787f0
mov eax, dword [ebp - 0x8c]
sub esp, 4
jmp 0x405b29
mov ebx, 0xffffffff
lock xadd dword [edx - 4], ebx
test ebx, ebx
jg 0x405b14
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [ebp - 0x8c], eax
call fcn.004787f0
mov eax, dword [ebp - 0x8c]
sub esp, 4
jmp 0x405b14