Function at 0x4088fd
Capabilities:
Check if file exists
Enumerate files on windows
Get common file path
Get comspec environment variable
Query environment variable

Disassembly:
ret
xchg edx, esi
call fcn.0040c24d
xchg edx, esi
cmp al, 0xd
je 0x4088fc
cmp al, 0x7c
je 0x4088fc
cmp al, 0x2f
je 0x408970
cmp al, 0x2a
je 0x408970
cmp al, 0x2e
je 0x40896a
xchg edx, esi
mov ebx, 0x408f20
lodsb al, byte [esi]
call fcn.0040c296
cmp al, byte [ebx]
je 0x40893a
dec esi
jb 0x408963
inc ebx
test byte [ebx - 1], 0x80
je 0x40892e
add ebx, 4
jmp 0x408921
push esi
inc ebx
lodsb al, byte [esi]
call fcn.0040c296
cmp al, 0x2e
je 0x408952
xor al, byte [ebx]
je 0x40893b
cmp al, 0x80
je 0x408952
pop esi
dec esi
jmp 0x40892e
pop eax
inc ebx
test byte [ebx - 1], 0x80
je 0x408953
call fcn.0040c24d
xchg edx, esi
jmp dword [ebx]
xchg edx, esi
jmp 0x40bce0
inc edx
jmp 0x40bdda
inc edx
jmp 0x40bce0
mov edi, dword [0x4131b4]
push edx
xchg dword [0x413448], esp
push 0x7f
push edi
push 0x4126f8
call sub.KERNEL32.dll_GetEnvironmentVariableA
xchg dword [0x413448], esp
pop edx
add edi, eax
mov eax, 0x20432f20
stosd dword es:[edi], eax
mov ebx, edi
mov al, byte [edx]
inc edx
mov byte [ebx], al
inc bl
je 0x40bd27
cmp al, 0xd
jne 0x40bd0b
dec bl
mov al, byte [ebx - 1]
cmp al, 0x20
je 0x40bd18
cmp al, 0x3b
je 0x40bd27
inc bl
dec bl
mov byte [ebx], 0
mov edx, edi
sub esp, 0x10
mov ebp, esp
push eax
sub esp, 0x44
mov ebx, esp
mov edi, esp
mov ecx, 0x11
xor eax, eax
rep stosd dword es:[edi], eax
mov byte [ebx], 0x44
mov byte [ebx + 0x30], 1
call fcn.0040bdae
jne 0x40bd63
mov edx, dword [0x4131b4]
call fcn.0040bdae
je 0x40b20f
add esp, 0x44
pop eax
cmp al, 0x3b
je 0x40bd90
call fcn.00407999
jne 0x40bd90
mov eax, dword [esp]
xchg dword [0x413448], esp
push 0x64
push eax
call sub.KERNEL32.dll_WaitForSingleObject
xchg dword [0x413448], esp
cmp eax, 0x102
je 0x40bd6b
pop eax
pop ebx
add esp, 8
xchg dword [0x413448], esp
push eax
push ebx
call sub.KERNEL32.dll_CloseHandle
call sub.KERNEL32.dll_CloseHandle
xchg dword [0x413448], esp
ret
jmp 0x40bc8d
call fcn.00405595
mov ebx, dword [0x4131b4]
call fcn.0040bc14
test ch, 0x40
jne 0x40bdf8
cmp bl, 0xff
jae 0x40bdd5
mov byte [ebx], 0x2a
inc ebx
test ch, 0x80
jne 0x40be0b
cmp bl, 0xfc
jae 0x40bdd5
mov dword [ebx], 0x4342422e
add ebx, 4
mov byte [ebx], 0
call fcn.00402eb8
inc esp
imul esi, dword [edx + 0x65], 0x726f7463
jns 0x40be3d
outsd dx, dword [esi]
and byte [eax], al
or cl, cl
jne 0x40be6e
mov edx, dword [0x41315c]
pushal
xchg dword [0x413448], esp
push edx
push 0xff
call sub.KERNEL32.dll_GetCurrentDirectoryA
xchg dword [0x413448], esp
popal
xor ah, ah
mov ebx, dword [0x4131b4]
cmp byte [ebx], 0x5c
jne 0x40be53
mov ah, 0x3a
mov al, byte [edx]
inc edx
or al, al
je 0x40be67
push eax
call fcn.00402dfe
pop eax
cmp al, ah
je 0x40be6e
jmp 0x40be53
mov al, 0x5c
call fcn.00402dfe
mov ebx, dword [0x4131b4]
call fcn.00402ea9
call fcn.00402df5
mov ebx, dword [0x4131b4]
mov edx, dword [0x41315c]
push esi
xchg dword [0x413448], esp
push edx
push ebx
call sub.KERNEL32.dll_FindFirstFileA
xchg dword [0x413448], esp
cmp eax, 0xffffffff
mov ebx, eax
pop esi
je 0x40bf10
call fcn.00407999
jne 0x40bf10
mov edx, dword [0x41315c]
test byte [edx], 1
mov al, 0x20
je 0x40bebc
mov al, 0x2a
call fcn.00402dfe
mov al, 0x20
call fcn.00402dfe
push ebx
lea ebx, [edx + 0x2c]
call fcn.00402ea9
pop ebx
mov al, 0x20
call fcn.00402dfe
mov al, byte [0x41318c]
or al, al
je 0x40bef5
cmp al, 0x14
je 0x40bef5
cmp al, 0x28
je 0x40bef5
cmp al, 0x3c
je 0x40bef5
jb 0x40bed2
call fcn.00402df5
push ebx
push esi
xchg dword [0x413448], esp
push edx
push ebx
call sub.KERNEL32.dll_FindNextFileA
xchg dword [0x413448], esp
pop esi
pop ebx
or al, al
jne 0x40bea6
call fcn.00402df5
pushal
xchg dword [0x413448], esp
push ebx
call sub.KERNEL32.dll_FindClose
xchg dword [0x413448], esp
popal
ret