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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
xor ebx, ebx
xor eax, eax
push esi
push edi
mov dword [ebp - 0x38], ebx
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4067cd
mov dword [eax], ebx
test byte [ebp + 0x10], 4
je 0x4067da
mov dword [ebp - 8], 1
push 0x44
pop esi
push esi
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.00481190
mov ecx, dword [ebp + 8]
add esp, 0xc
mov edi, dword [ebp + 0xc]
mov eax, 0xfffff830
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x50], 5
push 7
pop eax
mov word [ebp - 0x4c], ax
test ecx, ecx
je 0x4068ee
mov esi, ecx
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40681a
sub esi, edx
cmp esi, 9
jl 0x406845
lea eax, [ecx - 9]
add eax, esi
push 0x4a2f04
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
je 0x406958
mov ecx, dword [ebp + 8]
cmp esi, 8
jl 0x406864
lea eax, [ecx - 8]
add eax, esi
push 0x4a2f10
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
je 0x406958
cmp esi, 0xe
jl 0x406886
mov eax, dword [ebp + 8]
add eax, 0xfffffff2
add eax, esi
push 0x4a2f1c
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
je 0x406958
cmp esi, 0xd
jl 0x4068a8
mov eax, dword [ebp + 8]
add eax, 0xfffffff3
add eax, esi
push 0x4a2f2c
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
je 0x406958
cmp esi, 0xc
jl 0x4068ca
mov eax, dword [ebp + 8]
add eax, 0xfffffff4
add eax, esi
push 0x4a2f3c
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
je 0x406958
cmp esi, 0xb
jl 0x40695e
mov eax, dword [ebp + 8]
add eax, 0xfffffff5
add eax, esi
push 0x4a2f4c
push eax
call fcn.0048581f
pop ecx
pop ecx
test eax, eax
jne 0x40695e
jmp 0x406958
test edi, edi
je 0x40695e
push str.cmd.exe_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x406958
push str.cmd.exe
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x406958
push str._typeperf.exe_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x406958
push str._typeperf.exe
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x406958
push str._nircmd.exe_
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
jne 0x406958
push str._nircmd.exe
push edi
call fcn.00406c9b
pop ecx
pop ecx
test eax, eax
je 0x40695e
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.00406af6
mov esi, eax
test esi, esi
je 0x406987
cmp dword [ebp - 8], ebx
jne 0x4069cc
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 - 0xc], eax
cmp dword [ebp - 8], ebx
jne 0x4069cc
test eax, eax
jne 0x406a50
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x406a48
test esi, esi
je 0x406a48
push 0x4a2538
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 8], eax
test eax, eax
je 0x406a43
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push eax
call esi
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 8]
mov dword [ebp - 0x10], eax
call esi
mov esi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x406a3a
test esi, esi
je 0x406a3a
lea ecx, [ebp - 0x10]
push ecx
call eax
test eax, eax
je 0x406a3a
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 - 0xc], eax
call esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0xc], ebx
jne 0x406a50
or ebx, 0xffffffff
jmp 0x406aed
push dword [ebp - 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test byte [ebp + 0x10], 1
je 0x406ae8
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 0x406ae5
mov eax, dword [ebp - 4]
cmp eax, 0x103
jne 0x406abd
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp dword [ebp + 0x1c], ebx
je 0x406aab
push ebx
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x406acf
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x406ab8
add eax, eax
cmp eax, edi
jl 0x406acf
mov eax, dword [ebp - 4]
jmp 0x406ac6
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x406ac6
mov dword [ecx], eax
cmp eax, 0x103
je 0x406a6e
jmp 0x406ae8
test byte [ebp + 0x10], 8
push 2
pop ebx
je 0x406ae8
push 0xffffffffffffffff
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x406ae8
xor ebx, ebx
inc ebx
push dword [ebp - 0x38]
call esi
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret