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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455a42
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x468100]
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 [0x4690e4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4690e4
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.004086c0
push ecx
mov byte [ebp - 4], 1
mov edx, esp
mov dword [ebp - 0x25c], esp
push edx
lea ecx, [ebp - 0x218]
call fcn.004086c0
mov ecx, esi
mov byte [ebp - 4], 0
call fcn.0041ebd0
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, dword [ebp - 0x254]
add esp, 8
cmp dword [ebp + 8], edi
je 0x40770f
push ebx
call esi
test eax, eax
je 0x40770f
mov ecx, ebx
call fcn.0041ed50
push ebx
call esi
push edi
test eax, eax
jne 0x40790b
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, edi
jne 0x4077ef
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 0x4077a7
mov edx, dword [ebp - 0x250]
push edx
call fcn.0043e7d7
add esp, 4
test bl, bl
je 0x40784b
mov edx, dword [ebp - 0x234]
cmp dword [ebp - 0x220], esi
jae 0x4077c3
lea edx, [ebp - 0x234]
lea edi, [ebp - 0x254]
call fcn.004087d0
mov byte [ebp - 4], 0
cmp dword [ebp - 0x220], esi
jb 0x4077e9
mov eax, dword [ebp - 0x234]
push eax
call fcn.0043e7d7
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 0x407a5c
cmp dword [esi + 0xc], 0
jl 0x407a52
mov eax, dword [edi]
cmp eax, dword [esi]
jne 0x407a52
mov eax, edi
call fcn.00408970
mov ebx, eax
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40783b
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 0x407a5c
lea ecx, [ebp - 0x258]
push ecx
push 0x48
push str.R:TempViewMiscSetup3BackupDownloaderBackupDownload.cpp
mov edx, 0x45a7a8
mov ebx, str.RCreateWindowsDirTemp
mov edi, 3
mov ecx, str._anonymous_namespace::GetTempDir
mov dword [ebp - 0x258], 0x45a7ec
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.0040e5f0
add esp, 0x10
cmp dword [ebp - 0x220], 8
jb 0x4078c4
mov edx, dword [ebp - 0x234]
push edx
call fcn.0043e7d7
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 0x407904
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x407a81
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 0x407a46
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 0x4079a9
mov edx, dword [ebp - 0x234]
push edx
call fcn.0043e7d7
add esp, 4
test bl, bl
je 0x4079ce
mov edx, dword [ebp - 0x250]
cmp dword [ebp - 0x23c], esi
jae 0x4079c1
lea edx, [ebp - 0x250]
lea edi, [ebp - 0x254]
call fcn.004087d0
jmp 0x407a02
lea eax, [ebp - 0x25c]
push eax
push 0x60
push str.R:TempViewMiscSetup3BackupDownloaderBackupDownload.cpp
mov edx, 0x45a7a8
mov ebx, str.RCreateWindowsDirTemp
mov edi, 3
mov ecx, str._anonymous_namespace::GetTempDir
mov dword [ebp - 0x25c], 0x45a7ec
call fcn.00407520
add esp, 0xc
mov byte [ebp - 4], 0
cmp dword [ebp - 0x23c], esi
jb 0x407a1d
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.0043e7d7
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 0x4077ef
push ebx
mov ebx, dword [ebx - 0xc]
push ecx
call fcn.004088c0
mov dword [ebp - 4], 0xffffffff
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x407a7c
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.0043e1c4
mov esp, ebp
pop ebp
ret