Function at 0x40f3a0
Capabilities:
Check if file exists
Check mutex on windows
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5746e0
mov eax, dword fs:[0]
push eax
mov eax, 0x311c
call fcn.0054a430
mov eax, dword [0x5dbcc8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x3128]
mov esi, ecx
push eax
mov dword [ebp - 0x3120], esi
mov dword [ebp - 0x3128], 8
mov dword [ebp - 0x3124], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.00446b97
xor ebx, ebx
push ebx
call fcn.004476b0
push 0xc
call fcn.00444c55
add esp, 8
mov dword [ebp - 0x311c], eax
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x40f42a
mov ecx, eax
call fcn.00447e5f
jmp 0x40f42c
xor eax, eax
mov dword [ebp - 4], 0xffffffff
cmp eax, ebx
je 0x40f442
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 4]
push 1
call eax
push 0x5a565c
mov ecx, esi
call fcn.00447fee
push 0x5a567c
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0xb8], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40f4e9
push 5
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, dword [sym.imp.USER32.dll_GetWindow]
push eax
call edi
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
mov esi, eax
push esi
call ebx
test eax, eax
je 0x40fa16
push 0x5a567c
push esi
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x40f4b6
push 2
push esi
call edi
mov esi, eax
push esi
call ebx
test eax, eax
jne 0x40f493
jmp 0x40fa16
push esi
call dword [sym.imp.USER32.dll_IsIconic]
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
test eax, eax
je 0x40f4cc
push 9
push esi
call ebx
mov edi, dword [sym.imp.USER32.dll_SetForegroundWindow]
push esi
call edi
push esi
call dword [sym.imp.USER32.dll_GetLastActivePopup]
push eax
call edi
push 5
push esi
call ebx
jmp 0x40fa16
push 0x27ff
lea ecx, [ebp - 0x300f]
push ebx
push ecx
mov byte [ebp - 0x3010], 0
call fcn.00549e40
push 0x3ff
lea edx, [ebp - 0x40f]
push ebx
push edx
mov byte [ebp - 0x410], 0
call fcn.00549e40
push 0x3ff
lea eax, [ebp - 0x80f]
push ebx
push eax
mov byte [ebp - 0x810], 0
call fcn.00549e40
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
add esp, 0x24
push 1
push 0x1c
lea ecx, [ebp - 0x410]
push ecx
push ebx
call esi
push 1
push 0x23
lea edx, [ebp - 0x810]
push edx
push ebx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push str.1905Cache1
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f572
xor eax, eax
jmp 0x40f58c
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache1
push eax
call fcn.0040c9b0
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x3010]
push str._s_s
push ecx
call fcn.00546876
add esp, 0x10
push ebx
lea edx, [ebp - 0x3010]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x5a52f8
call edi
inc eax
cmp eax, 0x3fffffff
jg 0x40f5e1
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push 0x5a52f8
push eax
call fcn.0040c9b0
mov ebx, eax
push str.1905Cache1
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f5f4
xor eax, eax
jmp 0x40f60e
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache1
push eax
call fcn.0040c9b0
push ebx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x3010]
push str._s_s_s
push ecx
call fcn.00546876
add esp, 0x14
push 0
lea edx, [ebp - 0x3010]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0x5a56b0
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f64d
xor ebx, ebx
jmp 0x40f669
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push 0x5a56b0
push eax
call fcn.0040c9b0
mov ebx, eax
push str.1905Cache1
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f67c
xor eax, eax
jmp 0x40f696
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache1
push eax
call fcn.0040c9b0
push ebx
push eax
lea eax, [ebp - 0x410]
push eax
lea ecx, [ebp - 0x3010]
push str._s_s_s
push ecx
call fcn.00546876
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
add esp, 0x14
push 0
lea edx, [ebp - 0x3010]
push edx
call ebx
push str.1905Cache2
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f6d7
xor eax, eax
jmp 0x40f6f1
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache2
push eax
call fcn.0040c9b0
push eax
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x3010]
push str._s_s
push ecx
call fcn.00546876
add esp, 0x10
push 0
lea edx, [ebp - 0x3010]
push edx
call ebx
push 0x5a56d0
lea ecx, [ebp - 0x311c]
call fcn.0040cf20
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x311c]
mov ebx, eax
test eax, eax
je 0x40f760
push eax
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f74a
xor eax, eax
jmp 0x40f760
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.0040c9b0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push str.1905Down
test eax, eax
jne 0x40f7b4
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f78b
xor eax, eax
push eax
push str.C:_s
lea eax, [ebp - 0x3010]
push eax
jmp 0x40f7e9
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Down
push eax
call fcn.0040c9b0
push eax
push str.C:_s
lea eax, [ebp - 0x3010]
push eax
jmp 0x40f7e9
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f7c2
xor eax, eax
jmp 0x40f7dc
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Down
push eax
call fcn.0040c9b0
push eax
push str.D:_s
lea ecx, [ebp - 0x3010]
push ecx
call fcn.00546876
add esp, 0xc
push 0
lea edx, [ebp - 0x3010]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push str.1905Cache2
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f813
xor eax, eax
jmp 0x40f82d
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache2
push eax
call fcn.0040c9b0
push str.LocalData.db
push eax
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x3010]
push str._s_s_s
push ecx
call fcn.00546876
push 0
push 0
mov esi, str.create_table_MapTable_Key_nvarchar_32__primary_key_Value_nvarchar_32__
lea ecx, [ebp - 0x3010]
call fcn.00409aa0
push 0
push 0
mov esi, str.create_table_UserTable_Username_nvarchar_32__primary_key_Password_nvarchar_32__
lea ecx, [ebp - 0x3010]
call fcn.00409aa0
push 0
push 0
mov esi, str.create_table_LookedTableNew___id_INTEGER_PRIMARY_KEY_Type_nvarchar_32__Lookedtime_nvarchar_32__FilmID_nvarchar_32__Title_nvarchar_64__AddTime_date_ImgAddr_nvarchar_64___TotalTimes_nvarchar_32___EposideID_nvarchar_32___ThirdID_nvarchar_32___EposideNum_nvarchar_32___FilmType_nvarchar_32__
lea ecx, [ebp - 0x3010]
call fcn.00409aa0
push 0
push 0
mov esi, str.create_table_LoadTable___id_INTEGER_PRIMARY_KEY_Type_nvarchar_32__FilmID_nvarchar_32__ContentID_nvarchar_32___Title_nvarchar_64__ImgAddr_nvarchar_64___TotalCap_nvarchar_32___LoadCap_nvarchar_32___SavePath_nvarchar_255___Actor_nvarchar_255___LoadFlag_nvarchar_32__
lea ecx, [ebp - 0x3010]
call fcn.00409aa0
push 0
push 0
mov esi, str.create_table_CollectTable___id_INTEGER_PRIMARY_KEY_Type_nvarchar_32__FilmID_nvarchar_32__Title_nvarchar_64___OnlyID_nvarchar_32___ContentID_nvarchar_32___Director_nvarchar_255___Grade_nvarchar_32___DDLike_nvarchar_32___DDLooked_nvarchar_32___PlayTimes_nvarchar_32___Description_nvarchar_1024___Actor_nvarchar_255___ImgAddr_nvarchar_64__
lea ecx, [ebp - 0x3010]
call fcn.00409aa0
add esp, 0x3c
push str.1905Cache1
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f8c5
xor eax, eax
jmp 0x40f8df
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.1905Cache1
push eax
call fcn.0040c9b0
push eax
lea edx, [ebp - 0x410]
push edx
lea eax, [ebp - 0x3010]
push str._s_s
push eax
call fcn.00546876
add esp, 0x10
push str.Client
call edi
inc eax
cmp eax, 0x3fffffff
jle 0x40f90e
xor eax, eax
jmp 0x40f928
lea esi, [eax + eax]
mov eax, esi
call fcn.0054bbf0
mov eax, esp
push 3
push esi
push str.Client
push eax
call fcn.0040c9b0
mov esi, dword [ebp - 0x3120]
lea edi, [esi + 0xbc]
lea ecx, [ebp - 0x3010]
call fcn.0040fe30
mov ecx, dword [esi + 0x44]
push ecx
call dword [sym.imp.DuiLib_u.dll_public:_static_void___cdecl_DuiLib::CPaintManagerUI::SetInstance_struct_HINSTANCE____]
lea edx, [ebp - 0x3118]
push edx
call dword [sym.imp.DuiLib_u.dll_public:_static_class_DuiLib::CDuiString___cdecl_DuiLib::CPaintManagerUI::GetInstancePath_void_]
add esp, 8
push str.skindefault
lea ecx, [ebp - 0x3094]
push ecx
mov ecx, eax
mov byte [ebp - 4], 2
call dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CDuiString___thiscall_DuiLib::CDuiString::operator_wchar_t_const__]
mov ecx, eax
mov byte [ebp - 4], 3
call dword [sym.imp.DuiLib_u.dll_public:_wchar_t_const____thiscall_DuiLib::CDuiString::operator_wchar_t_const__void_const]
push eax
call dword [sym.imp.DuiLib_u.dll_public:_static_void___cdecl_DuiLib::CPaintManagerUI::SetResourcePath_wchar_t_const__]
mov byte [ebp - 4], 2
mov esi, dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
add esp, 4
lea ecx, [ebp - 0x3094]
call esi
lea ecx, [ebp - 0x3118]
mov byte [ebp - 4], 1
call esi
push 0
push SysReAllocString
push SysReAllocString
push SysReAllocString
push SysReAllocString
push 0x100
push 0x10cf0000
push 0x5a5c64
push 0
mov ecx, 0x5e5968
call dword [sym.imp.DuiLib_u.dll_public:_struct_HWND______thiscall_DuiLib::CWindowWnd::Create_struct_HWND_____wchar_t_const___unsigned_long_int__unsigned_long_int__int__int__int__int__struct_HMENU____]
mov ecx, 0x5e5968
call dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CWindowWnd::CenterWindow_void_]
mov ecx, 0x5e5968
call dword [sym.imp.DuiLib_u.dll_public:_unsigned_int___thiscall_DuiLib::CWindowWnd::ShowModal_void_]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x311c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fa16
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
lea esp, [ebp - 0x3138]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00545eb2
mov esp, ebp
pop ebp
ret