Function at 0x40eeaa
Capabilities:
Get common file path
Query environment variable
Set current directory
Set environment variable
Terminate process

Disassembly:
push ebp
lea ebp, [esp - 0x20414]
mov eax, 0x20414
call fcn.004128e0
push 0xffffffffffffffff
push 0x41c601
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4313f4]
xor eax, ebp
mov dword [ebp + 0x20410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x2041c]
xor ebx, ebx
push ebx
push ebx
push 1
mov esi, ecx
push esi
mov eax, str.__thiscall_CXmpLoadLibrary::CXmpLoadLibrary_wchar_t__
push eax
push 0x423d78
push eax
lea ecx, [ebp - 0x2c]
mov dword [esi], ebx
call fcn.00407ab1
mov dword [ebp - 4], ebx
xor eax, eax
mov word [esi + 4], ax
lea eax, [ebp - 0x10]
push eax
call fcn.0040e3cf
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
mov dword [esp], 0x41f4d4
call fcn.0040a725
push edi
lea ecx, [ebp - 0x10]
call fcn.0040a725
xor eax, eax
push 0x206
mov word [ebp + 0x20208], ax
lea eax, [ebp + 0x2020a]
push ebx
push eax
call sub.MSVCR90.dll_memset
push 0x104
push dword [ebp - 0x10]
lea eax, [ebp + 0x20208]
push eax
call dword [sym.imp.MSVCR90.dll_wcsncpy]
add esp, 0x18
push 0x422ac8
lea eax, [ebp + 0x20208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor eax, eax
mov edi, 0xfffe
push edi
mov word [ebp + 0x10000], ax
lea eax, [ebp + 0x10002]
push ebx
push eax
call sub.MSVCR90.dll_memset
xor eax, eax
push edi
mov word [ebp], ax
lea eax, [ebp + 2]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0x18
mov edi, 0x8000
push edi
lea eax, [ebp + 0x10000]
push eax
push str.Path
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp + 0x20208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [ebp + 0x10000]
push eax
lea eax, [ebp + 0x20208]
push eax
push str._s__s
lea eax, [ebp]
push edi
push eax
call dword [sym.imp.MSVCR90.dll__snwprintf]
mov edi, 0x423d18
push edi
call fcn.00402c05
add esp, 0x18
test eax, eax
jne 0x40f047
push 1
lea eax, [ebp]
push eax
push str.___GetEnvironmentVariable_:
lea eax, [ebp + 0x20208]
push eax
push str._AddEnvironmentVariable_:
push esi
push edi
call fcn.00407313
pop ecx
pop ecx
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040a3ec
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040a3ec
mov ecx, eax
call fcn.0040bcf5
lea eax, [ebp]
push eax
push str.Path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [esi + 4]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp + 0x20208]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ebx
push ebx
lea eax, [ebp + 0x20208]
push eax
mov ecx, esi
call fcn.0040db17
test eax, eax
jne 0x40f103
mov ecx, esi
call fcn.0040eb09
test eax, eax
je 0x40f0e2
xor eax, eax
push 0x206
mov word [ebp + 0x20000], ax
lea eax, [ebp + 0x20002]
push ebx
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x20000]
push eax
lea eax, [ebp + 0x20208]
push eax
mov ecx, esi
mov dword [ebp - 0x14], 0x104
call fcn.0040db17
test eax, eax
jne 0x40f103
push ebx
push 0x420310
lea eax, [ebp + 0x20000]
push eax
jmp 0x40f0ed
push ebx
push 0x420310
push 0x423c98
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
call fcn.00402c05
pop ecx
test eax, eax
jne 0x40f142
push 1
push str._start
push dword [ebp - 0x10]
push str.LoadLibrary
push esi
push edi
call fcn.00407313
pop ecx
pop ecx
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040a3ec
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040bcf5
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push edi
mov dword [esi], eax
call fcn.00402c05
pop ecx
test eax, eax
jne 0x40f18c
push 1
push str._end
push dword [ebp - 0x10]
push str.LoadLibrary
push esi
push edi
call fcn.00407313
pop ecx
pop ecx
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040a3ec
mov ecx, eax
call fcn.0040c748
mov ecx, eax
call fcn.0040bcf5
mov byte [ebp - 4], bl
push dword [ebp - 0x10]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00407d23
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x20410]
xor ecx, ebp
call fcn.0041276a
add ebp, 0x20414
leave
ret 4