Function at 0x404460
Capabilities:
Check if file exists
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7f8c
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
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
push 0x20
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0xd8], 0
call fcn.004aa4a8
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [ebp - 0xdc], eax
push 0x38
xor eax, eax
mov dword [ebp - 0xa0], 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
call fcn.00409f70
cmp dword [ebp - 0x8c], 8
lea ecx, [ebp - 0xd4]
push ecx
push 0x20119
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0xa0]
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40453b
mov edi, dword [ebp - 0xdc]
or ebx, 0xffffffff
jmp 0x404b5b
lea eax, [ebp - 0xdc]
push eax
push dword [ebp - 0xd4]
call fcn.00404eb0
add esp, 8
push dword [ebp - 0xd4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0xdc]
mov esi, dword [edi]
cmp esi, edi
je 0x404b59
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor eax, eax
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], 7
mov word [ebp - 0xb8], ax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], 7
mov word [ebp - 0x88], ax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov ecx, dword [ebp - 0x90]
mov eax, 0x7ffffffe
sub eax, ecx
mov byte [ebp - 4], 6
cmp eax, 1
jb 0x404d96
cmp dword [ebp - 0x8c], 8
lea eax, [ebp - 0xa0]
push 1
cmovae eax, dword [ebp - 0xa0]
push 0x4c996c
push ecx
push eax
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0xd4]
lea ecx, [ebp - 0xd0]
call fcn.00401b00
cmp dword [esi + 0x1c], 8
lea edx, [esi + 8]
mov byte [ebp - 4], 7
jb 0x404641
mov edx, dword [edx]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404646
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xd0]
call fcn.00409d10
mov edx, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
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 eax, dword [edx + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
lea eax, [ebp - 0xb8]
mov byte [ebp - 4], 8
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00404320
mov edx, dword [ebp - 0x14]
add esp, 8
mov byte [ebp - 4], 7
cmp edx, 8
jb 0x404704
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4046fa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0xbc]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 6
cmp edx, 8
jb 0x40475c
mov ecx, dword [ebp - 0xd0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404752
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0xb8]
push eax
call fcn.00404da0
mov ecx, dword [ebp - 0x78]
mov eax, 0x7ffffffe
sub eax, ecx
add esp, 8
cmp eax, 0x18
jb 0x404d96
cmp dword [ebp - 0x74], 8
lea eax, [ebp - 0x88]
push 0x18
cmovae eax, dword [ebp - 0x88]
push str.CloudStationBackupdata
push ecx
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0xd4]
lea ecx, [ebp - 0x28]
call fcn.00401b00
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x4047ee
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4047e4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x44], eax
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 0x25
jb 0x404d96
cmp dword [ebp - 0x74], 8
lea eax, [ebp - 0x88]
push 0x25
cmovae eax, dword [ebp - 0x88]
push str.SynologyDriveCloudStationBackup.old
push ecx
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0xd4]
lea ecx, [ebp - 0x28]
call fcn.00401b00
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x40488e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404884
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x78]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x2c], eax
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 0x2a
jb 0x404d96
cmp dword [ebp - 0x74], 8
lea eax, [ebp - 0x88]
push 0x2a
cmovae eax, dword [ebp - 0x88]
push str.SynologyDriveCloudStationBackup.olddata
push ecx
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0xd4]
lea ecx, [ebp - 0x28]
call fcn.00401b00
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x40492e
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404924
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call ebx
cmp eax, 0xffffffff
je 0x4049ce
test al, 0x10
je 0x4049ce
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
cmp eax, 0xffffffff
je 0x404994
test al, 0x10
je 0x404994
lea eax, [ebp - 0x40]
push eax
call fcn.00406160
add esp, 4
test eax, eax
js 0x404b9e
lea eax, [ebp - 0x40]
push eax
call fcn.00403060
add esp, 4
test eax, eax
js 0x404bd3
cmp dword [ebp - 0x5c], 8
lea ecx, [ebp - 0x70]
lea eax, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x70]
cmp dword [ebp - 0x44], 8
push ecx
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x404ba5
mov edx, dword [ebp - 0x5c]
mov byte [ebp - 4], 5
cmp edx, 8
jb 0x404a0c
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404a02
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov byte [ebp - 4], 4
cmp edx, 8
jb 0x404a5e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404a54
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x44]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov byte [ebp - 4], 3
cmp edx, 8
jb 0x404ab0
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404aa6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x74]
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x404b05
mov ecx, dword [ebp - 0x88]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404afb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0xa4]
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x404b49
mov ecx, dword [ebp - 0xb8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404b3f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov esi, dword [esi]
mov edi, dword [ebp - 0xdc]
cmp esi, edi
jne 0x404572
xor ebx, ebx
mov edx, dword [ebp - 0x8c]
cmp edx, 8
jb 0x404d10
mov ecx, dword [ebp - 0xa0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404d00
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
jmp 0x404d00
mov edi, str.Failed_to_remove_directory__s___d__n
jmp 0x404bd8
cmp dword [ebp - 0x5c], 8
lea edi, [ebp - 0x70]
lea esi, [ebp - 0x58]
cmovae edi, dword [ebp - 0x70]
cmp dword [ebp - 0x44], 8
cmovae esi, dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str.Failed_to_move_folder_from__s_to__s___d__n
call fcn.0040b3d0
add esp, 0x10
jmp 0x404bf4
mov edi, str.Failed_to_create_folder__s___d__n
cmp dword [ebp - 0x2c], 8
lea esi, [ebp - 0x40]
cmovae esi, dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push edi
call fcn.0040b3d0
add esp, 0xc
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x404c2e
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404c24
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
cmp edx, 8
jb 0x404c7c
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404c72
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d91
push edx
push ecx
call fcn.004aa4d8
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 7
cmp eax, 8
jb 0x404ca5
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.0040a120
xor eax, eax
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x44], 7
cmp eax, 8
jb 0x404cd4
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.0040a120
mov eax, dword [ebp - 0xa4]
cmp eax, 8
jb 0x404cf2
inc eax
lea ecx, [ebp - 0xb8]
push eax
push dword [ebp - 0xb8]
call fcn.0040a120
mov edi, dword [ebp - 0xdc]
or ebx, 0xffffffff
jmp 0x404b5b
push edx
push ecx
call fcn.004aa4d8
mov edi, dword [ebp - 0xdc]
add esp, 8
xor eax, eax
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
mov eax, dword [edi + 4]
mov dword [eax], 0
mov edi, dword [edi]
test edi, edi
je 0x404d63
lea esp, [esp]
mov esi, dword [edi]
lea eax, [edi + 8]
push eax
lea eax, [ebp - 0xdc]
push eax
call fcn.004018c0
push 0x20
push edi
call fcn.004aa4d8
add esp, 0x10
mov edi, esi
test esi, esi
jne 0x404d40
push 0x20
push dword [ebp - 0xdc]
call fcn.004aa4d8
add esp, 8
mov eax, ebx
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.004aeecf
call fcn.00409af0
int3