Function at 0x403c30
Capabilities:
Check if file exists
Get common file path
Get program files directory

Disassembly:
push ebp
lea ebp, [esp - 0x23c]
sub esp, 0x23c
push 0xffffffffffffffff
push 0x4c7e57
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x4e7744]
xor eax, ebp
mov dword [ebp + 0x238], eax
push ebx
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x244]
xor ebx, ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp + 0x30]
push eax
push ebx
mov dword [ebp - 0x14], ebx
push dword [0x4e85f0]
push 0x2a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x403cff
lea ecx, [ebp + 0x30]
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x28], ebx
lea edx, [ecx + 2]
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403ca4
sub ecx, edx
lea eax, [ebp + 0x30]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x18]
call fcn.00409f70
push str.SynologySynologyDrive_binlauncher.exe
lea eax, [ebp + 0x18]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp]
mov dword [ebp - 0x14], 1
push eax
call fcn.00401400
add esp, 0xc
mov ebx, 3
cmp dword [eax + 0x14], 8
jb 0x403cf0
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 0xd], 1
test eax, eax
jne 0x403d03
mov byte [ebp - 0xd], 0
test bl, 2
je 0x403d13
lea ecx, [ebp]
and ebx, 0xfffffffd
call fcn.004022d0
mov dword [ebp - 4], 0xffffffff
test bl, 1
je 0x403d5c
mov edx, dword [ebp + 0x2c]
and ebx, 0xfffffffe
cmp edx, 8
jb 0x403d5c
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403d52
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403f78
push edx
push ecx
call fcn.004aa4d8
add esp, 8
cmp byte [ebp - 0xd], 0
je 0x403dea
lea edx, [ebp + 0x30]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x28], 0
lea ecx, [edx + 2]
mov dword [ebp + 0x2c], 7
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x403d81
sub edx, ecx
lea eax, [ebp + 0x30]
sar edx, 1
lea ecx, [ebp + 0x18]
push edx
push eax
call fcn.00409f70
mov ecx, dword [ebp - 0x18]
lea eax, [ebp + 0x18]
push eax
call fcn.00402660
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x403de3
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403dd9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403f82
push edx
push ecx
call fcn.004aa4d8
add esp, 8
xor eax, eax
jmp 0x403f57
lea eax, [ebp + 0x30]
push eax
push 0
push dword [0x4e85f0]
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x403e78
lea ecx, [ebp + 0x30]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x28], eax
lea edx, [ecx + 2]
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
jmp 0x403e20
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403e20
sub ecx, edx
lea eax, [ebp + 0x30]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x18]
call fcn.00409f70
push str.SynologySynologyDrive_binlauncher.exe
lea eax, [ebp + 0x18]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp]
or ebx, 4
push eax
mov dword [ebp - 0x14], ebx
call fcn.00401400
add esp, 0xc
or ebx, 8
cmp dword [eax + 0x14], 8
jb 0x403e69
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 0xd], 1
test eax, eax
jne 0x403e7c
mov byte [ebp - 0xd], 0
test bl, 8
je 0x403e8c
lea ecx, [ebp]
and ebx, 0xfffffff7
call fcn.004022d0
mov dword [ebp - 4], 0xffffffff
test bl, 4
je 0x403ed2
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x403ed2
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403ec8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403f7d
push edx
push ecx
call fcn.004aa4d8
add esp, 8
cmp byte [ebp - 0xd], 0
je 0x403f54
lea ecx, [ebp + 0x30]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x28], 0
lea edx, [ecx + 2]
mov dword [ebp + 0x2c], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403ef3
sub ecx, edx
lea eax, [ebp + 0x30]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x18]
call fcn.00409f70
mov ecx, dword [ebp - 0x18]
lea eax, [ebp + 0x18]
push eax
call fcn.00402660
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x403de3
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403dd9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403f82
jmp 0x403dd9
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop ebx
mov ecx, dword [ebp + 0x238]
xor ecx, ebp
call fcn.004aa4f4
lea esp, [ebp + 0x23c]
pop ebp
ret
call fcn.004aeecf
call fcn.004aeecf
call fcn.004aeecf
int3