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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x416f96
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x20434
call fcn.00414fb0
mov eax, dword [0x4251a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push ebx
push 1
mov esi, ecx
push esi
push str.__thiscall_CXmpLoadLibrary::CXmpLoadLibrary_wchar_t__
push 0x41ce78
xor eax, ebp
push str.__thiscall_CXmpLoadLibrary::CXmpLoadLibrary_wchar_t__
lea ecx, [esp + 0x2c]
mov dword [esp + 0x20458], eax
mov dword [esi], ebx
call fcn.00408360
mov dword [esp + 0x2044c], ebx
lea eax, [esp + 0xc]
push eax
mov word [esi + 4], bx
call fcn.00411250
add esp, 4
mov byte [esp + 0x2044c], 1
push 0x41967c
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push 0x41967c
lea ecx, [esp + 0x14]
call fcn.0040c310
cmp eax, ebx
jge 0x411d31
push eax
call fcn.00401130
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
lea ecx, [esp + 0x14]
call fcn.0040c310
cmp eax, ebx
jge 0x411d4d
push eax
call fcn.00401130
mov word [esp + 0x230], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x232]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0xc]
push 0x104
push ecx
lea edx, [esp + 0x238]
push edx
stosw word es:[edi], ax
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
push 0x41ce6c
lea eax, [esp + 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor eax, eax
mov word [esp + 0x10438], bx
mov ecx, 0x3fff
lea edi, [esp + 0x1043a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [esp + 0x438], bx
xor eax, eax
mov ecx, 0x3fff
lea edi, [esp + 0x43a]
rep stosd dword es:[edi], eax
push 0x8000
lea ecx, [esp + 0x1043c]
push ecx
push str.Path
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [esp + 0x230]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea eax, [esp + 0x10438]
push eax
lea ecx, [esp + 0x234]
push ecx
push str._s__s
lea edx, [esp + 0x444]
push 0x8000
push edx
call dword [sym.imp.MSVCR71.dll__snwprintf]
push 0x41ce10
call fcn.00402d00
add esp, 0x18
test eax, eax
jne 0x411e98
lea eax, [esp + 0x438]
push eax
push str.___GetEnvironmentVariable_:
lea ecx, [esp + 0x238]
push ecx
push str._AddEnvironmentVariable_:
push esi
push 0x41ce10
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
push 1
mov edi, eax
push ebx
mov dword [0x425bbc], ebx
mov edx, dword [edi + 0x240]
push ebx
push edx
push 1
mov ecx, edi
mov dword [edi + 0x248], ebx
call fcn.00407d80
add edi, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esp + 0x438]
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 ecx, [esp + 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
mov word [esp + 0x28], bx
mov ecx, 0x81
lea edi, [esp + 0x2a]
rep stosd dword es:[edi], eax
push 0x104
lea edx, [esp + 0x234]
stosw word es:[edi], ax
push edx
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push str.xlfsio.dll
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_MessageBoxW]
jne 0x411f44
push ebx
push 0x419d1c
push 0x41cd94
push ebx
call edi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str...XLLuaRuntime.dll
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x411f80
push ebx
push 0x419d1c
push 0x41cd3c
push ebx
call edi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str...XLGraphic.dll
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x411fbc
push ebx
push 0x419d1c
push 0x41ccf0
push ebx
call edi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push str...XLUE.dll
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
jne 0x411ff8
push ebx
push 0x419d1c
push 0x41ccb8
push ebx
call edi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi], eax
mov byte [esp + 0x2044c], bl
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esp + 0x2044c], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.00408660
mov ecx, dword [esp + 0x20444]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x2043c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414f09
mov esp, ebp
pop ebp
ret 4