Function at 0x407950
Capabilities:
Link many functions at runtime
Query environment variable
Read .ini file
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x40eeef
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x83c
push ebx
push esi
push edi
push 0x41791c
lea eax, [esp + 0x10]
push 0x41791e
push eax
call fcn.004019e0
add esp, 0xc
push eax
mov ecx, 0x417920
mov dword [esp + 0x854], 0
call sub.MFC42.DLL_CString::operator_1
or ebx, 0xffffffff
lea ecx, [esp + 0xc]
mov dword [esp + 0x850], ebx
call sub.MFC42.DLL_CString::CString
mov dx, word [0x41791e]
cmp dx, 0x3a8
je 0x407b68
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x28]
push 0x20
push ecx
push edx
stosb byte es:[edi], al
call fcn.0040a460
add esp, 0xc
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
mov edi, 0x4179c0
mov ecx, ebx
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x850], 1
push edx
jne 0x407a92
lea ecx, [esp + 0x28]
call fcn.00408bfa
mov esi, eax
push 0x4166f8
lea eax, [esp + 0x20]
push 0x417988
push eax
mov byte [esp + 0x85c], 2
call sub.MFC42.DLL_operator_1
push esi
lea ecx, [esp + 0x14]
mov bl, 3
push eax
push ecx
mov byte [esp + 0x85c], bl
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x854], 4
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x10]
mov byte [esp + 0x850], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x850], 2
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0x850], 1
lea ecx, [esp + 0x24]
jmp 0x407b30
lea ecx, [esp + 0x24]
call fcn.00408bfa
mov esi, eax
push 0x4179c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x854], 5
call fcn.00408bfa
push 0x4166f8
push eax
lea eax, [esp + 0x24]
mov bl, 6
push eax
mov byte [esp + 0x85c], bl
call sub.MFC42.DLL_operator_1
push esi
lea ecx, [esp + 0x28]
push eax
push ecx
mov byte [esp + 0x85c], 7
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x854], 8
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
mov byte [esp + 0x850], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x850], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x850], 5
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0x850], 1
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0xc]
push edx
call fcn.0040a420
add esp, 4
call fcn.0040a440
mov esi, eax
call sub.MFC42.DLL_AfxGetAppModuleState
lea ecx, [esp + 0xc]
mov dword [eax + 0xc], esi
mov dword [esp + 0x850], 0xffffffff
call sub.MFC42.DLL_CString::CString
or ebx, 0xffffffff
push 0x4166f0
lea eax, [esp + 0x18]
push 0x417988
push eax
call sub.MFC42.DLL_operator_1
mov edi, 0x4179c0
mov ecx, ebx
xor eax, eax
mov dword [esp + 0x850], 9
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x407c46
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_2
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x48]
push 0x800
push ecx
push 0x4166e8
mov byte [esp + 0x85c], 0xa
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea edx, [esp + 0x48]
lea eax, [esp + 0xc]
push edx
push 0x4166e4
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0xc]
push 0x4166e0
call fcn.00408bd6
push 0x417988
lea ecx, [esp + 0x10]
call fcn.00408efa
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x48]
push ecx
push 0x4166e4
push 0x800
push edx
call fcn.00407fa0
add esp, 0x10
lea eax, [esp + 0x48]
push eax
push 0x4166e8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea ecx, [esp + 0xc]
mov byte [esp + 0x850], 9
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x14]
push ecx
call sub.MFC42.DLL_AfxLoadLibrary
test eax, eax
mov dword [0x417bf0], eax
je 0x407f28
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4166d0
push eax
call esi
mov edx, dword [0x417bf0]
push 0x4166c4
push edx
mov dword [0x417bf4], eax
call esi
mov dword [0x417bf8], eax
mov eax, dword [0x417bf0]
push 0x4166b4
push eax
call esi
mov ecx, dword [0x417bf0]
push 0x4166a4
push ecx
mov dword [0x417bfc], eax
call esi
mov edx, dword [0x417bf0]
push 0x416694
push edx
mov dword [0x417c00], eax
call esi
mov dword [0x417c04], eax
mov eax, dword [0x417bf0]
push 0x416684
push eax
call esi
mov ecx, dword [0x417bf0]
push 0x416674
push ecx
mov dword [0x417c08], eax
call esi
mov edx, dword [0x417bf0]
push 0x416668
push edx
mov dword [0x417c0c], eax
call esi
mov dword [0x417c10], eax
mov eax, dword [0x417bf0]
push 0x416658
push eax
call esi
mov ecx, dword [0x417bf0]
push 0x416648
push ecx
mov dword [0x417c14], eax
call esi
mov edx, dword [0x417bf0]
push 0x416634
push edx
mov dword [0x417c18], eax
call esi
mov dword [0x417c1c], eax
mov eax, dword [0x417bf0]
push 0x416624
push eax
call esi
mov ecx, dword [0x417bf0]
push 0x416614
push ecx
mov dword [0x417c20], eax
call esi
mov ecx, dword [0x417bf4]
mov dword [0x417c24], eax
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417bf8]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417bfc]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c00]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c08]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c0c]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c10]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c14]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c1c]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c20]
test ecx, ecx
je 0x407f28
mov ecx, dword [0x417c18]
test ecx, ecx
je 0x407f28
test eax, eax
je 0x407f28
push 0x41625c
lea edx, [esp + 0x24]
push 0x417988
push edx
call sub.MFC42.DLL_operator_1
mov eax, dword [eax]
push eax
push 1
push 0x416254
push 0x41624c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea ecx, [esp + 0x20]
mov dword [0x417994], eax
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [0x417998], 0
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [0x417920]
mov ecx, dword [0x417988]
push eax
push ecx
lea edx, [esp + 0x20]
mov bl, 0xb
push 0x416078
push edx
mov byte [esp + 0x860], bl
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x28]
add esp, 0x10
push eax
call sub.MFC42.DLL_AfxLoadLibrary
test eax, eax
mov dword [0x417998], eax
jne 0x407ee6
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [0x417920]
mov byte [esp + 0x850], 0xc
push ecx
push 0x2714
call fcn.0040a5e0
add esp, 4
lea edx, [esp + 0x14]
push eax
push edx
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x1c]
push 0x30
push eax
push 0
call fcn.004015b0
add esp, 0x18
lea ecx, [esp + 0x10]
mov byte [esp + 0x850], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x850], 9
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x850], 0xffffffff
jmp 0x407f2f
lea ecx, [esp + 0x18]
mov byte [esp + 0x850], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x850], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x83c]
mov dword fs:[0], ecx
add esp, 0x848
ret
mov dword [esp + 0x850], ebx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x848]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x848
ret