Function at 0x411250
Capabilities:
Read .ini file
Set environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x416ea8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x430
mov eax, dword [0x4251a4]
xor eax, ebp
push ebx
xor ebx, ebx
mov dword [esp + 0x42c], eax
mov eax, dword [ebp + 8]
push esi
mov dword [esp + 0x10], ebx
cmp word [0x426308], bx
push edi
mov dword [esp + 0x10], eax
jne 0x411345
xor esi, esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x444], 1
lea ecx, [esp + 0x18]
push str.CoreProgram_
push ecx
call fcn.0040fa50
add esp, 8
mov edi, eax
mov byte [esp + 0x444], 2
cmp dword [edi], ebx
je 0x411307
push ebx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [edi]
cmp eax, ebx
jne 0x4112de
xor eax, eax
jmp 0x4112ef
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov edx, dword [edi]
push eax
push edx
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov esi, eax
mov dword [esp + 0x1c], esi
cmp dword [edi], ebx
je 0x411307
cmp eax, ebx
jne 0x411307
push 0x8007000e
call fcn.00401130
mov byte [esp + 0x444], 1
mov eax, dword [esp + 0x18]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call edi
cmp esi, ebx
jne 0x411324
xor eax, eax
jmp 0x41132b
push esi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
push eax
push esi
push 0x426308
call dword [sym.imp.MSVCR71.dll_wcsncpy]
add esp, 0xc
mov byte [esp + 0x444], bl
push esi
call edi
xor eax, eax
mov word [esp + 0x20], bx
mov ecx, 0x81
lea edi, [esp + 0x22]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [esp + 0x228], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x22a]
rep stosd dword es:[edi], eax
push 0x104
lea ecx, [esp + 0x24]
push ecx
push ebx
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str...xmp.ini
lea edx, [esp + 0x24]
push edx
call esi
lea eax, [esp + 0x20]
push eax
push 0x104
lea ecx, [esp + 0x230]
push ecx
push 0x426308
push str.bindir
push 0x41c978
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x228]
push edx
lea eax, [esp + 0x24]
push eax
call esi
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 0x104
lea edx, [esp + 0x24]
push edx
push 0x426308
call dword [sym.imp.MSVCR71.dll_wcsncpy]
push str.XMP::GetBinDir
call fcn.00402d00
add esp, 0x10
test eax, eax
jne 0x41144f
push 0x426308
push str.Path_:
push ebx
push str.XMP::GetBinDir
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
push 1
mov esi, eax
push ebx
mov dword [0x425bbc], ebx
mov eax, dword [esi + 0x240]
push ebx
push eax
push 1
mov ecx, esi
mov dword [esi + 0x248], ebx
call fcn.00407d80
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x426308
push str.bindir
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x426308
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
cmp eax, ebx
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
jne 0x41147e
push 0x8007000e
call fcn.00401130
mov dword [esp + 0x14], 1
mov eax, ecx
mov ecx, dword [esp + 0x43c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x434]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414f09
mov esp, ebp
pop ebp
ret