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

Disassembly:
push ebp
mov eax, 0x202c
mov ebp, esp
push edi
push esi
push ebx
call fcn.0057e5f0
sub esp, eax
mov eax, dword [0x7df7a8]
test eax, eax
je 0x4eaa18
lea eax, [ebp - 0x100c]
mov dword [esp + 8], 0x800
lea ebx, [ebp - 0x2006]
mov dword [esp + 4], eax
mov dword [esp], 0x5eaa40
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x200c]
sub esp, 0xc
mov dword [esp + 4], 0x800
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
lea edx, [ebp - 0x2014]
lea eax, [ebp - 0x200c]
sub esp, 8
jmp 0x4e98be
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, ebx
je 0x4e98c6
movzx ecx, word [eax]
test cx, cx
jne 0x4e98b0
xor eax, eax
lea esi, [ebp - 0x2018]
lea ebx, [ebp - 0x201c]
xor ecx, ecx
mov word [edx], ax
xor edx, edx
lea eax, [ebp - 0x200c]
mov dword [esp], 1
call fcn.004e8020
mov dword [ebp - 0x2018], 0xdeadbeef
mov dword [ebp - 0x201c], 0xdeadbeef
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0x9fc
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0x9fd
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0x9fe
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
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
lea eax, [ebp - 0x200c]
sub esp, 8
mov dword [esp], 1
call fcn.004e8020
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa04
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa05
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa06
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
mov eax, dword [0x7df7bc]
sub esp, 4
test eax, eax
je 0x4e9c26
mov eax, 0xa0b
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 edx, edx
lea ecx, [ebp - 0x2014]
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa0e
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa0f
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa10
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp], 0
call dword [0x7df7bc]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x800
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa16
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa17
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
lea eax, [ebp - 0x200c]
mov dword [esp + 4], 0x800
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
mov dword [ebp - 0x2024], eax
call eax
mov eax, 0xa19
sub esp, 8
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x200
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa1d
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa1e
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
lea eax, [ebp - 0x200c]
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x200c]
sub esp, 0xc
mov dword [esp + 4], 0x5c
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
test eax, eax
je 0x4e9dd8
xor edi, edi
mov word [eax], di
mov eax, 0xa21
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
mov dword [esp], 0x5ea6f0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa25
call fcn.004e7d80
xor eax, eax
cmp edi, 0xc000000d
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
xor eax, eax
nop
movzx edx, word [eax + 0x5e8686]
mov word [ebp + eax - 0x200c], dx
add eax, 2
test dx, dx
jne 0x4e9e90
cmp word [ebp - 0x200c], 0
lea edx, [ebp - 0x200c]
je 0x4e9ec9
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x4e9ec0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [ebp + eax - 0x2014]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4e9ed0
cmp word [ebp - 0x200c], 0
lea edx, [ebp - 0x200c]
je 0x4e9f01
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4e9ef8
mov ecx, 0x5c
xor eax, eax
mov word [edx], cx
lea esi, [esi]
nop
movzx ecx, word [eax + 0x5ea6f0]
mov word [edx + eax + 2], cx
add eax, 2
test cx, cx
jne 0x4e9f10
lea eax, [ebp - 0x200c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
mov dword [esp], eax
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa2d
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa2e
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa2f
call fcn.004e7d80
lea eax, [ebp - 0x2014]
call fcn.004e7de0
mov edi, eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
mov ecx, eax
mov eax, dword [ebp - 0x201c]
cmp dword [eax], 0x5c005c
je 0x4ea9e0
xor eax, eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edi
mov dword [esp], eax
mov dword [esp + 4], str.got__s_expected___s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
mov dword [esp], str._c:_test.dll
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa34
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa35
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa36
call fcn.004e7d80
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
mov dword [esp + 4], 0x5e86c8
mov edi, eax
mov eax, dword [ebp - 0x201c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], edi
movzx eax, al
mov dword [esp + 4], str.got__s_expected__c:_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, dword [ebp - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], 0x5ea6f0
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa3a
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa3b
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
xor edx, edx
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov eax, 0xa3d
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], 0x5e86ee
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa41
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa42
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
xor edx, edx
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov eax, 0xa44
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], str.._foo_foobar
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa48
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa49
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
mov edx, str.._foo_foobar
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov eax, 0xa4b
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], str.temp_foo
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa4f
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa50
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
mov edx, str.temp_foo
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov eax, 0xa52
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], str.c:_temp_foo
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa56
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa57
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp], 1
xor ecx, ecx
mov edx, str.c:_temp_foo
lea eax, [ebp - 0x200c]
call fcn.004e8020
mov eax, 0xa59
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
xor eax, eax
sub esp, 4
lea esi, [esi]
movzx edx, word [eax + 0x5ea6f0]
mov word [ebp + eax - 0x200c], dx
add eax, 2
test dx, dx
jne 0x4ea598
lea eax, [ebp - 0x200c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x108
mov dword [esp], eax
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa5e
call fcn.004e7d80
xor eax, eax
cmp edi, 0xc000000d
mov dword [esp + 0xc], 0xc000000d
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.got__lx_expected__lx_n
call fcn.004e88d0
mov eax, 0xa5f
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
xor eax, eax
lea esi, [esi]
movzx edx, word [ebp + eax - 0x2014]
mov word [ebp + eax - 0x200c], dx
add eax, 2
test dx, dx
jne 0x4ea638
cmp word [ebp - 0x200c], 0
lea edx, [ebp - 0x200c]
je 0x4ea669
add edx, 2
cmp word [edx], 0
jne 0x4ea660
mov eax, 0x5c
mov word [edx], ax
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x5ea6f0]
mov word [edx + eax + 2], cx
add eax, 2
test cx, cx
jne 0x4ea678
lea eax, [ebp - 0x200c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
mov dword [esp], eax
call dword [0x7df7a8]
sub esp, 0x10
mov edi, eax
mov eax, 0xa66
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa67
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa68
call fcn.004e7d80
lea eax, [ebp - 0x2014]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x2014]
mov edi, eax
mov eax, dword [ebp - 0x201c]
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 - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
mov eax, dword [0x7df7c8]
sub esp, 4
test eax, eax
je 0x4ea8a4
lea edi, [ebp - 0x2014]
mov dword [esp], edi
call eax
sub esp, 4
mov edi, eax
mov eax, 0xa6e
call fcn.004e7d80
xor eax, eax
test edi, edi
mov dword [esp + 4], str.AddDllDirectory_failed_n
setne al
mov dword [esp], eax
call fcn.004e88d0
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x400
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov dword [ebp - 0x2020], eax
mov eax, 0xa70
call fcn.004e7d80
mov edx, dword [ebp - 0x2020]
xor eax, eax
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
test edx, edx
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa71
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa72
call fcn.004e7d80
lea eax, [ebp - 0x2014]
call fcn.004e7de0
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x2014]
mov dword [ebp - 0x2028], eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x2028]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], str.got__s_expected__s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp], edi
call dword [0x7df7c4]
sub esp, 4
mov eax, dword [0x7df7b8]
test eax, eax
je 0x4ea9bb
mov dword [esp], 0x800
call eax
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [0x7df7a8]
sub esp, 0x10
mov ebx, eax
mov eax, 0xa7b
call fcn.004e7d80
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.LdrGetDllPath_failed__lx_n
mov dword [esp], eax
call fcn.004e88d0
mov eax, 0xa7c
call fcn.004e7d80
mov eax, dword [ebp - 0x2018]
mov dword [esp + 4], str.unknown_ptr__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004e88d0
lea eax, [ebp - 0x200c]
mov dword [esp + 4], 0x800
mov dword [esp], eax
mov eax, dword [ebp - 0x2024]
call eax
mov eax, 0xa7e
sub esp, 8
call fcn.004e7d80
lea eax, [ebp - 0x200c]
call fcn.004e7de0
mov esi, eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7de0
lea edx, [ebp - 0x200c]
mov ebx, eax
mov eax, dword [ebp - 0x201c]
call fcn.004e7c30
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.got__s_expected__s_n
call fcn.004e88d0
mov eax, dword [ebp - 0x201c]
mov dword [esp], eax
call dword [0x7df7ac]
sub esp, 4
mov dword [esp], 0
call dword [0x7df7b8]
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
cmp dword [eax + 4], 0x5c003f
jne 0x4e9fcf
add eax, 8
lea edx, [ebp - 0x2014]
mov dword [ebp - 0x2020], ecx
call fcn.004e7c30
mov ecx, dword [ebp - 0x2020]
test eax, eax
setne al
movzx eax, al
jmp 0x4e9fd1
mov eax, 0x9f1
call fcn.004e7d80
mov dword [esp], str.LdrGetDllPath_isnt_available_n
call fcn.004e88a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret