Function at 0x476660
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c3066
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x4eb6b8]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push esi
push edi
mov eax, dword [0x4eb6b8]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x40
mov esi, edx
mov dword [esp + 0x2c], eax
xor eax, eax
lea edx, [esp + 0x34]
push ebx
push edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
call fcn.004a4260
movzx eax, byte [ebp + 0xc]
add esp, 0xc
neg eax
sbb eax, eax
and eax, 5
mov word [esp + 0x5c], ax
mov eax, dword [esi + 0x10]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x2c], 0x44
mov dword [esp + 0x58], 1
neg ecx
or ecx, eax
push ecx
call fcn.0049c21e
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x4768a2
lea eax, [esp + 0x74]
push eax
call fcn.00414a60
mov dword [esp + 0x170], ebx
lea ecx, [esp + 0x74]
push str.new_FAILED.
push ecx
call fcn.0041d7d0
add esp, 8
push 0x22
mov esi, 0xf
push str.CProcUtility::CreateProcessInherit
lea ecx, [esp + 0x130]
mov dword [esp + 0x144], esi
mov dword [esp + 0x140], ebx
mov byte [esp + 0x130], bl
call fcn.004190e0
mov byte [esp + 0x170], 1
push esi
push str.ProcUtility.cpp
lea ecx, [esp + 0x114]
mov dword [esp + 0x128], esi
mov dword [esp + 0x124], ebx
mov byte [esp + 0x114], bl
call fcn.004190e0
mov byte [esp + 0x170], 2
lea edx, [esp + 0x144]
push edx
lea eax, [esp + 0x78]
push eax
call fcn.00414b60
mov byte [esp + 0x170], 3
push eax
push 0x10b
push ebx
call fcn.00413e40
push eax
lea edx, [esp + 0x138]
lea ecx, [esp + 0x11c]
call fcn.00471900
mov byte [esp + 0x170], 2
cmp dword [esp + 0x158], 8
jb 0x4767fb
mov ecx, dword [esp + 0x144]
push ecx
call fcn.0049ca60
add esp, 4
xor edx, edx
mov dword [esp + 0x158], 7
mov dword [esp + 0x154], ebx
mov word [esp + 0x144], dx
mov byte [esp + 0x170], 1
mov edi, 0x10
cmp dword [esp + 0x120], edi
jb 0x47683d
mov eax, dword [esp + 0x10c]
push eax
call fcn.0049ca60
add esp, 4
mov dword [esp + 0x120], esi
mov dword [esp + 0x11c], ebx
mov byte [esp + 0x10c], bl
mov byte [esp + 0x170], bl
cmp dword [esp + 0x13c], edi
jb 0x476872
mov ecx, dword [esp + 0x128]
push ecx
call fcn.0049ca60
add esp, 4
mov dword [esp + 0x13c], esi
mov dword [esp + 0x138], ebx
mov byte [esp + 0x128], bl
mov dword [esp + 0x170], 0xffffffff
lea ecx, [esp + 0x74]
call fcn.00403e50
xor al, al
jmp 0x476b03
mov eax, dword [esi + 0x10]
inc eax
push eax
push ebx
push edi
call fcn.004a4260
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x4768bb
mov eax, dword [esi]
jmp 0x4768bd
mov eax, esi
push eax
push 0x4d9964
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esp + 0x20]
add esp, 0xc
mov byte [esp + 0x13], 1
cmp dword [eax + 0x10], ebx
ja 0x4768e1
mov dword [esp + 0x14], ebx
jmp 0x4768ea
call fcn.004169f0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x10], ebx
ja 0x4768f7
xor eax, eax
jmp 0x4768fc
call fcn.004169f0
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push ecx
push edx
push ebx
push 0x20
push 1
push ebx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x476ada
lea eax, [esp + 0x74]
push eax
call fcn.00414a60
mov dword [esp + 0x170], 4
push esi
push ecx
push str.._cmd:
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea ecx, [esp + 0x8c]
push str.CP_FAILED._GetLastError:
push ecx
call fcn.0041d7d0
add esp, 0xc
push eax
call fcn.00475c10
add esp, 4
push eax
call fcn.0041d7d0
add esp, 0xc
push eax
call fcn.0041dcf0
add esp, 8
push 0x22
mov esi, 0xf
push str.CProcUtility::CreateProcessInherit
lea ecx, [esp + 0x114]
mov dword [esp + 0x128], esi
mov dword [esp + 0x124], ebx
mov byte [esp + 0x114], bl
call fcn.004190e0
mov byte [esp + 0x170], 5
push esi
push str.ProcUtility.cpp
lea ecx, [esp + 0x130]
mov dword [esp + 0x144], esi
mov dword [esp + 0x140], ebx
mov byte [esp + 0x130], bl
call fcn.004190e0
mov byte [esp + 0x170], 6
lea edx, [esp + 0x144]
push edx
lea eax, [esp + 0x78]
push eax
call fcn.00414b60
mov byte [esp + 0x170], 7
push eax
push 0x11f
push 1
call fcn.00413e40
push eax
lea edx, [esp + 0x11c]
lea ecx, [esp + 0x138]
call fcn.00471900
mov byte [esp + 0x170], 6
cmp dword [esp + 0x158], 8
jb 0x476a38
mov ecx, dword [esp + 0x144]
push ecx
call fcn.0049ca60
add esp, 4
xor edx, edx
mov dword [esp + 0x158], 7
mov dword [esp + 0x154], ebx
mov word [esp + 0x144], dx
mov byte [esp + 0x170], 5
cmp dword [esp + 0x13c], 0x10
jb 0x476a76
mov eax, dword [esp + 0x128]
push eax
call fcn.0049ca60
add esp, 4
mov dword [esp + 0x13c], esi
mov dword [esp + 0x138], ebx
mov byte [esp + 0x128], bl
mov byte [esp + 0x170], 4
cmp dword [esp + 0x120], 0x10
jb 0x476aad
mov ecx, dword [esp + 0x10c]
push ecx
call fcn.0049ca60
add esp, 4
mov dword [esp + 0x120], esi
mov dword [esp + 0x11c], ebx
mov byte [esp + 0x10c], bl
mov dword [esp + 0x170], 0xffffffff
lea ecx, [esp + 0x74]
call fcn.00403e50
mov byte [esp + 0x13], bl
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x1c], ebx
call esi
push edi
mov dword [esp + 0x20], ebx
call fcn.0049cdad
mov al, byte [esp + 0x17]
add esp, 4
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.0049ca6b
mov esp, ebp
pop ebp
ret