Function at 0x4069d0
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c8245
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4e7744]
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 edi, dword [ebp + 8]
lea eax, [ebp - 0x50]
mov ebx, dword [ebp + 0xc]
push eax
call fcn.004040c0
lea eax, [ebp - 0x48]
mov dword [ebp - 4], 0
push eax
call fcn.00403b40
add esp, 8
mov eax, dword [ebp - 0x50]
mov byte [ebp - 4], 1
mov esi, dword [eax]
cmp esi, eax
je 0x406b61
mov edi, edi
mov ecx, dword [edi + 0x10]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 1
jb 0x406d45
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x406a4d
mov eax, dword [edi]
push 1
push 0x4c996c
push ecx
push eax
push edi
push dword [ebp - 0x44]
lea ecx, [ebp - 0x40]
call fcn.00401b00
cmp dword [esi + 0x1c], 8
lea ecx, [esi + 8]
mov byte [ebp - 4], 2
jb 0x406a72
mov ecx, dword [esi + 8]
push dword [esi + 0x18]
push ecx
lea ecx, [ebp - 0x40]
call fcn.00409d10
mov edx, eax
mov ecx, dword [edx]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edx + 8]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x18], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov word [edx], ax
lea eax, [ebp - 0x28]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x406b02
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406af8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d4a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x406b54
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406b4a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d4a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [esi]
mov esi, eax
cmp eax, dword [ebp - 0x50]
jne 0x406a30
mov ecx, dword [edi + 0x10]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 9
jb 0x406d45
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x406b7e
mov eax, dword [edi]
push 9
push str.Synology
push ecx
push eax
push edi
push dword [ebp - 0x44]
lea ecx, [ebp - 0x28]
call fcn.00401b00
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x406bdf
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406bd5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d4a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [ebp - 0x48]
mov esi, dword [eax]
cmp esi, eax
je 0x406d19
mov edi, dword [ebp - 0x44]
nop
mov ecx, dword [ebx + 0x10]
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 1
jb 0x406d45
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x406c0d
mov eax, dword [ebx]
push 1
push 0x4c996c
push ecx
push eax
push ebx
push edi
lea ecx, [ebp - 0x40]
call fcn.00401b00
cmp dword [esi + 0x1c], 8
lea ecx, [esi + 8]
mov byte [ebp - 4], 3
jb 0x406c30
mov ecx, dword [esi + 8]
push dword [esi + 0x18]
push ecx
lea ecx, [ebp - 0x40]
call fcn.00409d10
mov edx, eax
mov ecx, dword [edx]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edx + 8]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x18], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov word [edx], ax
lea eax, [ebp - 0x28]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x406cc0
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406cb6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d4a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x406d0e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406d04
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406d4a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov esi, dword [esi]
cmp esi, dword [ebp - 0x48]
jne 0x406bf0
lea ecx, [ebp - 0x48]
call fcn.004023c0
lea ecx, [ebp - 0x50]
call fcn.004023c0
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.004aa4f4
mov esp, ebp
pop ebp
ret
call fcn.00409af0
call fcn.004aeecf
int3