Function at 0x40a109
Capabilities:
Query environment variable
Set environment variable

Disassembly:
sub esp, 0xdc
mov eax, dword [0x43bc80]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
mov ebx, dword [esp + 0xe4]
push ebp
push esi
push edi
push 0x7d0
call fcn.00412d69
mov esi, str.javaw.exe
push esi
mov edi, eax
call fcn.00413700
pop ecx
pop ecx
push esi
mov ebp, ebx
push ebx
sub ebp, eax
call fcn.00413700
pop ecx
add eax, ebp
push eax
call fcn.004150b0
pop ecx
pop ecx
test eax, eax
jne 0x40a15e
push esi
jmp 0x40a163
push str.java.exe
call fcn.00413700
or ebp, 0xffffffff
push ebx
sub ebp, eax
call fcn.00413700
pop ecx
mov esi, eax
pop ecx
add esi, ebp
push esi
push ebx
push edi
call fcn.00413a50
push edi
mov byte [esi + edi], 0
call fcn.004108d7
push edi
mov dword [esp + 0x30], eax
call fcn.0040a003
add esp, 0x14
push 0
push 0
mov ebp, 0x432cd4
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
jge 0x40a1b0
xor esi, esi
lea eax, [esi + 0x1770]
push eax
call fcn.00412d69
push edi
mov dword [esp + 0x18], eax
call fcn.00413700
lea eax, [eax + esi + 0x1771]
push eax
call fcn.00412d69
mov ebx, eax
push edi
push ebx
call fcn.00413b80
push 0x430d8c
push ebx
call fcn.00413b90
add esp, 0x1c
lea eax, [esi + 0x1770]
push eax
push dword [esp + 0x14]
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x40a20e
push dword [esp + 0x10]
push ebx
call fcn.00413b90
pop ecx
pop ecx
jmp 0x40a215
mov eax, dword [esp + 0x10]
mov byte [eax], 0
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40a22a
push ebx
push esi
push str.Setting_PATH__d__S
jmp 0x40a237
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.Setting_PATH__S_failed_with_error__d
call fcn.0040ea46
add esp, 0xc
push 0x5dc6
call fcn.00412d69
push ebx
mov esi, eax
push str.PATH_s
push esi
call fcn.00414711
push esi
call fcn.004182fe
and dword [esp + 0x28], 0
push 0xc8
lea eax, [esp + 0x38]
push eax
push 0x98
call fcn.00403814
lea eax, [esp + 0x40]
push eax
call fcn.00413700
add esp, 0x24
test eax, eax
jbe 0x40a298
lea eax, [esp + 0x20]
push eax
push edi
call fcn.00409f6c
pop ecx
pop ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], str.client
cmp dword [esp + 0x14], 0
jne 0x40a32b
mov eax, dword [esp + 0x18]
push dword [eax]
push edi
call fcn.00409f6c
add dword [esp + 0x20], 4
cmp dword [esp + 0x20], 0x432f70
pop ecx
pop ecx
mov dword [esp + 0x14], eax
jl 0x40a2a0
test eax, eax
jne 0x40a32b
push dword [esp + 0x1c]
call fcn.00410966
pop ecx
push dword [esp + 0x10]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x40a2fb
push dword [esp + 0x10]
push str.Setting_PATH__S
call fcn.0040ea46
pop ecx
pop ecx
jmp 0x40a313
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esp + 0x14]
push str.Setting_PATH__S_failed_with_error__d
call fcn.0040ea46
add esp, 0xc
push dword [esp + 0x10]
push str.PATH_s
push esi
call fcn.00414711
push esi
call fcn.004182fe
add esp, 0x10
push ebx
call fcn.00413a45
push dword [esp + 0x14]
call fcn.00413a45
push esi
call fcn.00413a45
push edi
call fcn.00413a45
mov ecx, dword [esp + 0xf8]
mov eax, dword [esp + 0x24]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00413c78
add esp, 0xdc
ret