Function at 0x40f870
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x432beb
mov eax, dword fs:[0]
push eax
sub esp, 0xac
mov eax, dword [0x446050]
xor eax, esp
mov dword [esp + 0xa8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x446050]
xor eax, esp
push eax
lea eax, [esp + 0xc0]
mov dword fs:[0], eax
push 0x449080
push str._sdtcache.bin
lea ecx, [esp + 0xa8]
xor ebp, ebp
xor edi, edi
call fcn.004172c0
add esp, 8
mov dword [esp + 0xc8], ebp
cmp dword [esp + 0xb8], 0x10
mov eax, dword [esp + 0xa4]
jae 0x40f8e7
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fb31
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebp
jne 0x40f90f
test bl, 0x10
je 0x40f90f
mov esi, 2
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebp
jne 0x40fbfc
push str.dtman.exe
push 0x448c60
push 0x436a34
lea ecx, [esp + 0x74]
call fcn.004172c0
add esp, 0xc
mov byte [esp + 0xc8], 1
cmp dword [esp + 0x80], 0x10
mov eax, dword [esp + 0x6c]
jae 0x40f953
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fb38
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebp
jne 0x40f97b
test bl, 0x10
je 0x40f97b
mov esi, 2
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebp
jne 0x40fbc9
push str.BackupsDatabase_
push 0x448c60
push 0x436a34
lea ecx, [esp + 0x58]
call fcn.004172c0
add esp, 0xc
mov byte [esp + 0xc8], 2
lea esi, [esp + 0x4c]
call fcn.00417460
test al, al
je 0x40fb9c
push 0xffffffffffffffff
push ebp
mov eax, esi
push eax
lea ecx, [esp + 0x90]
mov dword [esp + 0xa8], 0xf
mov dword [esp + 0xa4], ebp
mov byte [esp + 0x94], 0
call fcn.004096e0
mov byte [esp + 0xc8], 3
xor edi, edi
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x1c]
push edx
mov ecx, str.Auto_backup_before_upgrade_to_5.2.b.20241123R
call fcn.00410b80
add esp, 8
mov byte [esp + 0xc8], 4
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x58]
call fcn.004096e0
mov byte [esp + 0xc8], 3
mov esi, 0x10
cmp dword [esp + 0x30], esi
jb 0x40fa43
mov eax, dword [esp + 0x1c]
push eax
call fcn.0042019e
add esp, 4
mov ecx, edi
inc edi
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebp
mov byte [esp + 0x1c], 0
test ecx, ecx
je 0x40fa6d
push edi
push str.___u_
lea ecx, [esp + 0x54]
call fcn.004171b0
add esp, 8
mov eax, dword [esp + 0x50]
cmp dword [esp + 0x64], esi
jae 0x40fa7b
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fb3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebp
jne 0x40faa3
test bl, 0x10
je 0x40faa3
mov esi, 2
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebp
je 0x40f9f4
push 1
push 0x43b434
lea eax, [esp + 0x54]
call fcn.004095d0
push 8
push str.BACKUP__
lea eax, [esp + 0x54]
call fcn.004097c0
lea esi, [esp + 0x34]
call fcn.004025f0
mov ecx, dword [esp + 0x50]
mov eax, 0x10
cmp dword [esp + 0x64], eax
jae 0x40faee
lea ecx, [esp + 0x50]
cmp dword [esp + 0x80], eax
mov eax, dword [esp + 0x6c]
jae 0x40faff
lea eax, [esp + 0x6c]
push ebp
push ecx
push eax
mov bl, 1
lea eax, [esp + 0x40]
call fcn.00402730
mov edi, eax
mov eax, dword [esp + 0x50]
xor ebx, ebx
cmp edi, ebx
jne 0x40fb46
cmp dword [esp + 0x64], 0x10
jae 0x40fb24
lea eax, [esp + 0x50]
push eax
push str.Backed_up_audit_database_to___s_
call fcn.0040d8e0
jmp 0x40fb5c
xor esi, esi
jmp 0x40f905
xor esi, esi
jmp 0x40f971
xor esi, esi
jmp 0x40fa99
cmp dword [esp + 0x64], 0x10
jae 0x40fb51
lea eax, [esp + 0x50]
push eax
push str.Could_not_back_up_audit_database_to___s_
call fcn.0040d7c0
add esp, 8
mov byte [esp + 0xc8], 2
cmp dword [esp + 0x9c], 0x10
jb 0x40fb81
mov edx, dword [esp + 0x88]
push edx
call fcn.0042019e
add esp, 4
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], ebx
mov byte [esp + 0x88], bl
xor ebp, ebp
mov byte [esp + 0xc8], 1
cmp dword [esp + 0x64], 0x10
jb 0x40fbb8
mov eax, dword [esp + 0x50]
push eax
call fcn.0042019e
add esp, 4
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebp
mov byte [esp + 0x50], 0
mov byte [esp + 0xc8], 0
cmp dword [esp + 0x80], 0x10
jb 0x40fbe8
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.0042019e
add esp, 4
mov dword [esp + 0x80], 0xf
mov dword [esp + 0x7c], ebp
mov byte [esp + 0x6c], 0
mov dword [esp + 0xc8], 0xffffffff
cmp dword [esp + 0xb8], 0x10
jb 0x40fc21
mov edx, dword [esp + 0xa4]
push edx
call fcn.0042019e
add esp, 4
mov dword [esp + 0xb8], 0xf
mov dword [esp + 0xb4], ebp
mov byte [esp + 0xa4], 0
mov eax, edi
mov ecx, dword [esp + 0xc0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.0041f826
add esp, 0xb8
ret