Function at 0x405030
Capabilities:
Delete directory
Delete file
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x45c]
sub esp, 0x45c
push 0xffffffffffffffff
push 0x4c805d
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp + 0x458], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x24]
push eax
call fcn.004034f0
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0
push eax
call fcn.00403280
add esp, 8
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp + 0x250]
push eax
push 0
push dword [0x4e85f0]
mov byte [ebp - 4], 1
push 0x17
push 0
call esi
test eax, eax
jne 0x405837
lea eax, [ebp + 0x48]
push eax
push 0
push dword [0x4e85f0]
push 0x19
push 0
call esi
test eax, eax
jne 0x405837
mov eax, dword [ebp - 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [eax]
cmp esi, eax
je 0x4052d0
lea esp, [esp]
xor eax, eax
mov dword [ebp], 0
lea ecx, [ebp + 0x250]
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 7
lea edx, [ecx + 2]
mov word [ebp], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405104
sub ecx, edx
lea eax, [ebp + 0x250]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp]
call fcn.00409f70
push 1
push 0x4c996c
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.00409d10
mov edx, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 0
mov ecx, dword [edx]
mov dword [ebp + 0x18], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x1c], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x20], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp + 0x24], eax
mov eax, dword [edx + 0x10]
mov dword [ebp + 0x28], eax
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x2c], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
cmp dword [esi + 0x1c], 8
lea ecx, [esi + 8]
mov byte [ebp - 4], 3
jb 0x405193
mov ecx, dword [esi + 8]
push dword [esi + 0x18]
push ecx
lea ecx, [ebp + 0x18]
call fcn.00409d10
mov edx, eax
mov ecx, dword [edx]
mov dword [ebp + 0x30], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x34], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x38], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp + 0x3c], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp + 0x40], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x44], eax
xor eax, eax
mov word [edx], ax
lea eax, [ebp + 0x30]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
cmp dword [ebp + 0x44], 8
cmovae eax, dword [ebp + 0x30]
push eax
call ebx
mov edx, dword [ebp + 0x44]
cmp edx, 8
jb 0x40521f
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405215
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x2c]
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x405271
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405267
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x4052c3
mov ecx, dword [ebp]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4052b9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [esi]
mov esi, eax
cmp eax, dword [ebp - 0x24]
jne 0x4050e0
xor eax, eax
mov dword [ebp], 0
lea ecx, [ebp + 0x250]
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 7
lea edx, [ecx + 2]
mov word [ebp], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4052f4
sub ecx, edx
lea eax, [ebp + 0x250]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp]
call fcn.00409f70
push str.Synology
lea eax, [ebp]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp + 0x30]
push eax
call fcn.00401400
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x405334
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edx, dword [ebp + 0x44]
cmp edx, 8
jb 0x405375
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40536b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x4053c7
mov ecx, dword [ebp]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4053bd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax]
cmp esi, eax
je 0x405837
jmp 0x4053e0
xor eax, eax
mov dword [ebp], 0
mov word [ebp], ax
lea eax, [ebp + 0x48]
mov dword [ebp + 0x10], 0
lea edx, [eax + 2]
mov dword [ebp + 0x14], 7
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405401
sub eax, edx
lea ecx, [ebp]
sar eax, 1
push eax
lea eax, [ebp + 0x48]
push eax
call fcn.00409f70
push 1
push 0x4c996c
lea ecx, [ebp]
mov byte [ebp - 4], 5
call fcn.00409d10
mov edx, eax
mov dword [ebp + 0x30], 0
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
mov ecx, dword [edx]
mov dword [ebp + 0x30], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x34], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x38], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp + 0x3c], eax
mov eax, dword [edx + 0x10]
mov dword [ebp + 0x40], eax
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x44], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
cmp dword [esi + 0x1c], 8
lea eax, [esi + 8]
mov byte [ebp - 4], 6
jb 0x40548d
mov eax, dword [esi + 8]
push dword [esi + 0x18]
lea ecx, [ebp + 0x30]
push eax
call fcn.00409d10
mov edx, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 0
mov ecx, dword [edx]
mov dword [ebp + 0x18], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x1c], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x20], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp + 0x24], eax
mov eax, dword [edx + 0x10]
mov dword [ebp + 0x28], eax
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x2c], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
cmp dword [ebp + 0x2c], 8
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 7
cmovae eax, dword [ebp + 0x18]
push eax
push 0x4e8af0
call fcn.00401100
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + eax + 0x30]
mov ebx, dword [ecx + 4]
mov ecx, ebx
mov dword [ebp - 0x28], ebx
mov edx, dword [ebx]
call dword [edx + 4]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 8
push eax
call fcn.00401920
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
call dword [edx + 0x30]
movzx eax, ax
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 7
test ebx, ebx
je 0x405559
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
test eax, eax
je 0x405556
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push eax
call fcn.0040aa10
mov ecx, dword [ebp - 0x14]
call fcn.0040a510
mov edx, dword [ebp + 0x2c]
mov byte [ebp - 4], 6
cmp edx, 8
jb 0x4055a8
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40559e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x44]
xor eax, eax
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x4055fa
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4055f0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x40564c
mov ecx, dword [ebp]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405642
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
xor eax, eax
mov dword [ebp], 0
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 7
lea edx, [ecx + 2]
mov word [ebp], ax
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405670
sub ecx, edx
lea eax, [ebp + 0x48]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp]
call fcn.00409f70
push 1
push 0x4c996c
lea ecx, [ebp]
mov byte [ebp - 4], 9
call fcn.00409d10
mov edx, eax
mov dword [ebp + 0x30], 0
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
mov ecx, dword [edx]
mov dword [ebp + 0x30], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x34], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x38], ecx
mov eax, dword [edx + 0xc]
mov dword [ebp + 0x3c], eax
mov eax, dword [edx + 0x10]
mov dword [ebp + 0x40], eax
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x44], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
cmp dword [esi + 0x1c], 8
lea eax, [esi + 8]
mov byte [ebp - 4], 0xa
jb 0x4056fc
mov eax, dword [esi + 8]
push dword [esi + 0x18]
lea ecx, [ebp + 0x30]
push eax
call fcn.00409d10
mov edx, eax
mov ecx, dword [edx]
mov dword [ebp + 0x18], ecx
mov ecx, dword [edx + 4]
mov dword [ebp + 0x1c], ecx
mov ecx, dword [edx + 8]
mov dword [ebp + 0x20], ecx
mov ecx, dword [edx + 0xc]
mov dword [ebp + 0x24], ecx
mov ecx, dword [edx + 0x10]
mov dword [ebp + 0x28], ecx
mov eax, dword [edx + 0x14]
mov dword [ebp + 0x2c], eax
xor eax, eax
mov word [edx], ax
lea eax, [ebp + 0x18]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
cmp dword [ebp + 0x2c], 8
cmovae eax, dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x40578c
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405782
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x44]
xor eax, eax
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov byte [ebp - 4], 9
cmp edx, 8
jb 0x4057de
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4057d4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x40582c
mov ecx, dword [ebp]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405822
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40586a
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov esi, dword [esi]
cmp esi, dword [ebp - 0x1c]
jne 0x4053e0
lea ecx, [ebp - 0x1c]
call fcn.004023c0
lea ecx, [ebp - 0x24]
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 + 0x458]
xor ecx, ebp
call fcn.004aa4f4
lea esp, [ebp + 0x45c]
pop ebp
ret
call fcn.004aeecf
int3