Function at 0x407780
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], 0x4b717c
test esi, esi
je 0x407a9b
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.0047d050
mov ecx, edi
sub esp, 8
mov dword [esp + 4], 1
mov dword [esp], 0x4b9fc0
call fcn.0047d050
mov esi, dword [ebx - 4]
sub esp, 8
test esi, esi
jne 0x4077c1
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.0047e3b0
lea eax, [ebp - 0x5c]
mov ecx, edi
sub esp, 0xc
mov dword [esp], eax
call fcn.0047ce10
mov eax, dword [ebp - 0x5c]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x4b7170
jne 0x407b9b
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], 0x4b717c
je 0x407a91
mov eax, dword [ebx]
test eax, eax
je 0x407a91
lea esi, [ebp - 0x74]
jmp 0x40792d
cmp ecx, dword [edx - 8]
ja 0x407981
mov dword [esp + 8], edi
mov ecx, esi
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.0047d700
mov edx, dword [eax]
sub esp, 0xc
mov dword [ebp - 0x70], edx
mov dword [eax], 0x4b717c
lea eax, [ebp - 0x70]
lea ecx, [ebp - 0x7c]
mov dword [esp], eax
call fcn.0047d160
mov eax, dword [ebp - 0x70]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x4b7170
jne 0x407b73
mov eax, dword [ebp - 0x78]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b7170
jne 0x407b4e
mov eax, dword [ebp - 0x74]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b7170
jne 0x407b29
add ebx, 4
mov edi, dword [ebx]
test edi, edi
je 0x4079a0
lea eax, [ebp - 0x86]
mov ecx, esi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b9fc2
call fcn.0047e300
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.0047e2b0
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 0x4078b0
mov dword [esp], esi
lea ecx, [ebp - 0x78]
call fcn.0047d160
mov edx, dword [eax]
sub esp, 4
mov dword [ebp - 0x70], edx
mov dword [eax], 0x4b717c
jmp 0x4078dd
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 0x407ab1
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 0x407b01
xor eax, eax
mov edx, dword [ebp - 0x7c]
lea ecx, [edx - 0xc]
cmp ecx, 0x4b7170
jne 0x407c1c
mov edx, dword [ebp - 0x84]
lea ecx, [edx - 0xc]
cmp ecx, 0x4b7170
jne 0x407beb
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 0x4b717c
jmp 0x4079a3
lea edx, [ebp - 0x84]
mov eax, 0x4b717c
mov dword [ebp - 0x8c], edx
jmp 0x407809
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0042c020
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.00407750
mov eax, dword [ebp - 0x70]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b7170
jne 0x407bc6
mov eax, 0xffffffff
jmp 0x407a62
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.00407750
jmp 0x407af7
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x407924
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.0047cb80
sub esp, 4
jmp 0x407924
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x407912
lea eax, [ebp - 0x70]
mov dword [esp], eax
call fcn.0047cb80
sub esp, 4
jmp 0x407912
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x407900
lea eax, [ebp - 0x85]
mov dword [esp], eax
call fcn.0047cb80
sub esp, 4
jmp 0x407900
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
lea eax, [ebp - 0x6c]
test edx, edx
mov dword [ebp - 0x8c], eax
jg 0x40785a
mov dword [esp], eax
call fcn.0047cb80
sub esp, 4
jmp 0x40785a
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x407af7
lea eax, [ebp - 0x74]
mov dword [esp], eax
call fcn.0047cb80
sub esp, 4
jmp 0x407af7
mov ebx, 0xffffffff
lock xadd dword [edx - 4], ebx
test ebx, ebx
jg 0x407a89
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [ebp - 0x8c], eax
call fcn.0047cb80
mov eax, dword [ebp - 0x8c]
sub esp, 4
jmp 0x407a89
mov ebx, 0xffffffff
lock xadd dword [edx - 4], ebx
test ebx, ebx
jg 0x407a74
lea edx, [ebp - 0x70]
mov dword [esp], edx
mov dword [ebp - 0x8c], eax
call fcn.0047cb80
mov eax, dword [ebp - 0x8c]
sub esp, 4
jmp 0x407a74