Function at 0x402700
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.00405d50
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 0x402942
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 0x402936
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 0x402949
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 0x402813
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 0x402909
mov dword [esp + 4], str.EXEFILE
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40282f
mov eax, dword [ebp + 0x10]
jmp 0x4028fd
mov dword [esp + 4], 0x408392
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40285a
mov dword [esp + 4], edi
mov dword [esp], 0x104
call sub.kernel32.dll_GetCurrentDirectoryA
push eax
push eax
jmp 0x402909
mov dword [esp + 4], str.OLDPWD
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x40287b
mov dword [esp + 4], 0x41371c
jmp 0x402901
mov dword [esp + 4], str.JREHOMEDIR
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402899
mov dword [esp + 4], 0x413618
jmp 0x402901
mov dword [esp + 4], str.HKEY
mov dword [esp], ebx
call sub.msvcrt.dll_strstr
cmp eax, ebx
jne 0x4028c3
mov dword [esp + 8], 0x400
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00401b4e
jmp 0x402909
cmp byte [ebp - 0x8097], 0
jne 0x4028d6
mov dword [esp + 4], 0x4083ad
jmp 0x402901
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 0x402909
lea eax, [ebp - 0x8017]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, dword [0x40b064]
test eax, eax
je 0x40292a
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 0x402739
mov dword [esp + 4], edx
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, 1
jmp 0x40294b
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret