Function at 0x40a170
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov dword [esp + 0x10], 0x4b8fbc
mov esi, edx
mov dword [esp + 0x2c], ecx
mov ebx, dword [edx]
test ebx, ebx
je 0x40a1cf
add esi, 4
lea edi, [esp + 0x10]
nop word [eax + eax]
push ebx
call sub.msvcrt.dll_strlen
add esp, 4
mov ecx, edi
push eax
push ebx
call fcn.0047f8b0
mov ecx, edi
push 1
push 0x4bc2e8
call fcn.0047f8b0
mov ebx, dword [esi]
add esi, 4
test ebx, ebx
jne 0x40a1a0
mov eax, dword [esp + 0x10]
jmp 0x40a1d4
mov eax, 0x4b8fbc
mov eax, dword [eax - 0xc]
mov esi, dword [ebp + 8]
lea ebx, [esp + 0x48]
lea edi, [esp + 0x10]
mov ecx, ebx
dec eax
push eax
push 0
push edi
call fcn.00480c10
mov ecx, edi
push ebx
call fcn.0047f670
mov eax, dword [esp + 0x48]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a4f2
xorps xmm0, xmm0
mov ecx, 0x4b8fbc
test esi, esi
mov dword [esp + 0x28], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x48], 0x44
mov dword [esp + 0x20], 0x4b8fbc
movaps xmmword [esp + 0x30], xmm0
je 0x40a403
mov eax, dword [esi]
test eax, eax
je 0x40a403
add esi, 4
lea edi, [esp + 0x24]
jmp 0x40a340
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a3c8
lea eax, [esp + 8]
push eax
call fcn.0047f3e0
jmp 0x40a3c8
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a3db
lea eax, [esp + 8]
push eax
call fcn.0047f3e0
jmp 0x40a3db
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a3ee
push edi
call fcn.0047f3e0
jmp 0x40a3ee
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.00480b10
mov ecx, edi
lea eax, [esp + 0x18]
push eax
push 1
push 0x4bc2ea
call fcn.00480b60
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov edx, dword [eax - 0xc]
mov ebx, dword [ecx - 0xc]
add ebx, edx
cmp ebx, dword [eax - 8]
jbe 0x40a37c
cmp ebx, dword [ecx - 8]
jbe 0x40a390
lea ecx, [esp + 0x14]
push edi
call fcn.0047f9c0
jmp 0x40a39b
mov ecx, edi
push edx
push eax
push 0
call fcn.0047ff60
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
mov dword [eax], 0x4b8fbc
lea ecx, [esp + 0x20]
lea eax, [esp + 0xc]
push eax
call fcn.0047f9c0
mov eax, dword [esp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a2d2
mov eax, dword [esp + 0x24]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a2f3
mov eax, dword [esp + 0x14]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a314
mov eax, dword [esi]
add esi, 4
test eax, eax
jne 0x40a340
mov ecx, dword [esp + 0x20]
lea ebx, [esp + 0x48]
mov eax, dword [ecx - 0xc]
test eax, eax
cmove ecx, eax
lea eax, [esp + 0x30]
push eax
push ebx
push 0
push ecx
push 0
push 0
push 0
push 0
push dword [esp + 0x30]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40a47f
push 0xffffffffffffffff
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x30]
call esi
push dword [esp + 0x34]
call esi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40a4c8
mov ecx, dword [sym.imp.msvcrt.dll__iob]
add ecx, 0x40
push eax
push dword [esp + 0x30]
push str._s_failed:__lu_n
push ecx
call fcn.0040a580
add esp, 0x10
jmp 0x40a4c1
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0xc]
push eax
push ecx
call fcn.0042ff60
add esp, 8
push dword [esp + 0xc]
push str.CreateProcess_failed:__s_n
push esi
call fcn.0040a580
add esp, 0xc
mov eax, dword [esp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a543
mov esi, 0xffffffff
jmp 0x40a4ca
xor esi, esi
mov eax, dword [esp + 0x20]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a513
mov eax, dword [esp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, 0x4b8fb0
jne 0x40a52d
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a209
lea eax, [esp + 0x30]
push eax
call fcn.0047f3e0
jmp 0x40a209
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a4d9
lea eax, [esp + 0xc]
push eax
call fcn.0047f3e0
jmp 0x40a4d9
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a4e8
push ebx
call fcn.0047f3e0
jmp 0x40a4e8
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x40a4c1
lea eax, [esp + 0x14]
push eax
call fcn.0047f3e0
jmp 0x40a4c1