Function at 0x4039d0
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 0x4072a9
push eax
mov dword fs:[0], esp
sub esp, 0x228
push esi
mov esi, ecx
mov eax, 1
add dword [esi + 0xc], eax
cmp dword [esi + 0xc], eax
jbe 0x403a1f
cmp dword [esi + 4], 0
je 0x403a0e
cmp dword [esi + 8], 0
jne 0x403bf4
xor eax, eax
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push ebx
push edi
xor edi, edi
push 0x208
lea eax, [ebp - 0x232]
push edi
push eax
mov word [ebp - 0x234], di
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 ecx, [ebp - 0x28]
push ecx
mov dword [ebp - 4], edi
call fcn.00402650
add esp, 4
test eax, eax
je 0x403b06
push 0x104
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP80.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea edx, [ebp - 0x234]
push 0x104
push edx
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
add esp, 0x10
push 0x104
lea eax, [ebp - 0x234]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x234]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.perfLogConf.ini
lea edx, [ebp - 0x234]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403b06
lea ecx, [ebp - 0x234]
push ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push str.Perf_Enable
push str.public
call edi
lea edx, [ebp - 0x234]
push edx
push 0
push str.Perf_Enable_Verbose
push str.public
mov ebx, eax
call edi
test ebx, ebx
je 0x403b06
test eax, eax
je 0x403b06
mov dword [esi + 0x10], 1
push str.GlobalA4F31C01_A8C8_40ba_BC77_7E8BF6049F58
push 0x100000
xor ebx, ebx
push ebx
push 4
call fcn.00403890
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [esi + 4], eax
je 0x403be0
push ebx
push ebx
push ebx
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x403b71
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x28]
mov dword [esi + 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 edi
pop ebx
xor eax, eax
pop esi
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.00403890
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
cmp edi, ebx
je 0x403be0
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [esi + 8]
cmp dword [esi + 4], ebx
je 0x403b9f
cmp dword [esi], 1
je 0x403bcd
mov dword [esi], 1
mov dword [esi + 4], 0xfffe0
call fcn.004065c0
test al, al
je 0x403bcd
mov ecx, dword [esi + 0xc]
push ecx
push str.Init_start_value__d
push 2
push str.D:jenkins_Trunkworkspace10.9Patch_SourceJobqqpcmgr_projFTCommonQMCommonLibDllQMPerfMonQMPerfMon.cpp
call fcn.00406990
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
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 edi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret