Function at 0x1812597e
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
and dword [ebp - 0x1c], 0
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
cmp byte [esi + 0x47], 0
jne 0x181259a8
push str.cannot_VACUUM_from_within_a_transaction
call fcn.180e003e
xor eax, eax
pop ecx
inc eax
jmp 0x18125cae
cmp dword [esi + 0xa4], 1
jle 0x181259b8
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1812599a
movzx ecx, word [esi + 0x18]
mov eax, dword [esi + 0x1c]
or dword [esi + 0x18], 6
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x5c]
mov dword [ebp - 0x24], eax
and eax, 0xffffaf7f
mov dword [ebp - 0x28], ecx
or eax, 0x201
mov ecx, dword [esi + 0x60]
mov dword [ebp - 0x2c], ecx
mov cl, byte [esi + 0x50]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
mov byte [ebp - 2], cl
mov ecx, dword [ebp + 8]
shl ecx, 4
mov byte [esi + 0x50], 0
mov dword [ebp + 8], ecx
push str.ATTACHAS_vacuum_db
mov edx, dword [ecx + eax]
mov eax, dword [ecx + eax + 4]
mov ecx, esi
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], edx
mov edx, ebx
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xc]
mov byte [ebp - 1], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x18], eax
call fcn.18125855
mov edi, eax
pop ecx
test edi, edi
jne 0x18125c52
mov eax, dword [ebp - 0x18]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [eax + 4]
mov ecx, eax
mov dword [ebp - 8], eax
call fcn.180f04af
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.180ed781
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x20]
sub ecx, dword [eax + 0x24]
mov dword [ebp - 0x14], ecx
mov ecx, edi
call fcn.180ed7fa
mov eax, dword [esi + 0x10]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.180ef565
xor edx, edx
mov ecx, edi
call fcn.180ef58a
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.180ef58a
mov ecx, dword [ebp - 8]
push 0x21
pop edx
call fcn.180ef5f1
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.18125855
mov edi, eax
pop ecx
test edi, edi
jne 0x18125c52
mov ecx, dword [ebp - 0xc]
push 2
pop edx
call fcn.180efa7b
mov edi, eax
test edi, edi
jne 0x18125c52
mov edi, dword [ebp - 0xc]
mov edx, dword [edi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x18125adb
and dword [esi + 0x54], 0
mov edx, dword [edi + 4]
mov edx, dword [edx + 0x20]
mov ecx, dword [ebp - 8]
push 0
push dword [ebp - 0x14]
call fcn.180ef616
pop ecx
pop ecx
test eax, eax
jne 0x18125c4f
cmp byte [ebp - 1], al
jne 0x18125b13
mov edx, dword [esi + 0x54]
mov ecx, dword [ebp - 8]
push eax
push dword [ebp - 0x14]
call fcn.180ef616
pop ecx
pop ecx
test eax, eax
jne 0x18125c4f
cmp byte [esi + 0x49], 0
jne 0x18125c4f
mov al, byte [esi + 0x4c]
test al, al
js 0x18125b29
movsx eax, al
jmp 0x18125b30
mov ecx, edi
call fcn.180ef763
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.180ef711
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
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 + 0x9c], al
call fcn.181258e2
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18125c52
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex_AND_length_sql__10
push ebx
push esi
call fcn.181258e2
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18125c52
push dword [ebp - 0x10]
mov byte [esi + 0x9c], 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.181258e2
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18125c52
push dword [ebp - 0x10]
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.181258e2
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18125c52
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x18], edi
movzx edx, byte [edi + 0x181cf830]
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.180f4dba
movzx eax, byte [edi + 0x181cf831]
add eax, dword [ebp - 0x10]
movzx edx, byte [edi + 0x181cf830]
pop ecx
mov ecx, dword [ebp - 8]
push eax
call fcn.180f4dfc
mov edi, eax
pop ecx
test edi, edi
jne 0x18125c52
mov edi, dword [ebp - 0x18]
add edi, 2
mov dword [ebp - 0x18], edi
cmp edi, 0xa
jl 0x18125bc3
mov edx, dword [ebp - 8]
mov ecx, ebx
call fcn.180f6525
mov edi, eax
test edi, edi
jne 0x18125c52
mov ebx, dword [ebp - 8]
mov ecx, ebx
call fcn.180f04af
mov edi, eax
test edi, edi
jne 0x18125c52
mov ecx, ebx
call fcn.180ef763
mov ecx, dword [ebp - 0xc]
mov edx, eax
call fcn.180ef711
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0xc]
push 1
push dword [ebp - 0x14]
mov edx, dword [eax + 0x20]
call fcn.180ef616
pop ecx
pop ecx
mov edi, eax
jmp 0x18125c52
push 7
pop edi
mov eax, dword [ebp - 0x20]
or edx, 0xffffffff
mov ecx, dword [ebp - 0xc]
movzx eax, ax
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x5c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x60], eax
mov al, byte [ebp - 2]
push 1
push edx
mov byte [esi + 0x9c], 0
mov byte [esi + 0x50], al
call fcn.180ef616
mov ebx, dword [ebp - 0x1c]
mov byte [esi + 0x47], 1
pop ecx
pop ecx
test ebx, ebx
je 0x18125ca5
mov ecx, dword [ebx + 4]
call fcn.180ef4be
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
mov ecx, esi
call fcn.1810d9c6
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret