Function at 0x1008234b
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xaac
mov dword [ebp - 8], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0xaa8], 0
mov dword [ebp - 0xaa4], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x984], 1
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.1008197b
add esp, 8
cmp dword [ebp + 0xc], 0
je 0x10082486
push 0x10148828
call sub.MSVCR70D.dll_getenv
add esp, 4
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x10082415
mov edx, dword [ebp - 0x5c]
push edx
lea eax, [ebp - 0x160]
push eax
call sub.MSVCR70D.dll_strcpy
add esp, 8
call fcn.100842b2
test eax, eax
je 0x100823f4
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x10148830
lea eax, [ebp - 0x980]
push eax
call sub.MSVCR70D.dll_sprintf
add esp, 0x10
jmp 0x10082413
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x10148844
lea eax, [ebp - 0x980]
push eax
call sub.MSVCR70D.dll_sprintf
add esp, 0x10
jmp 0x1008241c
xor eax, eax
jmp 0x1008260e
mov dword [ebp - 0xc], 8
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
jne 0x1008243e
mov dword [ebp - 0x984], 0
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0xaa8], eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0xaa4], eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 0xaa8], 0xffffffff
je 0x1008247d
cmp dword [ebp - 0xaa4], 0xffffffff
je 0x1008247d
cmp dword [ebp - 4], 0xffffffff
jne 0x10082484
xor eax, eax
jmp 0x1008260e
jmp 0x100824a7
mov dword [ebp - 0xc], 8
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp - 0x980]
push edx
call sub.MSVCR70D.dll_strcpy
add esp, 8
cmp dword [ebp + 0x10], 0
je 0x1008253d
push 0x10148850
call sub.MSVCR70D.dll_getenv
add esp, 4
mov dword [ebp - 0x988], eax
cmp dword [ebp - 0x988], 0
je 0x1008253d
mov eax, dword [ebp - 0x988]
push eax
lea ecx, [ebp - 0xa90]
push ecx
call sub.MSVCR70D.dll_strcpy
add esp, 8
lea edx, [ebp - 0x98c]
push edx
call fcn.100cca0c
add esp, 4
test eax, eax
jne 0x1008253d
lea eax, [ebp - 0xa90]
push eax
mov ecx, dword [ebp - 0x98c]
push ecx
call fcn.100cfd86
add esp, 8
test eax, eax
jne 0x1008252e
push 2
mov edx, dword [ebp - 0x98c]
push edx
call fcn.100d5725
add esp, 8
test eax, eax
je 0x1008252e
lea eax, [ebp - 0xa90]
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x98c]
push ecx
call fcn.100ccc98
add esp, 4
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0
mov word [ebp - 0x22], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x28], 0
cmp dword [ebp + 0xc], 0
je 0x10082592
mov dword [ebp - 0x28], 0x100
mov edx, dword [ebp - 0xaa8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0xaa4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
lea edx, [ebp - 0xaa0]
push edx
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 0
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
push 0
push 0
lea ecx, [ebp - 0x980]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp - 0xaac], eax
mov edx, dword [ebp - 0x58]
push edx
call sub.MSVCR70D.dll_free
add esp, 4
cmp dword [ebp - 0xaac], 0
je 0x100825f3
mov eax, dword [ebp - 0xaa0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xa9c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], 0
je 0x10082608
cmp dword [ebp - 0x984], 0
je 0x10082608
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov eax, dword [ebp - 0xaac]
mov esp, ebp
pop ebp
ret