Function at 0x402aa3
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov eax, 0x80ac
mov ebp, esp
push edi
push esi
push ebx
call fcn.0040ba60
mov ecx, 0x20
sub esp, eax
xor eax, eax
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x8097]
mov edx, dword [ebp + 0xc]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x8017]
lea ebx, [ebp - 0x8097]
mov cx, 0x7fff
rep stosb byte es:[edi], al
cmp byte [edx], 0
je 0x402ce5
mov dword [esp], edx
mov dword [esp + 4], 0x25
mov dword [ebp - 0x809c], edx
call sub.msvcrt.dll_strchr
mov edx, dword [ebp - 0x809c]
test eax, eax
mov edi, eax
je 0x402cd9
lea eax, [eax + 1]
mov dword [esp + 4], 0x25
mov dword [esp], eax
mov dword [ebp - 0x80a4], edx
mov dword [ebp - 0x80a0], eax
call sub.msvcrt.dll_strchr
test eax, eax
mov dword [ebp - 0x809c], eax
je 0x402cec
mov edx, dword [ebp - 0x80a4]
mov ecx, edi
mov dword [esp], esi
sub ecx, edx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call sub.msvcrt.dll_strncat
mov eax, dword [ebp - 0x809c]
mov dword [esp], ebx
mov byte [ebp - 0x8097], 0
sub eax, edi
mov edi, esi
dec eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x80a0]
mov dword [esp + 4], eax
call sub.msvcrt.dll_strncat
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov dword [esp + 4], str.EXEDIR
mov dword [esp], ebx
not ecx
lea edi, [esi + ecx - 1]
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402bb6
mov eax, dword [ebp + 0x14]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
call sub.msvcrt.dll_strncat
jmp 0x402cac
mov dword [esp + 4], str.EXEFILE
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402bd2
mov eax, dword [ebp + 0x10]
jmp 0x402ca0
mov dword [esp + 4], 0x40e288
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402bfd
mov dword [esp + 4], edi
mov dword [esp], 0x104
call sub.kernel32.dll_GetCurrentDirectoryA
push eax
push eax
jmp 0x402cac
mov dword [esp + 4], str.OLDPWD
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402c1e
mov dword [esp + 4], 0x422200
jmp 0x402ca4
mov dword [esp + 4], str.JREHOMEDIR
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402c3c
mov dword [esp + 4], 0x4220fc
jmp 0x402ca4
mov dword [esp + 4], str.HKEY
mov dword [esp], ebx
call sub.msvcrt.dll_strstr
cmp eax, ebx
jne 0x402c66
mov dword [esp + 8], 0x400
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00402206
jmp 0x402cac
cmp byte [ebp - 0x8097], 0
jne 0x402c79
mov dword [esp + 4], 0x40e2a3
jmp 0x402ca4
lea eax, [ebp - 0x8017]
mov dword [esp + 8], 0x7fff
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.kernel32.dll_GetEnvironmentVariableA
sub esp, 0xc
test eax, eax
je 0x402cac
lea eax, [ebp - 0x8017]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, dword [0x419c4c]
test eax, eax
je 0x402ccd
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Substitute:_t_s___s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [ebp - 0x809c]
inc edx
jmp 0x402adc
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, 1
jmp 0x402cee
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret