Function at 0x406450
Capabilities:
Check mutex on windows
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x40d11e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push ebx
push ebp
push 0x80000002
push str.SOFTWARECW_MiniGnet_pppoe2_systemset_
lea eax, [esp + 0x14]
xor ebx, ebx
push str.LogMode
push eax
mov dword [esp + 0x25c], ebx
call fcn.004059b0
mov ecx, dword [esp + 0x1c]
push str.TRUE
push ecx
mov byte [esp + 0x264], 1
call dword [sym.imp.MSVCRT.dll__mbsicmp]
add esp, 0x18
test eax, eax
jne 0x406665
push str.SetupLogError
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ebp, eax
cmp ebp, ebx
je 0x406665
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x406665
mov dl, byte [0x411ac8]
push esi
push edi
mov ecx, 0x3f
lea edi, [esp + 0x14d]
mov byte [esp + 0x14c], dl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14c]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov cl, byte [0x411ac8]
xor eax, eax
mov byte [esp + 0x4c], cl
mov ecx, 0x3f
lea edi, [esp + 0x4d]
lea edx, [esp + 0x14c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x50]
push str._sRegisterError.log
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x34]
push ecx
push str.stat.c
call dword [sym.imp.MSVCRT.dll__stat]
mov edi, dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x14
test eax, eax
jne 0x40657b
cmp dword [esp + 0x3c], 0x100000
jle 0x40657b
lea edx, [esp + 0x4c]
push 0x4115fc
push edx
call edi
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40658c
lea eax, [esp + 0x4c]
push 0x411758
push eax
call edi
add esp, 8
mov esi, eax
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea ecx, [esp + 0x10]
call fcn.0040b86c
mov edx, dword [esp + 0x25c]
push 0x411694
push edx
mov byte [esp + 0x25c], 2
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
jne 0x4065d2
push 0x411694
lea ecx, [esp + 0x14]
call fcn.0040b974
jmp 0x40662c
mov eax, dword [esp + 0x25c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x22]
push eax
mov eax, dword [esp + 0x24]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x26]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x26]
push eax
mov eax, dword [esp + 0x28]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0x2c]
push str._04d__02d__02d__02d:_02d:_02d_t____t_s_n
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x24
cmp esi, ebx
je 0x40664b
mov edx, dword [esp + 0x10]
push edx
push 0x41172c
push esi
call dword [sym.imp.MSVCRT.dll_fprintf]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x10
push ebp
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
lea ecx, [esp + 0x10]
mov byte [esp + 0x254], 1
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
lea ecx, [esp + 0xc]
mov byte [esp + 0x24c], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x254]
mov dword [esp + 0x24c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x244]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x248
ret