Function at 0x40a140
Capabilities:
Check if file exists
Create process on windows

Disassembly:
sub esp, 0x78
xor eax, eax
mov dword [esp + 0x28], eax
push ebx
mov dword [esp + 0x30], eax
push ebp
xor ebp, ebp
mov dword [esp + 0x38], eax
test byte [esp + 0x8c], 4
push esi
push edi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x10], ebp
je 0x40a171
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x94]
mov ebx, dword [esp + 0x8c]
and ecx, 1
mov dword [esp + 0x94], ecx
xor eax, eax
cmp ebx, ebp
mov ecx, 0x11
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
mov eax, 0xfffff830
mov dword [esp + 0x44], 0x44
mov dword [esp + 0x70], 5
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov word [esp + 0x74], 7
mov edi, 0xc
je 0x40a394
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a1d0
sub eax, edx
mov esi, eax
cmp esi, 9
jl 0x40a1fa
lea ecx, [esi + ebx - 9]
push str.cmd.exe_
push ecx
call fcn.00410d14
add esp, 8
test eax, eax
je 0x40a280
cmp esi, 8
jl 0x40a215
lea edx, [esi + ebx - 8]
push str.cmd.exe
push edx
call fcn.00410d14
add esp, 8
test eax, eax
je 0x40a280
cmp esi, 0xe
jl 0x40a230
lea eax, [esi + ebx - 0xe]
push str._typeperf.exe_
push eax
call fcn.00410d14
add esp, 8
test eax, eax
je 0x40a280
cmp esi, 0xd
jl 0x40a24b
lea ecx, [esi + ebx - 0xd]
push str._typeperf.exe
push ecx
call fcn.00410d14
add esp, 8
test eax, eax
je 0x40a280
cmp esi, edi
jl 0x40a265
lea edx, [esi + ebx - 0xe]
push str._nircmd.exe_
push edx
call fcn.00410d14
add esp, 8
test eax, eax
je 0x40a280
cmp esi, 0xb
jl 0x40a285
lea eax, [esi + ebx - 0xd]
push str._nircmd.exe
push eax
call fcn.00410d14
add esp, 8
test eax, eax
jne 0x40a285
mov word [esp + 0x74], bp
mov esi, dword [esp + 0x90]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], 1
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
call fcn.0040b0e0
mov edi, eax
cmp edi, ebp
je 0x40a2b9
cmp dword [esp + 0x10], ebp
jne 0x40a302
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x48]
push edx
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x44]
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp dword [esp + 0x10], ebp
mov dword [esp + 0x18], eax
jne 0x40a302
cmp eax, ebp
jne 0x40a41d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40a389
cmp edi, ebp
je 0x40a389
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebp
je 0x40a37f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push edi
call esi
push str.Wow64RevertWow64FsRedirection
push edi
mov ebp, eax
call esi
test ebp, ebp
mov esi, eax
je 0x40a376
test esi, esi
je 0x40a376
lea edx, [esp + 0x10]
push edx
call ebp
test eax, eax
je 0x40a376
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x98]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x44]
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov edx, dword [esp + 0x10]
push edx
mov dword [esp + 0x1c], eax
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor ebp, ebp
cmp dword [esp + 0x18], ebp
jne 0x40a41d
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x78
ret
mov esi, dword [esp + 0x90]
cmp esi, ebp
je 0x40a28c
push 0x41ea98
push esi
call fcn.0040b280
add esp, 8
test eax, eax
jne 0x40a413
push 0x41ea8c
push esi
call fcn.0040b280
add esp, 8
test eax, eax
jne 0x40a413
push 0x41ea7c
push esi
call fcn.0040b280
add esp, 8
test eax, eax
jne 0x40a413
push 0x41ea6c
push esi
call fcn.0040b280
add esp, 8
test eax, eax
jne 0x40a413
push 0x41ea5c
push esi
call fcn.0040b280
add esp, 8
test eax, eax
jne 0x40a413
push 0x41ea4c
push esi
call fcn.0040b280
add esp, 8
test eax, eax
je 0x40a28c
mov word [esp + 0x74], bp
jmp 0x40a28c
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x94], ebp
je 0x40a4bf
mov edi, dword [esp + 0x98]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov dword [esp + 0x14], 0x103
lea esp, [esp]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40a4a0
cmp dword [esp + 0x14], 0x103
jne 0x40a4bf
push 0x1f4
call ebx
inc esi
test edi, edi
jle 0x40a481
lea eax, [edi + edi]
cmp eax, esi
jl 0x40a4ba
cmp dword [esp + 0x14], 0x103
je 0x40a450
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x78
ret
mov ecx, dword [esp + 0x34]
push ecx
mov ebp, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x78
ret
mov ebp, 2
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x78
ret