Function at 0x10054d30
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x30
push ebx
push esi
mov esi, dword [esp + 0x40]
xor ebx, ebx
cmp byte [esi + 0x4f], bl
jne 0x10054d5d
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [esp + 0x44]
call fcn.10058250
add esp, 0xc
mov eax, 1
pop esi
pop ebx
add esp, 0x30
ret
cmp dword [esi + 0xac], 1
jle 0x10054d6d
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x10054d45
mov ecx, dword [esp + 0x48]
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x10054dac
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x10087b28], 3
je 0x10054d93
push str.non_text_filename
jmp 0x10054d45
push ecx
call sym.sqlite3.dll_sqlite3_value_text
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x10054db1
mov edx, 0x1008c2f1
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x28], eax
or eax, 6
mov dword [esi + 0x18], eax
push ebp
mov ebp, dword [esi + 0x24]
push edi
mov edi, dword [esi + 0x64]
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x2c]
mov cl, byte [esi + 0x58]
and eax, 0xefffaf7f
or eax, 0x201
mov dword [esp + 0x38], edi
mov edi, dword [esi + 0x68]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x4c]
shl edi, 4
mov dword [esi + 0x24], ebp
mov byte [esi + 0x58], bl
mov dword [esp + 0x34], ebp
mov ebp, dword [edi + eax + 4]
mov byte [esp + 0x13], cl
mov ecx, dword [edi + eax]
push edx
mov eax, dword [ebp + 4]
push str.ATTACH__Q_AS_vacuum_db
push dword [esp + 0x4c]
mov dword [esp + 0x58], edi
mov eax, dword [eax]
push esi
mov dword [esp + 0x28], ecx
mov al, byte [eax + 0xc]
mov byte [esp + 0x58], al
mov eax, dword [esi + 0x14]
mov dword [esp + 0x30], eax
call fcn.1001e1a0
mov edi, eax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x100550ff
mov eax, dword [esp + 0x20]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
mov ebx, dword [eax + 4]
mov dword [esp + 0x1c], ebx
cmp dword [esp + 0x50], edi
je 0x10054ebc
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov ecx, dword [eax]
test ecx, ecx
je 0x10054eb8
lea edx, [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x10054e9b
cmp dword [esp + 0x28], eax
jl 0x10054eb8
jg 0x10054e9b
cmp dword [esp + 0x24], eax
jbe 0x10054eb8
mov eax, dword [esp + 0x44]
mov edi, 1
push str.output_file_already_exists
push esi
push eax
call fcn.10058250
add esp, 0xc
jmp 0x100550fb
or dword [esi + 0x18], 8
mov cl, byte [ebp + 9]
test cl, cl
je 0x10054ed8
inc dword [ebp + 0xc]
cmp byte [ebp + 0xa], 0
jne 0x10054ed8
push ebp
call fcn.10017080
mov cl, byte [ebp + 9]
add esp, 4
mov eax, dword [ebp + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [esp + 0x24], edx
test cl, cl
je 0x10054ef8
add dword [ebp + 0xc], 0xffffffff
jne 0x10054ef8
push ebp
call fcn.100719e0
add esp, 4
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + eax + 0xc]
push dword [eax + 0x50]
push ebx
call fcn.1003a8c0
push 0
push ebp
call fcn.1003aad0
push eax
push ebx
call fcn.1003aad0
push 0x21
push ebx
call fcn.1003aa00
mov eax, dword [esp + 0x64]
push str.BEGIN
push eax
push esi
call fcn.1001e0d0
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x100550fb
push eax
mov eax, dword [esp + 0x54]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
push eax
push ebp
call fcn.10037bc0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x100550fb
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x10054f74
mov dword [esi + 0x5c], edi
mov ecx, dword [ebp + 4]
mov edi, dword [esp + 0x24]
push 0
push edi
push dword [ecx + 0x20]
push ebx
call fcn.1003a940
add esp, 0x10
test eax, eax
jne 0x100550f6
cmp byte [esp + 0x48], al
jne 0x10054fab
push eax
push edi
push dword [esi + 0x5c]
push ebx
call fcn.1003a940
add esp, 0x10
test eax, eax
jne 0x100550f6
cmp byte [esi + 0x51], 0
jne 0x100550f6
mov al, byte [esi + 0x54]
test al, al
js 0x10054fc1
movsx eax, al
jmp 0x10054fca
push ebp
call fcn.10038d20
add esp, 4
push eax
push ebx
call fcn.1003a840
push dword [esp + 0x20]
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x2c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0xa4], al
call fcn.1001e1a0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x100550fb
push dword [esp + 0x18]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push esi
call fcn.1001e1a0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x100550fb
push dword [esp + 0x18]
mov byte [esi + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.1001e1a0
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x100550fb
push dword [esp + 0x18]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.1001e1a0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x100550fb
xor ebx, ebx
nop
lea eax, [esp + 0x48]
push eax
movzx eax, byte [ebx + 0x10086edc]
push eax
push ebp
call fcn.10038d90
movzx eax, byte [ebx + 0x10086edd]
add eax, dword [esp + 0x54]
push eax
movzx eax, byte [ebx + 0x10086edc]
push eax
push dword [esp + 0x30]
call fcn.1003acf0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x100550fb
add ebx, 2
cmp ebx, 0xa
jl 0x10055060
mov ebx, dword [esp + 0x1c]
cmp dword [esp + 0x50], eax
jne 0x100550bb
push ebx
push ebp
call fcn.100383d0
mov edi, eax
add esp, 8
test edi, edi
jne 0x100550fb
push ebx
call fcn.100381b0
mov edi, eax
add esp, 4
test edi, edi
jne 0x100550fb
cmp dword [esp + 0x50], eax
jne 0x100550fb
push ebx
call fcn.10038d20
push eax
push ebp
call fcn.1003a840
mov eax, dword [ebx + 4]
push 1
push dword [esp + 0x34]
push dword [eax + 0x20]
push ebp
call fcn.1003a940
add esp, 0x1c
mov edi, eax
jmp 0x100550fb
mov edi, 7
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x34]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x38]
push 1
mov dword [esi + 0x64], eax
mov eax, dword [esp + 0x40]
push 0xffffffffffffffff
mov dword [esi + 0x68], eax
mov al, byte [esp + 0x1b]
push 0xffffffffffffffff
push ebp
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.1003a940
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x10055160
push dword [ebx + 4]
call fcn.10037f60
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.10053b90
add esp, 4
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x30
ret