Function at 0x4d6580
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
cmp byte [esi + 0x47], 0
jne 0x4d65ac
mov edi, dword [esp + 0x44]
mov ebx, str.cannot_VACUUM_from_within_a_transaction
call fcn.00475810
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
cmp dword [esi + 0xa4], 1
jle 0x4d65d0
mov edi, dword [esp + 0x44]
mov ebx, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.00475810
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
movzx edx, word [esi + 0x18]
mov ecx, dword [esi + 0x1c]
or dword [esi + 0x18], 6
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edx
mov edx, dword [esi + 0x5c]
and ecx, 0xffffaf7f
or ecx, 0x201
mov dword [esi + 0x1c], ecx
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0x60]
shl eax, 4
mov dword [esp + 0x3c], edx
mov dl, byte [esi + 0x50]
mov byte [esi + 0x50], 0
mov ebx, dword [eax + ecx + 4]
mov dword [esp + 0x28], eax
add eax, ecx
mov byte [esp + 0x17], dl
mov edx, dword [eax]
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x18], edx
movzx edx, byte [ecx + 0xc]
mov ecx, dword [esp + 0x44]
push str.ATTACHAS_vacuum_db
push ecx
push esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x2c], eax
call fcn.004d6360
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d689c
mov eax, dword [esp + 0x20]
shl eax, 4
add eax, dword [esi + 0x10]
mov edi, dword [eax + 4]
mov dword [esp + 0x1c], eax
mov eax, edi
call fcn.0048a980
mov eax, ebx
call fcn.004896d0
mov edx, dword [esi + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + edx + 0xc]
mov edx, dword [ecx + 0x50]
push edx
mov eax, edi
call fcn.004894d0
add esp, 4
push ebp
mov eax, ebx
call fcn.00489520
add esp, 4
push eax
mov eax, edi
call fcn.00489520
add esp, 4
push 0x21
mov eax, edi
call fcn.004895c0
mov eax, dword [esp + 0x48]
add esp, 4
push str.BEGIN
push eax
push esi
call fcn.004d6360
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
push eax
push 2
push ebx
call fcn.00489c20
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x4d66f1
mov dword [esi + 0x54], eax
mov eax, dword [ebx + 4]
mov ebp, dword [esp + 0x24]
mov eax, dword [eax + 0x20]
push 0
push ebp
mov ecx, edi
call fcn.00489610
add esp, 8
test eax, eax
jne 0x4d6893
cmp dword [esp + 0x2c], eax
jne 0x4d672d
push eax
mov eax, dword [esi + 0x54]
push ebp
mov ecx, edi
call fcn.00489610
add esp, 8
test eax, eax
jne 0x4d6893
cmp byte [esi + 0x49], 0
jne 0x4d6893
mov al, byte [esi + 0x4c]
test al, al
jl 0x4d6743
movsx eax, al
jmp 0x4d674a
mov eax, ebx
call fcn.00489850
push eax
mov eax, edi
call fcn.004897d0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
mov cl, byte [esp + 0x24]
add esp, 4
push edx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push eax
mov eax, esi
mov byte [esi + 0x9c], cl
call fcn.004d6460
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x44]
push ecx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push edx
mov eax, esi
call fcn.004d6460
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
mov ecx, dword [esp + 0x44]
mov byte [esi + 0x9c], al
mov eax, dword [esp + 0x18]
push eax
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ecx
mov eax, esi
call fcn.004d6460
and dword [esi + 0x18], 0xfffffffb
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
push edx
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push eax
mov eax, esi
call fcn.004d6460
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4d6898
mov dword [esp + 0x18], ebp
jmp 0x4d6804
mov ebp, dword [esp + 0x18]
movzx edx, byte [ebp + 0x50bb54]
lea ecx, [esp + 0x2c]
push ecx
push edx
mov eax, ebx
call fcn.00490080
movzx eax, byte [ebp + 0x50bb55]
add eax, dword [esp + 0x34]
movzx ecx, byte [ebp + 0x50bb54]
push eax
push ecx
mov eax, edi
call fcn.004900e0
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x4d6898
mov eax, dword [esp + 0x18]
add eax, 2
cmp eax, 0xa
mov dword [esp + 0x18], eax
jl 0x4d6800
mov eax, edi
call fcn.00492590
mov ebp, eax
test ebp, ebp
jne 0x4d6898
mov eax, edi
call fcn.0048a980
mov ebp, eax
test ebp, ebp
jne 0x4d6898
mov eax, edi
call fcn.00489850
push eax
mov eax, ebx
call fcn.004897d0
mov ecx, dword [esp + 0x28]
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x20]
add esp, 4
push 1
push ecx
mov ecx, ebx
call fcn.00489610
add esp, 8
mov ebp, eax
jmp 0x4d6898
mov ebp, 7
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
movzx edx, word [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov dword [esi + 0x1c], eax
mov al, byte [esp + 0x17]
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x5c], ecx
mov byte [esi + 0x50], al
push 1
push 0xffffffffffffffff
mov eax, 0xffffffff
mov ecx, ebx
mov byte [esi + 0x9c], 0
mov dword [esi + 0x60], edx
call fcn.00489610
xor ebx, ebx
add esp, 8
mov byte [esi + 0x47], 1
cmp edi, ebx
je 0x4d68f2
mov eax, dword [edi + 4]
call fcn.004893e0
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
mov eax, esi
call fcn.004b3080
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x30
ret