Function at 0x40f158
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe90
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
movsx eax, byte [ebx]
cmp eax, 0x61
jb 0x40f172
sub eax, 0x20
cmp eax, 0x41
jb 0x40f182
cmp eax, 0x5a
ja 0x40f182
cmp byte [ebx + 1], 0x3a
je 0x40f1a0
push 0x2f
push ebx
call fcn.0040d674
add esp, 8
test eax, eax
jne 0x40f1a0
push 0x5c
push ebx
call fcn.0040d674
add esp, 8
test eax, eax
je 0x40f1a5
xor edx, edx
mov dword [ebp + 0x18], edx
xor esi, esi
push 0x2e
push ebx
call fcn.0040d870
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40f20d
mov edx, dword [ebp + 0x18]
lea ecx, [ebp - 0x110]
push edx
push 0x412799
push ecx
push ebx
call fcn.0040ef50
add esp, 0x10
mov edi, eax
test eax, eax
je 0x40f26a
push 0x41279a
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040d71c
add esp, 8
test eax, eax
je 0x40f206
push 0x41279f
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0040d71c
add esp, 8
test eax, eax
jne 0x40f26a
mov esi, 1
jmp 0x40f26a
mov eax, dword [ebp + 0x18]
lea edx, [ebp - 0x110]
push eax
push str..EXE
push edx
push ebx
call fcn.0040ef50
add esp, 0x10
mov edi, eax
test eax, eax
jne 0x40f26a
mov edx, dword [ebp + 0x18]
lea ecx, [ebp - 0x110]
push edx
push str..BAT
push ecx
push ebx
call fcn.0040ef50
add esp, 0x10
mov edi, eax
mov esi, eax
test eax, eax
jne 0x40f26a
mov edx, dword [ebp + 0x18]
lea ecx, [ebp - 0x110]
push edx
push str..CMD
push ecx
push ebx
call fcn.0040ef50
add esp, 0x10
mov edi, eax
mov esi, eax
test edi, edi
je 0x40f284
test esi, esi
je 0x40f296
push 0x4127b3
call fcn.0040ea7c
pop ecx
mov dword [ebp - 8], eax
test eax, eax
jne 0x40f296
mov dword [0x412664], 2
or eax, 0xffffffff
jmp 0x40f4c3
test esi, esi
je 0x40f2b3
mov edx, dword [ebp + 0x10]
push edx
push 0x4127bb
mov ecx, dword [ebp - 8]
push ecx
call fcn.0040f008
add esp, 0xc
mov ebx, eax
jmp 0x40f2cc
mov eax, dword [ebp + 0x10]
add eax, 4
push eax
push 0
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx]
push ecx
call fcn.0040f008
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x40f2e2
mov dword [0x412664], 8
or eax, 0xffffffff
jmp 0x40f4c3
cmp dword [ebp + 0x14], 0
jne 0x40f2ec
xor edi, edi
jmp 0x40f315
mov eax, dword [ebp + 0x14]
push eax
call fcn.0040f0f4
pop ecx
mov edi, eax
test eax, eax
jne 0x40f315
mov dword [0x412664], 8
push ebx
call fcn.0040df1c
pop ecx
or eax, 0xffffffff
jmp 0x40f4c3
call dword [0x4126e4]
push 0x44
push 0
lea edx, [ebp - 0x160]
push edx
call fcn.004057a0
add esp, 0xc
mov dword [ebp - 0x160], 0x44
mov word [ebp - 0x130], 0xa
cmp dword [0x41130c], 0
je 0x40f380
push 0
call dword [0x411d94]
pop ecx
mov word [ebp - 0x12e], ax
movzx ecx, word [ebp - 0x12e]
push ecx
call fcn.0040e024
pop ecx
mov dword [ebp - 0x12c], eax
test eax, eax
je 0x40f2fc
mov edx, dword [ebp - 0x12c]
push edx
call dword [0x411d94]
pop ecx
mov dword [ebp - 0x11c], 0xc
xor ecx, ecx
lea eax, [ebp - 0x170]
mov dword [ebp - 0x118], ecx
lea edx, [ebp - 0x160]
mov dword [ebp - 0x114], 1
push eax
push edx
push 0
push edi
cmp dword [ebp + 8], 4
mov ecx, 8
je 0x40f3bb
add ecx, 0xfffffff8
push ecx
push 1
lea eax, [ebp - 0x11c]
push eax
lea edx, [ebp - 0x11c]
push edx
push ebx
test esi, esi
je 0x40f3d6
mov ecx, dword [ebp - 8]
jmp 0x40f3dc
lea ecx, [ebp - 0x110]
push ecx
call sub.KERNEL32.dll_CreateProcessA
dec eax
je 0x40f423
call sub.KERNEL32.dll_GetLastError
and eax, 0xffff
dec eax
je 0x40f403
sub eax, 7
je 0x40f40a
sub eax, 0x51
jne 0x40f411
mov eax, 0x2a
jmp 0x40f416
mov eax, 0x13
jmp 0x40f416
mov eax, 8
jmp 0x40f416
mov eax, 0x15
mov dword [0x412664], eax
or esi, 0xffffffff
jmp 0x40f4b3
mov eax, dword [ebp + 8]
sub eax, 1
jb 0x40f438
je 0x40f473
dec eax
je 0x40f48e
dec eax
sub eax, 2
jb 0x40f467
jmp 0x40f4a4
push 0xffffffffffffffff
mov edx, dword [ebp - 0x170]
push edx
call sub.KERNEL32.dll_WaitForSingleObject
lea ecx, [ebp - 4]
push ecx
mov eax, dword [ebp - 0x170]
push eax
call sub.KERNEL32.dll_GetExitCodeProcess
mov edx, dword [ebp - 0x170]
push edx
call sub.KERNEL32.dll_CloseHandle
mov esi, dword [ebp - 4]
jmp 0x40f4a7
mov eax, dword [ebp - 0x170]
push eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x170]
push edx
mov ecx, dword [ebp - 0x168]
push ecx
call dword [0x412790]
add esp, 8
mov esi, eax
jmp 0x40f4a7
push edi
call fcn.0040df1c
pop ecx
push ebx
call fcn.0040df1c
pop ecx
push 0
call fcn.0040ea2c
pop ecx
or esi, 0xffffffff
mov eax, dword [ebp - 0x16c]
push eax
call sub.KERNEL32.dll_CloseHandle
push edi
call fcn.0040df1c
pop ecx
push ebx
call fcn.0040df1c
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret