Function at 0x1004c2d0
Capabilities:
Check if file exists
Get file attributes
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx + 8]
xor ecx, ecx
mov dword [ebp - 0x18], eax
or eax, 0x2800
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebx + 8], eax
cmp byte [ebx + 0x10], cl
jne 0x1004c313
mov eax, dword [ebp + 8]
push ecx
push str.cannot_VACUUM_from_within_a_transaction
push eax
call fcn.1001a240
add esp, 0xc
mov edi, 1
jmp 0x1004c58f
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov dword [ebp - 4], eax
mov eax, dword [edx]
mov eax, dword [eax + 0x4c]
cmp byte [eax], 0
mov dword [ebp - 8], eax
jne 0x1004c335
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004c338
sub eax, edx
mov esi, eax
lea ecx, [esi + 0x64]
push 1
push ecx
mov dword [ebp - 0x14], esi
call fcn.1001a0a0
mov edi, eax
add esp, 8
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x1004c365
lea edi, [eax + 7]
jmp 0x1004c58f
mov eax, dword [ebp - 8]
mov edx, edi
sub edx, eax
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1004c370
jmp 0x1004c383
mov esi, dword [ebp - 0x14]
lea eax, [esi + edi + 1]
mov byte [esi + edi], 0x2d
call fcn.1004c0a0
mov ecx, edi
call fcn.10028980
mov esi, eax
test esi, esi
je 0x1004c3bd
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor edx, edx
cmp eax, 0xffffffff
setne dl
push esi
mov dword [ebp - 8], edx
call fcn.100b3828
mov eax, dword [ebp - 8]
add esp, 4
jmp 0x1004c3ce
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
test eax, eax
jne 0x1004c380
push edi
push str.ATTACH__q_AS_vacuum_db_
call fcn.10033150
mov esi, eax
add esp, 8
test esi, esi
jne 0x1004c3ee
lea edi, [eax + 7]
jmp 0x1004c58f
mov ecx, esi
mov eax, ebx
call fcn.1004c130
push esi
mov edi, eax
call fcn.100b3828
add esp, 4
test edi, edi
jne 0x1004c58f
mov eax, dword [ebx]
lea edx, [eax + eax*2]
mov eax, dword [ebx + 4]
lea eax, [eax + edx*8]
mov edx, dword [ebp - 4]
lea ecx, [eax - 0x18]
mov eax, dword [eax - 0x14]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edx + 4]
movzx esi, word [ecx + 0x14]
movzx ecx, word [ecx + 0x16]
mov edx, esi
sub edx, ecx
mov dword [ebp - 8], eax
call fcn.1001c5e0
mov ecx, str.PRAGMA_vacuum_db.synchronousOFF
mov eax, ebx
call fcn.1004c130
mov edi, eax
test edi, edi
jne 0x1004c58f
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
movzx ecx, byte [eax + 0x12]
mov eax, dword [ebp - 8]
push ecx
call fcn.1001c640
add esp, 4
mov ecx, str.BEGIN_EXCLUSIVE_
mov eax, ebx
call fcn.1004c130
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14_100000000____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14_100000000___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21_100000000____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_CREATE_VIEW_vacuum_db.__substr_sql_13_100000000____FROM_sqlite_master_WHERE_typeview
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence_
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
mov ecx, str.SELECT_CREATE_TRIGGER__vacuum_db.__substr_sql__16__1000000__FROM_sqlite_master_WHERE_typetrigger
call fcn.1004c1f0
mov edi, eax
test edi, edi
jne 0x1004c58f
xor esi, esi
movzx edi, byte [esi + 0x100ef080]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x14]
push edx
call fcn.10021a80
mov edi, eax
add esp, 4
test edi, edi
jne 0x1004c58c
movzx ebx, byte [esi + 0x100ef081]
movzx edi, byte [esi + 0x100ef080]
add ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
call fcn.10021b70
mov edi, eax
test edi, edi
jne 0x1004c58c
add esi, 2
cmp esi, 8
jb 0x1004c518
mov esi, dword [ebp - 4]
mov ebx, dword [ebp - 8]
push esi
mov ecx, ebx
call fcn.100229d0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1004c58c
push ebx
call fcn.1001d330
mov edi, eax
add esp, 4
test edi, edi
jne 0x1004c58c
push esi
call fcn.1001d330
add esp, 4
mov edi, eax
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov dword [ebx + 8], eax
mov byte [ebx + 0x10], 1
test esi, esi
je 0x1004c5b4
mov ecx, dword [esi + 4]
push ecx
call fcn.1001c470
add esp, 4
xor eax, eax
mov dword [esi + 4], eax
mov dword [esi + 0x14], eax
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x1004c5cb
mov eax, esi
call fcn.10028b40
push esi
call fcn.100b3828
add esp, 4
push 0
call fcn.1002a390
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret