Function at 0x48137c
Capabilities:
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0xc0
call fcn.0047ac00
mov byte [ebp - 0xa9], al
test al, al
mov edx, 0x4fa001
jne 0x481420
mov dword [0x4f9da4], edx
call fcn.00476d24
mov dword [0x698fa0], ebx
mov dword [esp], 0x567599
call sub.msvcrt.dll_getenv
test eax, eax
je 0x481470
xor edx, edx
mov dword [0x698fa0], edx
mov edx, dword [0x4f99dc]
call fcn.004757ac
mov dword [0x4f9db0], eax
mov dword [0x698fa0], ebx
mov dword [esp], str.COMSPEC
call sub.msvcrt.dll_getenv
test eax, eax
mov edx, eax
je 0x481526
mov eax, dword [0x4f99dc]
xor edi, edi
mov dword [0x698fa0], edi
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0044acf4
mov dword [0x4f9db4], eax
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x4f99d8]
mov ecx, 1
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
lea eax, [ebp - 0xa9]
mov dword [esp], eax
call fcn.0044ac50
mov edx, eax
mov dword [0x4f9da4], edx
call fcn.00476d24
mov dword [0x698fa0], ebx
mov dword [esp], 0x567599
call sub.msvcrt.dll_getenv
test eax, eax
jne 0x4813c4
mov esi, esi
lea edi, [edi]
mov dword [esp], str.HOMEDRIVE
call sub.msvcrt.dll_getenv
mov dword [esp], str.HOMEPATH
mov edi, eax
call sub.msvcrt.dll_getenv
mov dword [ebp - 0xb0], eax
xor eax, eax
test edi, edi
mov dword [0x698fa0], eax
setne al
xor edx, edx
cmp dword [ebp - 0xb0], 0
setne dl
test eax, edx
je 0x481575
mov dword [esp], edi
call fcn.004209f0
mov esi, eax
mov eax, dword [ebp - 0xb0]
mov dword [esp], eax
call fcn.004209f0
lea esi, [esi + eax + 0x1f]
and esi, 0xfffffff0
mov eax, esi
call fcn.004ea990
movzx eax, byte [edi]
lea ecx, [esp + 0x1b]
and ecx, 0xfffffff0
mov edx, ecx
mov byte [ecx], al
jmp 0x4814ed
inc edi
inc edx
movzx eax, byte [edi]
mov byte [edx], al
test al, al
jne 0x4814e6
mov esi, dword [ebp - 0xb0]
movzx eax, byte [esi]
test al, al
je 0x481516
nop
mov byte [edx], al
inc edx
inc dword [ebp - 0xb0]
mov esi, dword [ebp - 0xb0]
movzx eax, byte [esi]
test al, al
jne 0x481500
mov byte [edx], 0
mov eax, ecx
mov edx, dword [0x4f99dc]
jmp 0x4813d2
lea eax, [ebp - 0xa8]
mov esi, 0x94
mov dword [ebp - 0xa8], esi
mov dword [esp], eax
call sub.KERNEL32.dll_GetVersionExA
sub esp, 4
test eax, eax
je 0x48158f
cmp dword [ebp - 0x98], 2
mov edx, str.cmd.exe
je 0x481559
mov edx, str.command.com
xor ecx, ecx
mov dword [0x698fa0], ecx
mov dword [esp], edx
call fcn.0044ad20
mov dword [0x4f9db4], eax
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
mov edx, dword [0x506948]
mov eax, 0x567530
call fcn.004757ac
call fcn.0047ae48
jmp 0x4813d7
call fcn.00439640
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x1d0
lea esi, [ebx - 4]
mov edx, dword [esi]
mov eax, edx
and eax, 3
dec eax
je 0x481730
mov eax, dword [esi]
call fcn.00475748
call fcn.00476dc0
mov dword [esi], eax
lea edx, [ebx - 4]
xor ecx, ecx
lea eax, [ebp - 0x198]
mov dword [ebp - 0x198], edx
xor edx, edx
mov dword [ebp - 0x190], edx
mov edx, 1
mov dword [ebp - 0x194], ecx
mov dword [esp], 0
call fcn.0047cac8
mov edx, dword [ebp - 0x194]
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x48160a
nop
lea esi, [esi]
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x481600
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x481825
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x481817
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x27]
and esi, 0xfffffff0
test edi, edi
je 0x48166c
cmp ecx, 1
je 0x481869
test ecx, ecx
jne 0x481718
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
mov dword [ebp - 0x1a4], esi
mov dword [ebp - 0x1a8], esp
mov eax, dword [ebp - 0x1a4]
mov edx, dword [0x4f99d8]
mov dword [esp + 4], eax
lea esi, [eax + edi*4]
mov dword [esp + 8], esi
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x1f]
lea edx, [eax + 0x1f]
mov ecx, eax
and edx, 0xfffffff0
mov eax, edx
call fcn.004ea990
mov eax, dword [ebp - 0x1a4]
lea edi, [esp + 0x27]
and edi, 0xfffffff0
mov dword [ebp - 0x19c], edi
lea ecx, [edi + ecx]
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x1a0], eax
lea eax, [ebp - 0x19c]
mov dword [ebp - 0x1ac], ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1a0]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x23]
cmp dword [ebp - 0x1a0], esi
jne 0x481718
mov eax, dword [ebp - 0x19c]
cmp eax, dword [ebp - 0x1ac]
je 0x48184e
mov dword [esp], str.c:_usr_work_edrive_w32texsrc_clisp249_clisp_2.49_src_pathname.d
mov eax, 0x206a
mov dword [esp + 4], eax
call fcn.00420a64
lea esi, [esi]
cmp byte [edx + 3], 0x26
jne 0x4815b0
mov eax, edx
call fcn.00475660
mov dword [esi], eax
test byte [eax + 8], 1
je 0x48183c
cmp dword [eax + 0x53], 0x4fa001
je 0x48183c
mov dword [0x698fa0], ebx
lea eax, [ebp - 0x188]
xor edi, edi
mov dword [esp + 4], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x53]
mov eax, dword [eax + 7]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileInformationByHandle
mov dword [0x698fa0], edi
sub esp, 8
test eax, eax
je 0x48183a
mov eax, dword [ebp - 0x184]
mov edx, dword [ebp - 0x180]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x17c]
mov dword [ebp - 0x140], edx
mov edx, dword [ebp - 0x178]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x174]
mov dword [ebp - 0x138], edx
mov edx, dword [ebp - 0x170]
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x130], edx
mov eax, dword [ebp - 0x134]
sub ebx, 4
test eax, eax
jne 0x4817f2
mov edi, dword [ebp - 0x130]
lea eax, [ebp - 0x144]
test edi, edi
jne 0x4817f8
lea eax, [ebp - 0x134]
mov dword [esp], eax
mov esi, 1
call fcn.0049a828
mov dword [0x698da0], eax
mov dword [0x699010], esi
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
add edx, 7
mov dword [ebp - 0x1a4], edx
jmp 0x481672
xor eax, eax
test edi, edi
mov dword [ebp - 0x1a4], eax
je 0x481672
call fcn.0042a998
mov eax, dword [esi]
mov edx, dword [eax + 0x5b]
cmp edx, 0x4fa001
je 0x481881
mov dword [esi], edx
jmp 0x4815be
mov byte [eax], 0
lea edx, [ebp - 0x148]
mov eax, edi
call fcn.0047cd0c
mov esp, dword [ebp - 0x1a8]
jmp 0x4817d5
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x48166c
call fcn.0047569c
nop
push ebp
lea eax, [ebx - 4]
mov ebp, esp
push esi
mov ebx, eax
sub esp, 0x24
mov edx, dword [eax]
mov eax, edx
and eax, 3
dec eax
je 0x481903
mov eax, edx
call fcn.00475748
call fcn.00476dc0
mov dword [ebx], eax
lea eax, [ebx + 4]
mov edx, 1
mov dword [ebp - 0x14], 0
mov ebx, eax
lea esi, [ebp - 0x18]
mov dword [ebp - 0x10], 0
sub eax, 4
mov dword [ebp - 0x18], eax
mov eax, esi
mov dword [esp], 0
call fcn.0047cac8
mov eax, esi
call fcn.0047c8c4
test al, al
je 0x481930
sub ebx, 4
mov eax, 0x4fa001
mov dword [0x698da0], eax
mov eax, 1
mov dword [0x699010], eax
add esp, 0x24
pop esi
pop ebp
ret
cmp byte [edx + 3], 0x26
jne 0x48189e
mov eax, edx
call fcn.00475660
test byte [eax + 8], 1
mov edx, eax
jne 0x4818e9
mov eax, dword [eax + 0x5b]
cmp eax, 0x4fa001
jne 0x4818aa
mov eax, edx
call fcn.0047569c
lea esi, [esi]
call fcn.0047ca94
lea esi, [esi]