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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40dede
mov eax, dword fs:[0]
push eax
mov eax, 0x1d58
call fcn.0040c2d0
mov eax, dword [0x41b1b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor ebx, ebx
lea eax, [ebp - 0x1c20]
push 0x1000
push ebx
push eax
mov dword [ebp - 4], ebx
call sub.VCRUNTIME140.dll_memset
mov edi, 0x800
lea eax, [ebp - 0xc20]
push edi
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea eax, [ebp - 0xc20]
push edi
push eax
push 0x410420
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40689b
cmp eax, edi
jae 0x40689b
lea eax, [ebp - 0xc20]
push eax
lea eax, [ebp - 0x1c20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4068b0
push 0x1000
lea eax, [ebp - 0x1c20]
push eax
push esi
call fcn.004062d1
add esp, 0xc
lea eax, [ebp - 0x1c20]
push str._Djava.ext.dirs
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsstr]
pop ecx
pop ecx
test eax, eax
jne 0x406a5d
mov edi, 0x104
lea eax, [ebp - 0x420]
push edi
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
push edi
lea eax, [ebp - 0x218]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea eax, [ebp - 0x420]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x420]
push eax
push str._sSunJavaDeploymentLibTrusted
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.004066ff
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea eax, [ebp - 0x1d60]
add esp, 0x10
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
mov edi, eax
lea eax, [ebp - 0x31c]
push 0x104
push 0
push eax
mov dword [ebp - 0x1d64], edi
call sub.VCRUNTIME140.dll_memset
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
lea eax, [ebp - 0x31c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x31c]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_strrchr
pop ecx
pop ecx
test eax, eax
je 0x40698c
mov byte [eax], 0
lea eax, [ebp - 0x31c]
push eax
push str._sjss
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.004066ff
add esp, 0x10
lea eax, [ebp - 0x1d60]
push eax
lea eax, [ebp - 0x114]
push eax
call ebx
mov ebx, eax
cmp edi, 0xffffffff
jne 0x4069ee
cmp ebx, edi
je 0x406a5d
lea eax, [ebp - 0x114]
mov edi, 0x41bf08
push eax
push esi
push str._Djava.ext.dirs__slibext__s_
push 0x30c
push edi
call fcn.004066ff
add esp, 0x14
push ebx
jmp 0x406a4e
mov edi, 0x41bf08
cmp ebx, 0xffffffff
je 0x406a2d
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
push esi
push str._Djava.ext.dirs__slibext__s__s_
push 0x30c
push edi
call fcn.004066ff
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
add esp, 0x18
push dword [ebp - 0x1d64]
call esi
push ebx
call esi
jmp 0x406a54
lea eax, [ebp - 0x218]
push eax
push esi
push 0x410494
push 0x30c
push edi
call fcn.004066ff
add esp, 0x14
push dword [ebp - 0x1d64]
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
lea ecx, [ebp + 0xc]
call fcn.00407548
lea ecx, [ebp + 0xc]
call fcn.004040fb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040c2bc
leave
ret