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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x708
mov eax, dword [0x4f92a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
xor ebx, ebx
push ebx
mov dword [ebp - 0x708], eax
mov dword [ebp - 0x6fc], ecx
call dword [sym.imp.ole32.dll_CoInitialize]
cmp dword [0x4fd894], ebx
jne 0x40651d
push 0x24d0
call fcn.0042ec9c
add esp, 4
cmp eax, ebx
je 0x406517
mov esi, eax
call fcn.00411220
mov dword [0x4fd894], eax
jmp 0x40651d
mov dword [0x4fd894], ebx
push str.GameBuffInterUninstallMutex
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4068e1
push edi
xor edi, edi
jmp 0x406543
xor ebx, ebx
cmp dword [0x4fd894], ebx
jne 0x406570
push 0x24d0
call fcn.0042ec9c
add esp, 4
cmp eax, ebx
je 0x40656a
mov esi, eax
call fcn.00411220
mov dword [0x4fd894], eax
jmp 0x406570
mov dword [0x4fd894], ebx
call fcn.004115b0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x4fd894], ebx
jne 0x4065aa
push 0x24d0
call fcn.0042ec9c
add esp, 4
cmp eax, ebx
je 0x4065a4
mov esi, eax
call fcn.00411220
mov dword [0x4fd894], eax
jmp 0x4065aa
mov dword [0x4fd894], ebx
mov ebx, 0x4d3b9c
call fcn.00411680
test eax, eax
je 0x4065be
inc edi
cmp edi, 0xa
jb 0x406541
mov eax, dword [0x4fd894]
xor edi, edi
cmp eax, edi
jne 0x4065ea
push 0x24d0
call fcn.0042ec9c
add esp, 4
cmp eax, edi
je 0x4065e3
mov esi, eax
call fcn.00411220
jmp 0x4065e5
xor eax, eax
mov dword [0x4fd894], eax
mov edx, dword [ebp - 0x6fc]
mov ecx, eax
call fcn.004113a0
mov esi, dword [0x4fd898]
cmp esi, edi
jne 0x40664f
push 0x18
call fcn.0042ec9c
mov esi, eax
add esp, 4
cmp esi, edi
je 0x406647
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov edx, dword [0x4fa44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fa44c
call eax
add eax, 0x10
mov dword [esi + 0x10], eax
mov edx, dword [0x4fa44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fa44c
call eax
add eax, 0x10
mov dword [esi + 0x14], eax
jmp 0x406649
xor esi, esi
mov dword [0x4fd898], esi
mov edx, dword [0x4fa44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fa44c
mov dword [ebp - 0x704], esi
call eax
mov ecx, str._replace
lea esi, [eax + 0x10]
mov dword [ebp - 0x6fc], esi
test ecx, 0xffff0000
jne 0x406699
mov edx, ecx
movzx edi, dx
call fcn.004030b0
test eax, eax
je 0x4066c9
push eax
mov eax, edi
lea edi, [ebp - 0x6fc]
call fcn.00403420
jmp 0x4066c3
mov eax, str._replace
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4066a1
sub eax, edx
sar eax, 1
push str._replace
lea ecx, [ebp - 0x6fc]
push ecx
mov ebx, eax
call fcn.004034c0
mov esi, dword [ebp - 0x6fc]
mov ebx, dword [ebp - 0x704]
lea eax, [ebp - 0x6fc]
call fcn.00404890
add esi, 0xfffffff0
mov ebx, eax
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4066f8
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
test ebx, ebx
je 0x40676c
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x20a]
push edx
mov word [ebp - 0x20c], cx
call fcn.00438230
add esp, 0xc
push 0
push 0x1c
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x20c]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x406736
mov edi, eax
mov ecx, 0xc
mov esi, str.GameBuff_appconfig.dat
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x20c]
push ecx
push 0x4d3be8
push 0x4d3bec
push str.generate
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, dword [0x4fd898]
xor edi, edi
cmp esi, edi
jne 0x4067c6
push 0x18
call fcn.0042ec9c
mov esi, eax
add esp, 4
cmp esi, edi
je 0x4067be
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov edx, dword [0x4fa44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fa44c
call eax
add eax, 0x10
mov dword [esi + 0x10], eax
mov edx, dword [0x4fa44c]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fa44c
call eax
add eax, 0x10
mov dword [esi + 0x14], eax
jmp 0x4067c0
xor esi, esi
mov dword [0x4fd898], esi
mov eax, esi
call fcn.00404b70
test eax, eax
jne 0x40689e
mov eax, dword [0x4fd894]
cmp eax, edi
jne 0x4067ff
push 0x24d0
call fcn.0042ec9c
add esp, 4
cmp eax, edi
je 0x4067f8
mov esi, eax
call fcn.00411220
jmp 0x4067fa
xor eax, eax
mov dword [0x4fd894], eax
add eax, 0xa28
push str.silent
push eax
call fcn.0043054e
add esp, 8
test eax, eax
je 0x40689e
mov ecx, dword [ebp - 0x708]
push ecx
call sym.Setup.exe_public:_static_void___cdecl_DuiLib::CPaintManagerUI::SetInstance_struct_HINSTANCE____
add esp, 4
lea esi, [ebp - 0x6f8]
call fcn.004069b0
push edi
push edi
push SysReAllocString
push SysReAllocString
push SysReAllocString
push SysReAllocString
push 0x60000
push 0x10cf0000
push 0x4d3b50
push edi
mov ecx, esi
call sym.Setup.exe_protected_virtual:_int___thiscall_DuiLib::WindowImplBase::CreateMainFrame_struct_HWND_____wchar_t_const___unsigned_long_int__unsigned_long_int__int__int__int__int__struct_HMENU_____bool_
test eax, eax
je 0x40687c
mov ecx, esi
call sym.Setup.exe_public:_void___thiscall_DuiLib::CWindowWnd::CenterWindow_void_
push 1
mov ecx, esi
call sym.Setup.exe_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::operator_struct_HWND____void_const
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call sym.Setup.exe_public:_static_void___cdecl_DuiLib::CPaintManagerUI::MessageLoop_void_
call sym.Setup.exe_public:_static_void___cdecl_DuiLib::CPaintManagerUI::Term_void_
lea eax, [ebp - 0x6f8]
call fcn.00407a20
lea esi, [ebp - 0x6f8]
call fcn.00406ab0
jmp 0x4068a9
lea edi, [ebp - 0x6fd]
call fcn.0040a660
mov eax, dword [0x4fd894]
test eax, eax
jne 0x4068d3
push 0x24d0
call fcn.0042ec9c
add esp, 4
test eax, eax
je 0x4068cc
mov esi, eax
call fcn.00411220
jmp 0x4068ce
xor eax, eax
mov dword [0x4fd894], eax
mov edi, eax
call fcn.0040fed0
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0042e257
mov esp, ebp
pop ebp
ret 0x10