Function at 0x4023f3
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.0040ad50
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 0x402635
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 0x402629
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 0x40263c
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 0x402506
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 0x4025fc
mov dword [esp + 4], str.EXEFILE
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402522
mov eax, dword [ebp + 0x10]
jmp 0x4025f0
mov dword [esp + 4], 0x40d23c
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40254d
mov dword [esp + 4], edi
mov dword [esp], 0x104
call sub.kernel32.dll_GetCurrentDirectoryA
push eax
push eax
jmp 0x4025fc
mov dword [esp + 4], str.OLDPWD
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40256e
mov dword [esp + 4], 0x418fd4
jmp 0x4025f4
mov dword [esp + 4], str.JREHOMEDIR
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40258c
mov dword [esp + 4], 0x418ed0
jmp 0x4025f4
mov dword [esp + 4], str.HKEY
mov dword [esp], ebx
call sub.msvcrt.dll_strstr
cmp eax, ebx
jne 0x4025b6
mov dword [esp + 8], 0x400
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00401b56
jmp 0x4025fc
cmp byte [ebp - 0x8097], 0
jne 0x4025c9
mov dword [esp + 4], 0x40d257
jmp 0x4025f4
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 0x4025fc
lea eax, [ebp - 0x8017]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, dword [0x410a20]
test eax, eax
je 0x40261d
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 0x40242c
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, 1
jmp 0x40263e
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret