Function at 0x407650
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x452c02
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x465100]
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
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x264]
push ecx
xor edi, edi
push 0x1a
push edi
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x264], edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov eax, dword [ebp - 0x264]
lea edx, [ebp - 0x218]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov edx, dword [0x4660e4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4660e4
call eax
add eax, 0x10
mov dword [ebp - 0x254], eax
push ecx
mov ecx, esp
mov dword [ebp - 4], edi
mov dword [ebp - 0x260], esp
push ecx
mov ecx, str.TencentQQSTempBackupDLTmp
lea esi, [ebp - 0x254]
call fcn.004086e0
push ecx
mov byte [ebp - 4], 1
mov edx, esp
mov dword [ebp - 0x25c], esp
push edx
lea ecx, [ebp - 0x218]
call fcn.004086e0
mov ecx, esi
mov byte [ebp - 4], 0
call fcn.0041c260
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, dword [ebp - 0x254]
add esp, 8
cmp dword [ebp + 8], edi
je 0x40772f
push ebx
call esi
test eax, eax
je 0x40772f
mov ecx, ebx
call fcn.0041c3e0
push ebx
call esi
push edi
test eax, eax
jne 0x40792b
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, edi
jne 0x40780f
mov eax, 7
xor ecx, ecx
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], edi
mov word [ebp - 0x234], cx
mov byte [ebp - 4], 2
mov dword [ebp - 0x23c], eax
xor edx, edx
push 0xd
mov eax, str.qq_setup_temp
lea esi, [ebp - 0x250]
mov dword [ebp - 0x240], edi
mov word [ebp - 0x250], dx
call fcn.004017a0
lea eax, [ebp - 0x234]
push eax
mov ecx, esi
push ecx
mov byte [ebp - 4], 3
call fcn.00401040
mov esi, 8
add esp, 8
mov byte [ebp - 4], 2
mov bl, al
cmp dword [ebp - 0x23c], esi
jb 0x4077c7
mov edx, dword [ebp - 0x250]
push edx
call fcn.0043bc47
add esp, 4
test bl, bl
je 0x40786b
mov edx, dword [ebp - 0x234]
cmp dword [ebp - 0x220], esi
jae 0x4077e3
lea edx, [ebp - 0x234]
lea edi, [ebp - 0x254]
call fcn.00408810
mov byte [ebp - 4], 0
cmp dword [ebp - 0x220], esi
jb 0x407809
mov eax, dword [ebp - 0x234]
push eax
call fcn.0043bc47
add esp, 4
mov ebx, dword [ebp - 0x254]
mov ecx, dword [ebp - 0x258]
mov esi, dword [ecx]
lea edi, [ebx - 0x10]
sub esi, 0x10
cmp edi, esi
je 0x407a7c
cmp dword [esi + 0xc], 0
jl 0x407a72
mov eax, dword [edi]
cmp eax, dword [esi]
jne 0x407a72
mov eax, edi
call fcn.00408990
mov ebx, eax
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40785b
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x258]
add ebx, 0x10
mov dword [ecx], ebx
jmp 0x407a7c
lea ecx, [ebp - 0x258]
push ecx
push 0x48
push str.R:TempViewMiscSetup3BackupDownloaderBackupDownload.cpp
mov edx, 0x457798
mov ebx, str.RCreateWindowsDirTemp
mov edi, 3
mov ecx, str._anonymous_namespace::GetTempDir
mov dword [ebp - 0x258], 0x4577dc
call fcn.00407520
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x254]
push eax
push esi
push str.create_folder_:_s_error__errcode:_lu_n
push str._anonymous_namespace::GetTempDir
mov ebx, str.GetTempDir
lea ecx, [edi + 0x48]
mov edx, str.R:TempViewMiscSetup3BackupDownloaderBackupDownload.cpp
call fcn.00408be0
add esp, 0x10
cmp dword [ebp - 0x220], 8
jb 0x4078e4
mov edx, dword [ebp - 0x234]
push edx
call fcn.0043bc47
add esp, 4
xor eax, eax
mov word [ebp - 0x234], ax
lea eax, [esi - 0x10]
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407924
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x407aa1
push 0x2000000
push 3
push edi
mov esi, 7
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x260], eax
cmp eax, 0xffffffff
jne 0x407a66
xor ecx, ecx
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x240], edi
mov word [ebp - 0x250], cx
mov byte [ebp - 4], 4
mov dword [ebp - 0x220], esi
xor edx, edx
push 0xd
mov eax, str.qq_setup_temp
lea esi, [ebp - 0x234]
mov dword [ebp - 0x224], edi
mov word [ebp - 0x234], dx
call fcn.004017a0
lea eax, [ebp - 0x250]
push eax
mov ecx, esi
push ecx
mov byte [ebp - 4], 5
call fcn.00401040
mov esi, 8
add esp, 8
mov byte [ebp - 4], 4
mov bl, al
cmp dword [ebp - 0x220], esi
jb 0x4079c9
mov edx, dword [ebp - 0x234]
push edx
call fcn.0043bc47
add esp, 4
test bl, bl
je 0x4079ee
mov edx, dword [ebp - 0x250]
cmp dword [ebp - 0x23c], esi
jae 0x4079e1
lea edx, [ebp - 0x250]
lea edi, [ebp - 0x254]
call fcn.00408810
jmp 0x407a22
lea eax, [ebp - 0x25c]
push eax
push 0x60
push str.R:TempViewMiscSetup3BackupDownloaderBackupDownload.cpp
mov edx, 0x457798
mov ebx, str.RCreateWindowsDirTemp
mov edi, 3
mov ecx, str._anonymous_namespace::GetTempDir
mov dword [ebp - 0x25c], 0x4577dc
call fcn.00407520
add esp, 0xc
mov byte [ebp - 4], 0
cmp dword [ebp - 0x23c], esi
jb 0x407a3d
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.0043bc47
add esp, 4
mov ebx, dword [ebp - 0x254]
mov eax, dword [ebp - 0x260]
xor edx, edx
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x240], 0
mov word [ebp - 0x250], dx
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40780f
push ebx
mov ebx, dword [ebx - 0xc]
push ecx
call fcn.004088e0
mov dword [ebp - 4], 0xffffffff
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x407a9c
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, 1
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.0043b634
mov esp, ebp
pop ebp
ret