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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xab0
mov dword [ebp - 8], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0xaac], 0
mov dword [ebp - 0xaa8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x984], 1
mov dword [ebp - 0x988], 0
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 0x10082757
push 0x10148854
call sub.MSVCR70D.dll_getenv
add esp, 4
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x100826e6
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 0x100826c5
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x1014885c
lea eax, [ebp - 0x980]
push eax
call sub.MSVCR70D.dll_sprintf
add esp, 0x10
jmp 0x100826e4
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp - 0x160]
push edx
push 0x10148870
lea eax, [ebp - 0x980]
push eax
call sub.MSVCR70D.dll_sprintf
add esp, 0x10
jmp 0x100826ed
xor eax, eax
jmp 0x100828de
mov dword [ebp - 0xc], 8
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
jne 0x1008270f
mov dword [ebp - 0x984], 0
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0xaac], eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0xaa8], eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 4], eax
cmp dword [ebp - 0xaac], 0xffffffff
je 0x1008274e
cmp dword [ebp - 0xaa8], 0xffffffff
je 0x1008274e
cmp dword [ebp - 4], 0xffffffff
jne 0x10082755
xor eax, eax
jmp 0x100828de
jmp 0x10082778
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 0x1008280e
push 0x1014887c
call sub.MSVCR70D.dll_getenv
add esp, 4
mov dword [ebp - 0x98c], eax
cmp dword [ebp - 0x98c], 0
je 0x1008280e
mov eax, dword [ebp - 0x98c]
push eax
lea ecx, [ebp - 0xa94]
push ecx
call sub.MSVCR70D.dll_strcpy
add esp, 8
lea edx, [ebp - 0x990]
push edx
call fcn.100cca0c
add esp, 4
test eax, eax
jne 0x1008280e
lea eax, [ebp - 0xa94]
push eax
mov ecx, dword [ebp - 0x990]
push ecx
call fcn.100cfd86
add esp, 8
test eax, eax
jne 0x100827ff
push 2
mov edx, dword [ebp - 0x990]
push edx
call fcn.100d5725
add esp, 8
test eax, eax
je 0x100827ff
lea eax, [ebp - 0xa94]
mov dword [ebp - 8], eax
lea ecx, [ebp - 0x990]
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 0x10082863
mov dword [ebp - 0x28], 0x100
mov edx, dword [ebp - 0xaac]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0xaa8]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
lea edx, [ebp - 0xaa4]
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 - 0xab0], eax
mov edx, dword [ebp - 0x58]
push edx
call sub.MSVCR70D.dll_free
add esp, 4
cmp dword [ebp - 0xab0], 0
je 0x100828c3
mov eax, dword [ebp - 0xaa4]
mov dword [ebp - 0x988], eax
mov ecx, dword [ebp - 0xaa0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0xc], 0
je 0x100828d8
cmp dword [ebp - 0x984], 0
je 0x100828d8
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov eax, dword [ebp - 0x988]
mov esp, ebp
pop ebp
ret