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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e5c06
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x50a0b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 2
push eax
push 0
push 0
push 0x4f4730
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x408133
lea eax, [ebp - 0xa4]
push eax
push 0
push 0
push 0x4f4710
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
jne 0x408133
mov edx, dword [ebp - 0xa8]
mov ecx, edx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
lea esi, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407d10
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.0040b6e0
push 0x4e97dc
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00401920
push str.Synology_Active_Backup_for_Business_Agent.lnk
push eax
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 4
push eax
call fcn.00401920
mov esi, eax
add esp, 0x18
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x407dec
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x407da2
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407d98
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40822c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov dword [ebp - 0x48], 0
xor eax, eax
mov word [ebp - 0x58], ax
mov dword [ebp - 0x44], 7
mov eax, dword [esi]
mov dword [ebp - 0x58], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x54], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x50], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x4c], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0xa0]
call fcn.00403880
lea ecx, [ebp - 0x88]
call fcn.00403880
mov edx, dword [ebp - 0x5c]
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x407e40
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407e36
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40822c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp - 0xa4]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407e60
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.0040b6e0
push 0x4e97dc
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.00401920
push str.SynologySynology_Active_Backup_for_Business_Agent.lnk
push eax
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 6
push eax
call fcn.00401920
mov esi, eax
add esp, 0x18
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x407f3c
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x407ef2
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407ee8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408231
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov dword [ebp - 0x18], 0
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x14], 7
mov eax, dword [esi]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0x88]
call fcn.00403880
lea ecx, [ebp - 0xa0]
call fcn.00403880
mov edx, dword [ebp - 0x5c]
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x407f90
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407f86
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408231
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp - 0xa4]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407fb0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.0040b6e0
push 0x4e97e0
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00401920
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x408076
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40802c
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408022
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408236
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov dword [ebp - 0x30], 0
xor eax, eax
mov word [ebp - 0x40], ax
mov dword [ebp - 0x2c], 7
mov eax, dword [esi]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ecx, [ebp - 0x88]
call fcn.00403880
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x4080bb
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4080b1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408236
push edx
push ecx
call fcn.004bf4bc
add esp, 8
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4080e5
cmp dword [ebp - 0x44], 8
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call esi
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408109
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call esi
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push dword [ebp - 0xa8]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
call esi
push dword [ebp - 0xa4]
call esi
jmp 0x408140
push str.Failed_to_get_public_desktop_folder_n
call fcn.00406300
add esp, 4
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40817a
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408170
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40823b
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
cmp edx, 8
jb 0x4081c8
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4081be
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40823b
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp - 0x44]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x408212
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408208
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40823b
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bf929
mov esp, ebp
pop ebp
ret
call fcn.004c4cda
call fcn.004c4cda
call fcn.004c4cda
call fcn.004c4cda
int3