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

Disassembly:
push ebp
mov eax, 0x2024
mov ebp, esp
push edi
push esi
push ebx
call fcn.0057e5f0
sub esp, eax
mov ecx, dword [0x7df7b4]
test ecx, ecx
je 0x4f2d38
lea eax, [ebp - 0x100c]
mov dword [esp + 8], 0x800
lea ebx, [ebp - 0x200c]
mov dword [esp + 4], eax
lea esi, [ebp - 0x2006]
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 edx, [ebp - 0x2014]
mov eax, ebx
sub esp, 8
jmp 0x4f27ce
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, esi
je 0x4f27d6
movzx ecx, word [eax]
test cx, cx
jne 0x4f27c0
xor eax, eax
lea esi, [ebp - 0x2018]
mov word [edx], ax
mov eax, dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov dword [esp + 4], 0
mov dword [esp], str.NoDefaultCurrentDirectoryInExePath
mov dword [ebp - 0x201c], eax
call eax
xor ecx, ecx
xor edx, edx
mov eax, ebx
sub esp, 8
mov dword [esp], 0
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], str._foo
call dword [0x7df7b4]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9b6
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9b7
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
mov dword [esp + 8], edi
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]
xor ecx, ecx
xor edx, edx
mov eax, ebx
sub esp, 4
mov dword [esp], 0
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], 0x5ea6fe
call dword [0x7df7b4]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9bd
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9be
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
mov dword [esp + 8], edi
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], 0x5e9c19
mov dword [esp], str.NoDefaultCurrentDirectoryInExePath
mov eax, dword [ebp - 0x201c]
call eax
xor ecx, ecx
xor edx, edx
mov eax, ebx
sub esp, 8
mov dword [esp], 0
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], str._foo
call dword [0x7df7b4]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9c6
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9c7
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
mov dword [esp + 8], edi
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, 0x5ea6f8
xor edx, edx
mov eax, ebx
sub esp, 4
mov dword [esp], 1
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], 0x5ea6fe
call dword [0x7df7b4]
sub esp, 8
mov edi, eax
mov eax, 0x9cd
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9ce
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
mov dword [esp + 8], edi
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
mov eax, dword [ebp - 0x201c]
call eax
xor ecx, ecx
xor edx, edx
mov eax, ebx
sub esp, 8
mov dword [esp], 0
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], str._foo
call dword [0x7df7b4]
sub esp, 8
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9d5
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
call fcn.004e88d0
call fcn.0057d110
mov dword [eax], 0x5e82d4
mov dword [eax + 4], 0x9d6
mov eax, ebx
call fcn.004e7de0
mov dword [ebp - 0x201c], eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7de0
mov edx, ebx
mov edi, eax
mov eax, dword [ebp - 0x2018]
call fcn.004e7c30
mov ecx, dword [ebp - 0x201c]
mov dword [esp + 8], edi
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 edx, dword [0x7df7bc]
sub esp, 4
test edx, edx
je 0x4f2d0f
mov eax, 0x9db
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], 0
xor ecx, ecx
xor edx, edx
mov eax, ebx
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp], str._foo
call dword [0x7df7b4]
sub esp, 8
mov esi, eax
mov eax, 0x9df
call fcn.004e7d80
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.RtlGetExePath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0x9e0
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, 0x9aa
call fcn.004e7d80
mov dword [esp], str.RtlGetExePath_isnt_available_n
call fcn.004e88a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret