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

Disassembly:
push ebp
mov eax, 0x2020
mov ebp, esp
push edi
push esi
push ebx
call fcn.0057e5f0
sub esp, eax
mov ebx, dword [0x7df7b0]
test ebx, ebx
je 0x4e9820
lea eax, [ebp - 0x100c]
mov dword [esp + 8], 0x800
lea ebx, [ebp - 0x200c]
mov dword [esp + 4], eax
lea esi, [ebp - 0x200e]
mov dword [esp], 0x5eaa40
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
sub esp, 0xc
mov dword [esp + 4], 0x800
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x2014]
mov edx, ebx
sub esp, 8
jmp 0x4e955e
add eax, 2
add edx, 2
mov word [eax - 2], cx
cmp eax, esi
je 0x4e9566
movzx ecx, word [edx]
test cx, cx
jne 0x4e9550
xor edx, edx
xor ecx, ecx
lea edi, [ebp - 0x2018]
mov word [eax], dx
xor edx, edx
mov eax, ebx
mov dword [esp], 1
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp], edi
call dword [0x7df7b0]
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x985
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetSearchPath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x986
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x201c], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov esi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x201c]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.got__s_expected__s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x2018]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 4], 0x5e8617
mov dword [esp], 0x5e861b
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
xor ecx, ecx
xor edx, edx
mov eax, ebx
sub esp, 8
mov dword [esp], 1
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp], edi
call dword [0x7df7b0]
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x98d
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetSearchPath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x98e
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x201c], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov esi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x201c]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.got__s_expected__s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x2018]
mov dword [esp], eax
call dword [0x7df7ac]
mov ecx, dword [0x7df7bc]
sub esp, 4
test ecx, ecx
je 0x4e97f9
mov eax, 0x993
call fcn.004e7d80
lea eax, [ebp - 0x2014]
mov dword [esp], eax
call dword [0x7df7bc]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.SetDllDirectoryW_failed_n
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
xor edx, edx
mov eax, ebx
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp], edi
call dword [0x7df7b0]
sub esp, 4
mov esi, eax
mov eax, 0x997
call fcn.004e7d80
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.RtlGetSearchPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0x998
call fcn.004e7d80
mov eax, ebx
call fcn.004e7de0
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov esi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.got__s_expected__s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x2018]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp], 0
call dword [0x7df7bc]
sub esp, 4
lea eax, [ebp - 0x100c]
mov dword [esp], 0x5eaa40
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x97a
call fcn.004e7d80
mov dword [esp], str.RtlGetSearchPath_isnt_available_n
call fcn.004e88a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret