Function at 0x407190
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 0x41026e
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.00409540
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 0x4072cb
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 0x40733d
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 0x4076cf
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 0x407669
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 0x40741a
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 0x4076cf
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.004083ed
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x77c], 0
je 0x407483
lea ecx, [esp + 0x23c]
push str.sqdedev.dll
push ecx
mov ecx, eax
call fcn.00401000
mov esi, eax
jmp 0x407485
xor esi, esi
test esi, esi
mov dword [esp + 0x77c], 0xffffffff
mov ebx, esi
jne 0x4074a0
mov ebp, 0xe
jmp 0x4076cf
mov ecx, esi
call fcn.004011f0
mov ebp, eax
test ebp, ebp
je 0x407541
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 0x4076cf
mov ecx, esi
call fcn.004011d0
cmp ax, 0x409
je 0x40756f
mov ecx, esi
call fcn.004011d0
test ax, ax
je 0x40756f
lea eax, [esp + 0x18]
push str.Other
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
jmp 0x407587
push 0x409
lea ecx, [esp + 0x1c]
push 0x413750
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
call fcn.004068c0
mov esi, eax
test esi, esi
je 0x4075ea
push str.SQLCopyFiles
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4075d6
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 0x4076cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4076cf
lea eax, [esp + 0x348]
push 0x105
push eax
call fcn.00407ae0
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 0x4076cf
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 0x4076fc
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.00406bb0
test ebp, ebp
je 0x407725
cmp ebp, 0xbc2
je 0x407725
test esi, esi
jne 0x407725
mov ecx, dword [esp + 0x784]
lea eax, [esp + 0x344]
push eax
push ebp
push ecx
call fcn.004078d0
add esp, 0xc
test ebx, ebx
je 0x407739
mov ecx, ebx
call fcn.00401110
push ebx
call fcn.00408360
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