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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x459268
mov eax, dword fs:[0]
push eax
sub esp, 0x464
mov eax, dword [0x471080]
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 dword [ebp - 0x464], edx
mov edi, ecx
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x46c], 0
push eax
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x46c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
call fcn.00407b80
mov ecx, eax
test ecx, ecx
je 0x408563
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x460], eax
push ecx
mov dword [ebp - 4], 0
lea ebx, [ebp - 0x460]
mov esi, esp
mov dword [ebp - 0x470], esp
mov dword [ebp - 0x468], esi
call fcn.00407b80
mov ecx, eax
test ecx, ecx
je 0x40856d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
push str.TencentQQSTempBackupDLTmp
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00409440
test al, al
jne 0x407ff8
push 0x1c
push str.TencentQQSTempBackupDLTmp
mov ecx, esi
call fcn.00409600
push ecx
mov byte [ebp - 4], 2
mov esi, esp
mov dword [ebp - 0x468], esi
call fcn.00407b80
mov ecx, eax
test ecx, ecx
je 0x408577
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 3
push eax
mov ecx, esi
call fcn.00409440
test al, al
jne 0x40805e
lea edx, [ebp - 0x218]
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x408040
sub edx, ecx
lea eax, [ebp - 0x218]
sar edx, 1
mov ecx, esi
push edx
push eax
call fcn.00409600
mov byte [ebp - 4], 2
mov ecx, ebx
mov byte [ebp - 4], 0
call fcn.004205b0
mov esi, dword [ebp - 0x460]
add esp, 8
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x408123
push esi
call edi
test eax, eax
je 0x408123
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0043fa60
push 0
push esi
push str._s_c
push 0x208
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0040d7a0
mov eax, 0x14
mov dword [ebp - 0x44c], 0
mov word [ebp - 0x448], ax
add esp, 0x24
lea eax, [ebp - 0x420]
mov dword [ebp - 0x43e], 0
mov dword [ebp - 0x450], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x458]
movlpd qword [ebp - 0x446], xmm0
push eax
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
call ebx
push esi
call edi
push 0
test eax, eax
jne 0x408320
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4084c3
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x454]
push 0xd
push 0x463000
mov dword [ebp - 0x444], eax
mov dword [ebp - 0x440], 7
mov word [ebp - 0x454], ax
call fcn.004017c0
lea edx, [ebp - 0x438]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x454]
call fcn.004011e0
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x440]
mov byte [ebp - 0x459], al
cmp edx, 8
jb 0x4081e8
mov ecx, dword [ebp - 0x454]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4081d8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408581
push edx
push ecx
call fcn.0043dbf3
mov al, byte [ebp - 0x459]
add esp, 8
test al, al
je 0x40827d
cmp dword [ebp - 0x424], 8
lea edx, [ebp - 0x438]
jb 0x40820d
mov edx, dword [ebp - 0x438]
test edx, edx
jne 0x40820d
xor ecx, ecx
jmp 0x408221
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408212
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x460]
call fcn.00409600
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x424]
cmp edx, 8
jb 0x408272
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408268
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408586
push edx
push ecx
call fcn.0043dbf3
add esp, 8
mov esi, dword [ebp - 0x460]
jmp 0x4084c3
lea eax, [ebp - 0x464]
mov dword [ebp - 0x464], 0x463560
push eax
push 0x46351c
push str.RCreateWindowsDirTemp
push 3
push str._anonymous_namespace::GetTempDir
mov edx, 0x49
mov ecx, str.d:devopsworkspacep_37d34ce895ed4865ac95061b653d796fmisc_setup3_backupdownloader_backupdownload.cpp
call fcn.00407d50
add esp, 0x14
call ebx
push eax
push esi
push str.create_folder_:_s_error__errcode:_lu_n
push str.GetTempDir
push 3
push str._anonymous_namespace::GetTempDir
push 0x4c
push str.d:devopsworkspacep_37d34ce895ed4865ac95061b653d796fmisc_setup3_backupdownloader_backupdownload.cpp
call fcn.00409850
mov byte [ebp - 4], 0
add esp, 0x20
mov edx, dword [ebp - 0x424]
cmp edx, 8
jb 0x408319
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40830f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40858b
push edx
push ecx
call fcn.0043dbf3
add esp, 8
xor edi, edi
jmp 0x408526
push 0x2000000
push 3
push 0
push 7
push 2
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4084bc
xor eax, eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x454]
push 0xd
push 0x463000
mov dword [ebp - 0x444], eax
mov dword [ebp - 0x440], 7
mov word [ebp - 0x454], ax
call fcn.004017c0
lea edx, [ebp - 0x438]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x454]
call fcn.004011e0
mov byte [ebp - 4], 6
mov bl, al
mov edx, dword [ebp - 0x440]
cmp edx, 8
jb 0x4083e4
mov ecx, dword [ebp - 0x454]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4083da
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408590
push edx
push ecx
call fcn.0043dbf3
add esp, 8
test bl, bl
je 0x408444
cmp dword [ebp - 0x424], 8
lea edx, [ebp - 0x438]
jb 0x408418
mov edx, dword [ebp - 0x438]
test edx, edx
jne 0x408418
xor ecx, ecx
push ecx
push edx
lea ecx, [ebp - 0x460]
call fcn.00409600
mov esi, dword [ebp - 0x460]
jmp 0x408478
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408420
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x460]
call fcn.00409600
mov esi, dword [ebp - 0x460]
jmp 0x408478
lea eax, [ebp - 0x468]
mov dword [ebp - 0x468], 0x463560
push eax
push 0x46351c
push str.RCreateWindowsDirTemp
push 3
push str._anonymous_namespace::GetTempDir
mov edx, 0x63
mov ecx, str.d:devopsworkspacep_37d34ce895ed4865ac95061b653d796fmisc_setup3_backupdownloader_backupdownload.cpp
call fcn.00407d50
add esp, 0x14
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x424]
cmp edx, 8
jb 0x4084bc
mov ecx, dword [ebp - 0x438]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4084b2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408595
push edx
push ecx
call fcn.0043dbf3
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x464]
lea ecx, [esi - 0x10]
mov edi, dword [edx]
sub edi, 0x10
cmp ecx, edi
je 0x408521
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x408516
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x408516
call fcn.00409510
mov dword [ebp - 0x470], eax
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x408509
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x464]
add eax, 0x10
mov dword [ecx], eax
jmp 0x408521
push dword [esi - 0xc]
mov ecx, edx
push esi
call fcn.00409600
mov edi, 1
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408545
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.0043dbb2
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00407690
push 0x80004005
call fcn.00407690
push 0x80004005
call fcn.00407690
call fcn.004420bc
call fcn.004420bc
call fcn.004420bc
call fcn.004420bc
call fcn.004420bc
int3