Function at 0x4079b0
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path
Get file attributes
Set current directory
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4108de
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x764
push ebx
push ebp
lea eax, [esp + 0x10]
push esi
push edi
mov dword [esp + 0x14], eax
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x564]
lea edx, [esp + 0x66c]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x23c]
push edx
rep stosd dword es:[edi], eax
xor ecx, ecx
push 0x105
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], str._lcid_
mov dword [esp + 0x24], ecx
xor ebx, ebx
mov dword [esp + 0x28], ecx
stosb byte es:[edi], al
mov dword [esp + 0x2c], ecx
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x674]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x88
xor eax, eax
lea edi, [esp + 0x34c]
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x564]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x564]
push 0x5c
push ecx
call fcn.00409ba0
mov edx, 2
lea ecx, [esp + 0x56c]
sub edx, ecx
add esp, 8
add eax, edx
lea edx, [esp + 0x564]
push eax
lea eax, [esp + 0x240]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edi, [esp + 0x23c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x134]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x134]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x788]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test al, 0x10
mov edi, str.sqlspre.ini
jne 0x407aeb
mov edi, str.sqlspost.ini
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and ecx, 3
lea eax, [esp + 0x134]
rep movsb byte es:[edi], byte [esi]
push eax
call ebp
cmp eax, 0xffffffff
jne 0x407b5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
lea edi, [esp + 0x134]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x348]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x407eef
lea edi, [esp + 0x66c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, str.setupsql.ini
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x30]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x13c]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x407e89
lea edx, [esp + 0x2c]
push edx
call ebp
and al, 0xfe
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x23c]
push ecx
push edx
push str.SourceDir
push str.Input
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
test eax, eax
jne 0x407c3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x348]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x407eef
mov edi, str...Binn
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x23c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x138
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00408a4d
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x77c], 0
je 0x407ca3
lea ecx, [esp + 0x23c]
push str.sqdedev.dll
push ecx
mov ecx, eax
call fcn.00401000
mov esi, eax
jmp 0x407ca5
xor esi, esi
test esi, esi
mov dword [esp + 0x77c], 0xffffffff
mov ebx, esi
jne 0x407cc0
mov ebp, 0xe
jmp 0x407eef
mov ecx, esi
call fcn.004011f0
mov ebp, eax
test ebp, ebp
je 0x407d61
or ecx, 0xffffffff
lea edi, [esp + 0x23c]
xor eax, eax
lea edx, [esp + 0x348]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x348]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x413040
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x348]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.sqdedev.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x407eef
mov ecx, esi
call fcn.004011d0
cmp ax, 0x409
je 0x407d8f
mov ecx, esi
call fcn.004011d0
test ax, ax
je 0x407d8f
lea eax, [esp + 0x18]
push str.Other
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
jmp 0x407da7
push 0x409
lea ecx, [esp + 0x1c]
push 0x413820
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
call fcn.004070e0
mov esi, eax
test esi, esi
je 0x407e0a
push str.SQLCopyFiles
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x407df6
lea edx, [esp + 0x344]
lea ecx, [esp + 0x14]
push edx
push 1
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x794]
push edx
lea edx, [esp + 0x3c]
push ecx
push edx
call eax
add esp, 0x18
mov ebp, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x407eef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x407eef
lea eax, [esp + 0x348]
push 0x105
push eax
call fcn.00408300
mov edi, 0x413040
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x348]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x348]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.sqlsut.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x407eef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
lea edi, [esp + 0x134]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x348]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x44d]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x344], 0xc39d
mov esi, dword [esp + 0x788]
and esi, 0x200
je 0x407f1c
lea ecx, [esp + 0x66c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.004073d0
test ebp, ebp
je 0x407f45
cmp ebp, 0xbc2
je 0x407f45
test esi, esi
jne 0x407f45
mov ecx, dword [esp + 0x784]
lea eax, [esp + 0x344]
push eax
push ebp
push ecx
call fcn.004080f0
add esp, 0xc
test ebx, ebx
je 0x407f59
mov ecx, ebx
call fcn.00401110
push ebx
call fcn.004089c0
add esp, 4
mov ecx, dword [esp + 0x774]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x770
ret