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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push edi
xor eax, eax
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
xor ebx, ebx
mov dword [ebp - 8], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00410605
pop ecx
test al, al
jne 0x40f5b8
mov edi, dword [ebp + 0xc]
push edi
call fcn.00410605
pop ecx
test al, al
jne 0x40f5b8
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40f299
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
push esi
push 0x44
pop esi
and eax, 4
push esi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.00427a90
mov ecx, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x7c], esi
mov eax, 0xfffff830
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x50], 5
push 7
pop eax
mov word [ebp - 0x4c], ax
test ecx, ecx
je 0x40f3b4
mov esi, ecx
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40f2e0
sub esi, edx
cmp esi, 9
jl 0x40f30b
lea eax, [ecx - 9]
add eax, esi
push 0x44ead4
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
je 0x40f41e
mov ecx, dword [ebp + 8]
cmp esi, 8
jl 0x40f32a
lea eax, [ecx - 8]
add eax, esi
push 0x44eae0
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
je 0x40f41e
cmp esi, 0xe
jl 0x40f34c
mov eax, dword [ebp + 8]
add eax, 0xfffffff2
add eax, esi
push 0x44eaec
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
je 0x40f41e
cmp esi, 0xd
jl 0x40f36e
mov eax, dword [ebp + 8]
add eax, 0xfffffff3
add eax, esi
push 0x44eafc
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
je 0x40f41e
cmp esi, 0xc
jl 0x40f390
mov eax, dword [ebp + 8]
add eax, 0xfffffff4
add eax, esi
push 0x44eb0c
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
je 0x40f41e
cmp esi, 0xb
jl 0x40f424
mov eax, dword [ebp + 8]
add eax, 0xfffffff5
add eax, esi
push 0x44eb1c
push eax
call fcn.0042d363
pop ecx
pop ecx
test eax, eax
jne 0x40f424
jmp 0x40f41e
test edi, edi
je 0x40f424
push str.cmd.exe_
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
jne 0x40f41e
push 0x44eb34
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
jne 0x40f41e
push str._typeperf.exe_
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
jne 0x40f41e
push str._typeperf.exe
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
jne 0x40f41e
push str._nircmd.exe_
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
jne 0x40f41e
push str._nircmd.exe
push edi
call fcn.004110c5
pop ecx
pop ecx
test eax, eax
je 0x40f424
xor eax, eax
mov word [ebp - 0x4c], ax
push 0xc
pop ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
call fcn.00410716
mov esi, eax
test esi, esi
je 0x40f44d
cmp dword [ebp - 0xc], ebx
jne 0x40f492
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 0x1000000
push ebx
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], ebx
jne 0x40f492
test eax, eax
jne 0x40f516
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40f50e
test esi, esi
je 0x40f50e
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40f509
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push eax
call esi
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
call esi
mov esi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40f500
test esi, esi
je 0x40f500
lea ecx, [ebp - 0x10]
push ecx
call eax
test eax, eax
je 0x40f500
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 0x1000000
push ebx
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
push dword [ebp - 0x10]
mov dword [ebp - 8], eax
call esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 8], ebx
jne 0x40f516
or ebx, 0xffffffff
jmp 0x40f5b3
push dword [ebp - 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test byte [ebp + 0x10], 1
je 0x40f5ae
mov edi, ebx
mov dword [ebp - 4], 0x103
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40f5ab
mov eax, dword [ebp - 4]
cmp eax, 0x103
jne 0x40f583
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp dword [ebp + 0x1c], ebx
je 0x40f571
push ebx
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40f595
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x40f57e
add eax, eax
cmp eax, edi
jl 0x40f595
mov eax, dword [ebp - 4]
jmp 0x40f58c
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x40f58c
mov dword [ecx], eax
cmp eax, 0x103
je 0x40f534
jmp 0x40f5ae
test byte [ebp + 0x10], 8
push 2
pop ebx
je 0x40f5ae
push 0xffffffffffffffff
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x40f5ae
xor ebx, ebx
inc ebx
push dword [ebp - 0x38]
call esi
mov eax, ebx
pop esi
jmp 0x40f5bb
or eax, 0xffffffff
pop edi
pop ebx
leave
ret