Function at 0x405c10
Capabilities:
Get common file path
Get process heap flags
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4077b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push esi
mov esi, ecx
lea ecx, [esp + 4]
mov dword [esp + 0x64], 0
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x70]
mov byte [esp + 0x64], 1
test eax, eax
je 0x405c7c
push 0x104
push 0x104
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::GetBufferSetLength
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0x40a21c
lea ecx, [esp + 8]
call fcn.00406c6c
mov eax, dword [esp + 0x74]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x405cb0
lea ecx, [esp + 0x70]
push ecx
mov ecx, esi
call fcn.004055e0
push eax
lea ecx, [esp + 0x78]
mov byte [esp + 0x68], 2
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x70]
mov byte [esp + 0x64], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x48]
mov byte [esp + 0x64], 3
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x4c]
mov byte [esp + 0x64], 4
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x50]
mov byte [esp + 0x64], 5
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x54]
mov byte [esp + 0x64], 6
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x58]
mov byte [esp + 0x64], 7
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x30]
mov byte [esp + 0x64], 8
call fcn.00406c36
mov edx, dword [esp + 0x74]
lea eax, [esp + 0x30]
push edx
push eax
mov ecx, esi
mov byte [esp + 0x6c], 9
call fcn.004060a0
mov eax, dword [esp + 0x38]
xor esi, esi
test eax, eax
jle 0x405fdb
push ebx
push ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov bl, 0xd
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x18]
mov byte [esp + 0x70], 0xa
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x7c]
mov byte [esp + 0x70], 0xb
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x70], 0xc
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x20]
push esi
push ecx
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], bl
call fcn.00401af0
mov edx, dword [esp + 0x80]
mov ebp, dword [eax]
push edx
push 0x41
push 0x41
lea ecx, [esp + 0x88]
mov byte [esp + 0x7c], 0xe
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x40a458
push 0x40a384
push ebp
call edi
lea ecx, [esp + 0x20]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x44]
call fcn.00401af0
mov ecx, dword [esp + 0x80]
mov ebp, dword [eax]
push ecx
push 0x104
push 0x104
lea ecx, [esp + 0x28]
mov byte [esp + 0x7c], 0xf
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x40a458
push str.SOURCEPATH
push ebp
call edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x28]
push esi
push edx
lea ecx, [esp + 0x44]
call fcn.00401af0
mov ebp, dword [eax]
mov eax, dword [esp + 0x80]
push eax
push 0x104
push 0x104
lea ecx, [esp + 0x24]
mov byte [esp + 0x7c], 0x10
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x40a458
push str.TARGETPATH
push ebp
call edi
mov byte [esp + 0x70], bl
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
push esi
push ecx
lea ecx, [esp + 0x44]
call fcn.00401af0
mov edx, dword [esp + 0x80]
mov ebp, dword [eax]
push edx
push 0x104
push 0x104
lea ecx, [esp + 0x20]
mov byte [esp + 0x7c], 0x11
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x40a458
push str.SERVICE
push ebp
call edi
lea ecx, [esp + 0x2c]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
push 0xffffffffffffffff
lea ecx, [esp + 0x80]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x7c]
call sub.MFC42.DLL_CString::MakeUpper
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea eax, [esp + 0x30]
push esi
push eax
lea ecx, [esp + 0x44]
call fcn.00401af0
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x74], 0x12
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x30]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0x58]
call sub.MFC42.DLL_CString::operator_1
lea edx, [esp + 0x1c]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x5c]
mov byte [esp + 0x74], 0x13
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x34]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0x74], 0x14
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x38]
mov byte [esp + 0x70], bl
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x14]
lea ecx, [esp + 0x60]
push edx
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x78]
lea edx, [esp + 0x50]
push edx
push 1
mov eax, dword [ecx + 8]
push eax
call fcn.00404250
lea ecx, [esp + 0x14]
mov byte [esp + 0x70], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x7c]
mov byte [esp + 0x70], 0xb
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x70], 0xa
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x70], 9
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x44]
inc esi
cmp esi, eax
jl 0x405d3c
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
mov eax, dword [ecx + 4]
test eax, eax
jne 0x405fea
xor esi, esi
jmp 0x406002
mov ecx, dword [ecx + 8]
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov esi, edx
lea ecx, [esp + 0x30]
mov byte [esp + 0x64], 8
call sub.MFC42.DLL_CStringArray::CStringArray
lea ecx, [esp + 0x58]
mov byte [esp + 0x64], 0x19
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54]
mov byte [esp + 0x64], 0x18
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x50]
mov byte [esp + 0x64], 0x17
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x4c]
mov byte [esp + 0x64], 0x16
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x48]
mov byte [esp + 0x64], 0x15
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x44]
mov byte [esp + 0x64], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 4]
mov byte [esp + 0x64], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x74]
mov dword [esp + 0x64], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x5c]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x64
ret 0xc