Function at 0x40d7c0
Capabilities:
Check if file exists
Check mutex on windows
Read .ini file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x425c69
push eax
mov dword fs:[0], esp
sub esp, 0x228
push edi
mov edi, ecx
mov eax, 1
add dword [edi + 0xc], eax
cmp dword [edi + 0xc], eax
jbe 0x40d80f
cmp dword [edi + 4], 0
je 0x40d7fe
cmp dword [edi + 8], 0
jne 0x40d9e3
xor eax, eax
pop edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push ebx
push esi
xor ebx, ebx
push 0x208
lea eax, [ebp - 0x232]
push ebx
push eax
mov word [ebp - 0x234], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea esi, [ebp - 0x28]
mov dword [ebp - 4], ebx
call fcn.00402bf0
test eax, eax
je 0x40d8f5
cmp dword [ebp - 0x10], 8
mov eax, dword [ebp - 0x24]
jae 0x40d857
lea eax, [ebp - 0x24]
push 0x104
push eax
lea ecx, [ebp - 0x234]
push 0x104
push ecx
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
add esp, 0x10
push 0x104
lea edx, [ebp - 0x234]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x428c40
lea ecx, [ebp - 0x234]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [ebp - 0x234]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d8f5
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea eax, [ebp - 0x234]
push eax
push ebx
push str.Perf_Enable
push str.public
call esi
lea ecx, [ebp - 0x234]
push ecx
push 0
push str.Perf_Enable_Verbose
push str.public
mov ebx, eax
call esi
test ebx, ebx
je 0x40d8f5
test eax, eax
je 0x40d8f5
mov dword [edi + 0x10], 1
push str.GlobalA4F31C01_A8C8_40ba_BC77_7E8BF6049F58
push 0x100000
xor ebx, ebx
push ebx
push 4
call fcn.0040d680
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [edi + 4], eax
je 0x40d9cf
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [edi + 8], eax
jne 0x40d960
mov edx, dword [edi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x28]
mov dword [edi + 4], ebx
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
pop esi
pop ebx
xor eax, eax
pop edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push str.Global388F581B_10BF_4918_8A80_565FDC0D6D2D
push ebx
call fcn.0040d680
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
cmp esi, ebx
je 0x40d9cf
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [edi + 8]
cmp dword [edi + 4], ebx
je 0x40d98e
cmp dword [edi], 1
je 0x40d9bc
mov dword [edi], 1
mov dword [edi + 4], 0xfffe0
call fcn.004239b0
test al, al
je 0x40d9bc
mov eax, dword [edi + 0xc]
push eax
push str.Init_start_value__d
push 2
push str.D:jenkins_TrunkworkspaceMainline_SourceJob_2qqpcmgr_projFTCommonQMCommonLibDllQMPerfMonQMPerfMon.cpp
call fcn.00423d80
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 1
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret