Function at 0x4978a0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ecx, ecx
mov esi, eax
mov dword [esp + 0x1c], ecx
cmp byte [esi + 0x3f], cl
jne 0x4978d0
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0043bca0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [esi + 0x94], 1
jle 0x4978f3
push str.cannot_VACUUM___SQL_statements_in_progress
call fcn.0043bca0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x50]
mov dword [esp + 0x24], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [esi + 0x40], 2
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0xb0]
mov dword [esi + 0xb0], ecx
mov ebx, dword [eax + 4]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
movzx eax, byte [edx + 0xf]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x49794f
mov eax, str.ATTACH__AS_vacuum_db_
push edi
mov ecx, esi
call fcn.004976e0
mov ebp, eax
mov eax, dword [esi + 0x14]
add esp, 4
cmp eax, dword [esp + 0x18]
jle 0x497975
mov ecx, dword [esi + 0x10]
mov edx, eax
shl edx, 4
lea edx, [edx + ecx - 0x10]
mov dword [esp + 0x1c], edx
test ebp, ebp
jne 0x497bb7
mov ecx, dword [esi + 0x10]
shl eax, 4
mov eax, dword [eax + ecx - 0xc]
mov dword [esp + 0x14], eax
call fcn.0044f300
mov eax, ebx
call fcn.0044e0b0
mov dword [esp + 0x18], eax
push edi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, esi
call fcn.004976e0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x497bb7
push edi
mov eax, str.BEGIN_
mov ecx, esi
call fcn.004976e0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x497bb7
push 2
push ebx
call fcn.0044e5d0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4979f2
mov dword [esi + 0x48], ebp
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx + 0x20]
mov ebp, dword [esp + 0x14]
push 0
push edx
push eax
mov eax, ebp
call fcn.0044dff0
add esp, 0xc
test eax, eax
jne 0x497bb2
cmp dword [esp + 0x20], eax
jne 0x497a38
mov ecx, dword [esi + 0x48]
push eax
mov eax, dword [esp + 0x1c]
push eax
push ecx
mov eax, ebp
call fcn.0044dff0
add esp, 0xc
test eax, eax
jne 0x497bb2
cmp byte [esi + 0x41], 0
jne 0x497bb2
mov al, byte [esi + 0x43]
test al, al
jl 0x497a4e
movsx eax, al
jmp 0x497a55
mov eax, ebx
call fcn.0044e230
push eax
mov eax, ebp
call fcn.0044e1b0
add esp, 4
push edi
push esi
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
call fcn.00497760
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
push edi
push esi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.00497760
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
push edi
push esi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.00497760
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
or dword [esi + 0x18], 0x8000000
push edi
push esi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
call fcn.00497760
and dword [esi + 0x18], 0xf7ffffff
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
push edi
push esi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.00497760
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
push edi
push esi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.00497760
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x497bb7
push edi
mov eax, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov ecx, esi
call fcn.004976e0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x497bb7
xor edi, edi
movzx eax, byte [edi + 0x5399f0]
lea edx, [esp + 0x20]
push edx
push eax
mov eax, ebx
call fcn.00454260
movzx ecx, byte [edi + 0x5399f1]
add ecx, dword [esp + 0x28]
movzx edx, byte [edi + 0x5399f0]
mov eax, dword [esp + 0x1c]
push ecx
push edx
call fcn.004542c0
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x497bb7
add edi, 2
cmp edi, 0xa
jl 0x497b20
mov edi, dword [esp + 0x14]
push ebx
mov eax, edi
call fcn.004566f0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x497bb7
mov eax, edi
call fcn.0044f300
mov ebp, eax
test ebp, ebp
jne 0x497bb7
mov eax, edi
call fcn.0044e230
push eax
mov eax, ebx
call fcn.0044e1b0
mov eax, dword [edi + 4]
mov ecx, dword [esp + 0x1c]
mov eax, dword [eax + 0x20]
add esp, 4
push 1
push ecx
push eax
mov eax, ebx
call fcn.0044dff0
add esp, 0xc
mov ebp, eax
jmp 0x497bb7
mov ebp, 7
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
push 1
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x34]
mov dword [esi + 0x50], eax
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0xb0], edx
call fcn.0044dff0
mov edi, dword [esp + 0x28]
xor ebx, ebx
add esp, 0xc
mov byte [esi + 0x3f], 1
cmp edi, ebx
je 0x497c02
mov eax, dword [edi + 4]
call fcn.0044ddd0
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
call fcn.00473740
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret