Function at 0x101314ac
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
mov esi, edx
push ebx
sub esp, 0xac
cmp byte [edx + 0x55], 0
jne 0x101314c9
mov ecx, str.cannot_VACUUM_from_within_a_transaction
jmp 0x101314d7
cmp dword [edx + 0xbc], 1
jle 0x101314ec
mov ecx, str.cannot_VACUUM___SQL_statements_in_progress
mov edx, esi
mov eax, edi
call sym._sqlite3SetString
mov dword [ebp - 0x60], 1
jmp 0x10131a28
mov eax, dword [edx + 0x3c]
cmp dword [ebp + 8], 0
mov ebx, ecx
mov dword [ebp - 0x64], eax
je 0x1013152a
mov eax, dword [ebp + 8]
mov ecx, str.non_text_filename
mov dword [esp], eax
call sym._sqlite3_value_type
cmp eax, 3
jne 0x101314d7
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._sqlite3_value_text
mov ecx, eax
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x1013152f
mov ecx, 0x101eb5dc
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x6c]
shl ebx, 4
mov dword [ebp - 0x84], eax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x8c], edx
mov edx, dword [esi + 0x74]
mov dword [ebp - 0x88], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x74], eax
mov eax, dword [esi + 0x68]
mov dword [ebp - 0x90], eax
mov eax, dword [esi + 0x70]
mov dword [ebp - 0x98], eax
mov al, byte [esi + 0x5e]
mov byte [esi + 0x5e], 0
mov byte [ebp - 0x99], al
mov eax, dword [ebp - 0x74]
or eax, 6
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x84]
and eax, 0xefffafff
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x88]
and eax, 0xfffffffe
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x60]
mov edx, dword [ebp - 0x5c]
or eax, 0x201
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x24], edx
add eax, ebx
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x68], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x80], 1
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x101315de
cmp byte [eax + 0x10], 0
setne al
movzx eax, al
mov dword [ebp - 0x80], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x78], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], str.ATTACH__Q_AS_vacuum_db
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._execSqlF
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x64]
mov dword [esi + 0x3c], eax
xor eax, eax
cmp dword [ebp - 0x60], 0
mov dword [ebp - 0x6c], eax
jne 0x101319a1
mov eax, dword [ebp - 0x78]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 8], 0
mov dword [ebp - 0x6c], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x64], eax
je 0x10131673
mov eax, dword [eax + 4]
xor ecx, ecx
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
cmp dword [eax], 0
je 0x1013166f
lea edx, [ebp - 0x48]
call sym._sqlite3OsFileSize
test eax, eax
jne 0x10131655
cmp eax, dword [ebp - 0x48]
sbb eax, dword [ebp - 0x44]
jge 0x1013166f
mov ecx, str.output_file_already_exists
mov edx, esi
mov eax, edi
call sym._sqlite3SetString
mov dword [ebp - 0x60], 1
jmp 0x101319a1
or dword [esi + 0x18], 8
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeGetRequestedReserve
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ebx + 0xc]
mov edx, dword [eax + 0x50]
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeSetCacheSize.isra.0
mov eax, dword [ebp - 0x68]
xor edx, edx
call sym._sqlite3BtreeSetSpillSize
mov edx, eax
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeSetSpillSize
mov eax, dword [ebp - 0x64]
mov edx, 0x21
call sym._sqlite3BtreeSetPagerFlags.isra.0
mov ecx, str.BEGIN
mov edx, edi
mov eax, esi
call sym._execSql
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
cmp dword [ebp + 8], 0
mov eax, dword [ebp - 0x68]
sete dl
sete bl
xor ecx, ecx
movzx edx, dl
add edx, edx
call sym._sqlite3BtreeBeginTrans
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
mov eax, dword [ebp - 0x68]
mov eax, dword [eax + 4]
mov edx, dword [eax]
cmp byte [edx + 5], 5
jne 0x10131705
test bl, bl
je 0x10131705
xor edx, edx
mov dword [esi + 0x64], edx
mov edx, dword [eax + 0x24]
xor eax, eax
mov dword [esp], eax
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeSetPageSize
test eax, eax
jne 0x10131741
cmp dword [ebp - 0x80], 0
je 0x1013172a
cmp byte [esi + 0x57], 0
je 0x1013174d
jmp 0x10131741
xor ebx, ebx
mov edx, dword [esi + 0x64]
mov dword [esp], ebx
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeSetPageSize
test eax, eax
je 0x10131722
mov dword [ebp - 0x60], 7
jmp 0x101319a1
movsx edx, byte [esi + 0x5a]
test dl, dl
jns 0x1013175f
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeGetAutoVacuum
mov edx, eax
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeSetAutoVacuum
mov al, byte [ebp - 0x78]
mov byte [esi + 0xb0], al
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._execSqlF
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sym._execSqlF
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
mov eax, dword [ebp - 0x70]
mov byte [esi + 0xb0], 0
mov dword [esp + 8], str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._execSqlF
and dword [esi + 0x18], 0xfffffffb
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sym._execSqlF
mov dword [ebp - 0x60], eax
test eax, eax
jne 0x101319a1
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x4c]
movzx ebx, byte [eax + 0x101f2ef4]
mov eax, dword [ebp - 0x68]
mov edx, ebx
call sym._sqlite3BtreeGetMeta
mov eax, dword [ebp - 0x60]
mov edx, ebx
movzx ecx, byte [eax + 0x101f2ef5]
mov eax, dword [ebp - 0x64]
add ecx, dword [ebp - 0x4c]
call sym._sqlite3BtreeUpdateMeta
mov ebx, eax
test eax, eax
jne 0x1013199e
add dword [ebp - 0x60], 2
cmp dword [ebp - 0x60], 0xa
jne 0x10131813
cmp dword [ebp + 8], 0
jne 0x10131989
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeEnter
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeEnter
mov eax, dword [ebp - 0x68]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov edi, dword [eax + 0x40]
cmp dword [edi], 0
je 0x101318bc
mov eax, dword [ebp - 0x64]
mov edx, dword [eax + 4]
mov eax, dword [edx + 0x24]
mov ecx, dword [edx + 0x30]
mov ebx, eax
mul dword [edx + 0x30]
sar ebx, 0x1f
imul ecx, ebx
mov dword [ebp - 0x48], eax
mov eax, edi
add edx, ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x44], edx
mov edx, 0xb
call sym._sqlite3OsFileControl
mov ebx, eax
test eax, eax
je 0x101318bc
cmp eax, 0xc
jne 0x10131977
lea ebx, [ebp - 0x48]
xor eax, eax
mov ecx, 0xc
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x64]
mov eax, dword [eax]
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x44], eax
mov dword [esp], ebx
mov dword [esp + 4], 0x7fffffff
call sym._sqlite3_backup_step
mov eax, ebx
call sym._sqlite3_backup_finish.part.0
mov ebx, eax
test eax, eax
jne 0x10131964
mov eax, dword [ebp - 0x68]
mov eax, dword [eax + 4]
and word [eax + 0x18], 0xfffd
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeLeave
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeLeave
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeCommit
mov ebx, eax
test eax, eax
jne 0x1013199e
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeGetAutoVacuum
mov edx, eax
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeSetAutoVacuum
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeGetRequestedReserve
mov ecx, eax
mov eax, dword [ebp - 0x64]
mov eax, dword [eax + 4]
mov edx, dword [eax + 0x24]
mov dword [esp], 1
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeSetPageSize
mov dword [ebp - 0x60], eax
jmp 0x101319a1
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x10131977
call sym._pager_reset
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeLeave
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeLeave
jmp 0x1013199e
mov eax, dword [ebp - 0x64]
call sym._sqlite3BtreeCommit
mov ebx, eax
test eax, eax
jne 0x1013199e
xor ecx, ecx
mov dword [ebp - 0x60], ecx
jmp 0x101319a1
mov dword [ebp - 0x60], ebx
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x8c]
mov byte [esi + 0xb0], 0
xor ecx, ecx
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x84]
mov dword [esi + 0x6c], edx
mov edx, dword [ebp - 0x94]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x88]
mov dword [esi + 0x74], edx
or edx, 0xffffffff
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x90]
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x98]
mov dword [esi + 0x70], eax
mov al, byte [ebp - 0x99]
mov byte [esi + 0x5e], al
mov dword [esp], 1
mov eax, dword [ebp - 0x68]
call sym._sqlite3BtreeSetPageSize
cmp dword [ebp - 0x6c], 0
mov byte [esi + 0x55], 1
je 0x10131a21
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 4]
call sym._sqlite3BtreeClose.isra.0
mov eax, dword [ebp - 0x6c]
xor edx, edx
mov dword [eax + 4], edx
mov dword [eax + 0xc], edx
mov eax, esi
call sym._sqlite3ResetAllSchemasOfConnection
mov eax, dword [ebp - 0x60]
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret