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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d828
mov eax, dword fs:[0]
push eax
mov eax, 0x1d58
call fcn.0040bc20
mov eax, dword [0x41a174]
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 0x40f3c8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x406895
cmp eax, edi
jae 0x406895
lea eax, [ebp - 0xc20]
push eax
lea eax, [ebp - 0x1c20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x4068aa
push 0x1000
lea eax, [ebp - 0x1c20]
push eax
push esi
call fcn.004062cb
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 0x406a57
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.004066f9
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 0x406986
mov byte [eax], 0
lea eax, [ebp - 0x31c]
push eax
push str._sjss
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.004066f9
add esp, 0x10
lea eax, [ebp - 0x1d60]
push eax
lea eax, [ebp - 0x114]
push eax
call ebx
mov ebx, eax
cmp edi, 0xffffffff
jne 0x4069e8
cmp ebx, edi
je 0x406a57
lea eax, [ebp - 0x114]
mov edi, 0x41af78
push eax
push esi
push str._Djava.ext.dirs__slibext__s_
push 0x30c
push edi
call fcn.004066f9
add esp, 0x14
push ebx
jmp 0x406a48
mov edi, 0x41af78
cmp ebx, 0xffffffff
je 0x406a27
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.004066f9
mov esi, dword [sym.imp.KERNEL32.dll_FindClose]
add esp, 0x18
push dword [ebp - 0x1d64]
call esi
push ebx
call esi
jmp 0x406a4e
lea eax, [ebp - 0x218]
push eax
push esi
push 0x40f43c
push 0x30c
push edi
call fcn.004066f9
add esp, 0x14
push dword [ebp - 0x1d64]
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
lea ecx, [ebp + 0xc]
call fcn.0040740b
lea ecx, [ebp + 0xc]
call fcn.00403f72
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.0040bc01
leave
ret