Function at 0x406e00
Capabilities:
Check if file exists
Create directory
Move file

Disassembly:
push ebp
lea ebp, [esp - 0xac]
sub esp, 0xac
push 0xffffffffffffffff
push 0x4e5a4b
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x50a0b0]
xor eax, ebp
mov dword [ebp + 0xa8], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 7
mov word [ebp - 0x24], ax
mov dword [ebp - 4], eax
mov dword [ebp + 0x28], eax
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
lea eax, [ebp - 0x24]
mov byte [ebp - 4], 1
push eax
call fcn.00406470
add esp, 4
test eax, eax
js 0x4071b4
lea eax, [ebp + 0x18]
push eax
call fcn.00406380
add esp, 4
test eax, eax
js 0x40717e
push str.SynologyActiveBackupAgent
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 0x90]
push eax
call fcn.00401a50
push str.ActiveBackupforBusinessAgent
lea eax, [ebp + 0x18]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.00401a50
add esp, 0x18
push 0x16
xor eax, eax
mov byte [ebp - 4], 3
push str._servicelog_db.sqlite
lea ecx, [ebp + 0x30]
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
call fcn.0040b6e0
push 0x19
xor eax, eax
mov byte [ebp - 4], 4
push str._service_system_db.sqlite
lea ecx, [ebp + 0x48]
mov dword [ebp + 0x58], 0
mov dword [ebp + 0x5c], 7
mov word [ebp + 0x48], ax
call fcn.0040b6e0
cmp dword [ebp + 0xa4], 8
lea eax, [ebp + 0x90]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmovae eax, dword [ebp + 0x90]
push eax
mov byte [ebp - 4], 5
call edi
test eax, eax
je 0x4070f7
cmp dword [ebp + 0x74], 8
lea eax, [ebp + 0x60]
cmovae eax, dword [ebp + 0x60]
push eax
call edi
test eax, eax
jne 0x406f5e
cmp dword [ebp + 0x74], 8
lea eax, [ebp + 0x60]
push 0
cmovae eax, dword [ebp + 0x60]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jne 0x4070f7
lea eax, [ebp + 0x30]
push eax
lea eax, [ebp + 0x90]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.004019a0
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x406f7d
mov eax, dword [eax]
push eax
call edi
lea ecx, [ebp + 0x78]
mov esi, eax
call fcn.00403880
test esi, esi
je 0x406fe9
push str.log_db.sqlite
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp]
push eax
call fcn.00401a50
mov esi, eax
lea eax, [ebp + 0x30]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp + 0x90]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.004019a0
add esp, 0x18
cmp dword [esi + 0x14], 8
jb 0x406fc5
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x406fcd
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea ecx, [ebp + 0x78]
call fcn.00403880
lea ecx, [ebp]
mov byte [ebp - 4], 5
call fcn.00403880
lea eax, [ebp + 0x48]
push eax
lea eax, [ebp + 0x90]
push eax
lea eax, [ebp]
push eax
call fcn.004019a0
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x407008
mov eax, dword [eax]
push eax
call edi
lea ecx, [ebp]
mov esi, eax
call fcn.00403880
test esi, esi
je 0x407074
push str._system_db.sqlite
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x78]
push eax
call fcn.00401a50
mov esi, eax
lea eax, [ebp + 0x48]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp + 0x90]
push eax
lea eax, [ebp]
push eax
call fcn.004019a0
add esp, 0x18
cmp dword [esi + 0x14], 8
jb 0x407050
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x407058
mov eax, dword [eax]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
lea ecx, [ebp]
call fcn.00403880
lea ecx, [ebp + 0x78]
mov byte [ebp - 4], 5
call fcn.00403880
cmp dword [ebp + 0xa4], 8
lea eax, [ebp + 0x90]
lea ecx, [ebp + 0x78]
cmovae eax, dword [ebp + 0x90]
push eax
call fcn.00402b20
lea eax, [ebp + 0x78]
mov byte [ebp - 4], 8
push eax
call fcn.004079b0
add esp, 4
mov byte [ebp - 4], 5
lea ecx, [ebp + 0x78]
call fcn.00403880
push str.ActiveBackupAgent
lea eax, [ebp + 0x18]
push eax
lea eax, [ebp]
push eax
call fcn.00401a50
add esp, 0xc
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 9
jb 0x4070ce
mov eax, dword [eax]
push eax
lea ecx, [ebp + 0x78]
call fcn.00402b20
lea eax, [ebp + 0x78]
mov byte [ebp - 4], 0xa
push eax
call fcn.004079b0
add esp, 4
lea ecx, [ebp + 0x78]
call fcn.00403880
lea ecx, [ebp]
call fcn.00403880
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x407131
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407127
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40720c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp + 0x44]
cmp edx, 8
jb 0x40716b
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407161
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40720c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
lea ecx, [ebp + 0x60]
call fcn.00403880
lea ecx, [ebp + 0x90]
call fcn.00403880
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x4071b4
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4071aa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40720c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov edx, dword [ebp - 0x10]
cmp edx, 8
jb 0x4071ea
mov ecx, dword [ebp - 0x24]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4071e0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40720c
push edx
push ecx
call fcn.004bf4bc
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp + 0xa8]
xor ecx, ebp
call fcn.004bf929
lea esp, [ebp + 0xac]
pop ebp
ret
call fcn.004c4cda
int3