Function at 0x47cf10
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
xor ecx, ecx
mov esi, eax
push edi
mov dword [esp + 0x18], ecx
cmp byte [esi + 0x43], cl
jne 0x47cf3f
mov edi, dword [esp + 0x34]
mov ebx, str.cannot_VACUUM_from_within_a_transaction
call fcn.00424270
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
cmp dword [esi + 0x98], 1
jle 0x47cf63
mov edi, dword [esp + 0x34]
mov ebx, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.00424270
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x54]
mov ebx, dword [esi + 0x14]
mov dword [esp + 0x20], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [esi + 0x44], 2
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0x58]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0xb4]
mov dword [esi + 0xb4], ecx
mov edi, dword [eax + 4]
mov ecx, dword [edi + 4]
mov dword [esp + 0x2c], edx
mov edx, dword [ecx]
movzx eax, byte [edx + 0x10]
mov dword [esp + 0x1c], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x47cfbb
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, dword [esp + 0x34]
push ecx
mov ecx, esi
call fcn.0047cdb0
mov ebp, eax
mov eax, dword [esi + 0x14]
add esp, 4
cmp eax, ebx
jle 0x47cfe3
mov ecx, dword [esi + 0x10]
mov edx, eax
shl edx, 4
lea edx, [edx + ecx - 0x10]
mov dword [esp + 0x18], edx
test ebp, ebp
jne 0x47d23c
mov ecx, dword [esi + 0x10]
shl eax, 4
mov ebx, dword [eax + ecx - 0xc]
mov eax, ebx
mov dword [esp + 0x10], ebx
call fcn.00437f20
mov eax, edi
call fcn.00436cc0
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
push edx
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, esi
call fcn.0047cdb0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov eax, dword [esp + 0x34]
push eax
mov eax, str.BEGIN_
mov ecx, esi
call fcn.0047cdb0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
push 2
push edi
call fcn.004371e0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x47d23c
mov ecx, dword [edi + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x47d06a
mov dword [esi + 0x4c], eax
mov eax, dword [edi + 4]
mov ebp, dword [esp + 0x14]
mov eax, dword [eax + 0x20]
push 0
push ebp
mov ecx, ebx
call fcn.00436c00
add esp, 8
test eax, eax
jne 0x47d237
cmp dword [esp + 0x1c], eax
jne 0x47d0a6
push eax
mov eax, dword [esi + 0x4c]
push ebp
mov ecx, ebx
call fcn.00436c00
add esp, 8
test eax, eax
jne 0x47d237
cmp byte [esi + 0x45], 0
jne 0x47d237
mov al, byte [esi + 0x48]
test al, al
jl 0x47d0bc
movsx eax, al
jmp 0x47d0c3
mov eax, edi
call fcn.00436e30
push eax
mov eax, ebx
call fcn.00436db0
mov ecx, dword [esp + 0x38]
add esp, 4
push ecx
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
mov ebx, esi
call fcn.0047ce30
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov edx, dword [esp + 0x34]
push edx
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.0047ce30
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov eax, dword [esp + 0x34]
push eax
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.0047ce30
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov ecx, dword [esp + 0x34]
or dword [esi + 0x18], 0x8000000
push ecx
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.0047ce30
and dword [esi + 0x18], 0xf7ffffff
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov edx, dword [esp + 0x34]
push edx
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.0047ce30
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov eax, dword [esp + 0x34]
push eax
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.0047ce30
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
mov ecx, dword [esp + 0x34]
push ecx
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.0047cdb0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x47d23c
xor ebx, ebx
movzx eax, byte [ebx + 0x52971c]
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, edi
call fcn.0043cf30
movzx ecx, byte [ebx + 0x52971d]
add ecx, dword [esp + 0x24]
movzx edx, byte [ebx + 0x52971c]
mov eax, dword [esp + 0x18]
push ecx
push edx
call fcn.0043cf90
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x47d23c
add ebx, 2
cmp ebx, 0xa
jl 0x47d1a6
mov eax, dword [esp + 0x10]
mov ebx, edi
call fcn.0043f430
mov ebp, eax
test ebp, ebp
jne 0x47d23c
mov ebx, dword [esp + 0x10]
mov eax, ebx
call fcn.00437f20
mov ebp, eax
test ebp, ebp
jne 0x47d23c
mov eax, ebx
call fcn.00436e30
push eax
mov eax, edi
call fcn.00436db0
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 4]
mov eax, dword [eax + 0x20]
add esp, 4
push 1
push ecx
mov ecx, edi
call fcn.00436c00
add esp, 8
mov ebp, eax
jmp 0x47d23c
mov ebp, 7
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], ecx
push 1
push 0xffffffffffffffff
or eax, 0xffffffff
mov ecx, edi
mov dword [esi + 0xb4], edx
call fcn.00436c00
mov edi, dword [esp + 0x20]
xor ebx, ebx
add esp, 8
mov byte [esi + 0x43], 1
cmp edi, ebx
je 0x47d288
mov eax, dword [edi + 4]
call fcn.004369d0
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
mov eax, esi
call fcn.0045c610
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x20
ret