Function at 0x46b9b0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x5c]
xor eax, eax
mov dword [esp + 0x10], eax
cmp byte [ebx + 0x3f], al
jne 0x46b9df
push str.cannot_VACUUM_from_within_a_transaction
push ebx
push dword [esp + 0x60]
call fcn.0046edd0
add esp, 0xc
mov eax, 1
pop ebx
add esp, 0x50
ret
cmp dword [ebx + 0x94], 1
jle 0x46b9ef
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46b9c8
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x50]
mov dword [esp + 0x14], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [esp + 0x18], ecx
mov ecx, dword [ebx + 0x54]
cmp byte [ebx + 0x40], 2
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x10]
push ebp
mov dword [esp + 0x20], ecx
mov ecx, dword [ebx + 0xb0]
mov dword [ebx + 0xb0], 0
mov ebp, dword [eax + 4]
push esi
mov esi, dword [ebx + 0x14]
mov dword [esp + 0x28], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
mov eax, dword [ebp + 4]
push edi
mov eax, dword [eax]
mov al, byte [eax + 0xf]
mov byte [esp + 0x68], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
push eax
push dword [esp + 0x68]
push ebx
call fcn.0042c460
mov ecx, dword [ebx + 0x14]
add esp, 0xc
mov edi, eax
cmp ecx, esi
jle 0x46ba76
mov eax, dword [ebx + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x1c], eax
test edi, edi
jne 0x46be02
mov eax, dword [ebx + 0x10]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
push esi
mov dword [esp + 0x14], esi
call fcn.0044bb90
mov cl, byte [ebp + 9]
add esp, 4
test cl, cl
je 0x46bab0
inc dword [ebp + 0xc]
cmp byte [ebp + 0xa], 0
jne 0x46bab0
push ebp
call fcn.00423b80
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 + 0x18], edx
test cl, cl
je 0x46bad0
add dword [ebp + 0xc], 0xffffffff
jne 0x46bad0
push ebp
call fcn.00486170
add esp, 4
push str.PRAGMA_vacuum_db.synchronousOFF
push dword [esp + 0x68]
push ebx
call fcn.0042c460
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push str.BEGIN_
push dword [esp + 0x68]
push ebx
call fcn.0042c460
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push 2
push ebp
call fcn.0044b480
mov edi, eax
add esp, 8
test edi, edi
jne 0x46be02
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x46bb2e
mov dword [ebx + 0x48], edi
mov ecx, dword [ebp + 4]
mov edi, dword [esp + 0x18]
push 0
push edi
push dword [ecx + 0x20]
push esi
call fcn.0044e060
add esp, 0x10
test eax, eax
jne 0x46bdfd
cmp byte [esp + 0x68], al
jne 0x46bb65
push eax
push edi
push dword [ebx + 0x48]
push esi
call fcn.0044e060
add esp, 0x10
test eax, eax
jne 0x46bdfd
cmp byte [ebx + 0x41], 0
jne 0x46bdfd
mov al, byte [ebx + 0x43]
test al, al
js 0x46bb7b
movsx eax, al
jmp 0x46bb84
push ebp
call fcn.0044c3a0
add esp, 4
push eax
push esi
call fcn.0044df60
mov esi, dword [esp + 0x6c]
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
push esi
push ebx
call fcn.0042c2f0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x46be02
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push esi
push ebx
call fcn.0042c2f0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push esi
push ebx
call fcn.0042c2f0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
or dword [ebx + 0x18], 0x8000000
push 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
push esi
push ebx
call fcn.0042c2f0
and dword [ebx + 0x18], 0xf7ffffff
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push esi
push ebx
call fcn.0042c2f0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push esi
push ebx
call fcn.0042c2f0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
push 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_
push esi
push ebx
call fcn.0042c460
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46be02
xor esi, esi
nop
lea eax, [esp + 0x68]
push eax
movzx eax, byte [esi + 0x4ef120]
push eax
push ebp
call fcn.0044c3f0
movzx eax, byte [esi + 0x4ef121]
add eax, dword [esp + 0x74]
push eax
movzx eax, byte [esi + 0x4ef120]
push eax
push dword [esp + 0x24]
call fcn.0044e410
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46be02
add esi, 2
cmp esi, 0xa
jl 0x46bc50
cmp byte [ebp + 9], al
je 0x46bcab
inc dword [ebp + 0xc]
cmp byte [ebp + 0xa], al
jne 0x46bcab
push ebp
call fcn.00423b80
add esp, 4
mov esi, dword [esp + 0x10]
cmp byte [esi + 9], 0
je 0x46bcc7
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x46bcc7
push esi
call fcn.00423b80
add esp, 4
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov edi, dword [eax + 0x3c]
cmp dword [edi], 0
je 0x46bd11
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x2c]
mov eax, dword [eax + 0x20]
cdq
push edx
push eax
push 0
push ecx
call fcn.004bfab0
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
mov eax, dword [edi]
mov dword [esp + 0x18], edx
push 0xb
push edi
mov eax, dword [eax + 0x28]
call eax
mov edi, eax
add esp, 0xc
cmp edi, 0xc
je 0x46bd11
test edi, edi
jne 0x46bd9a
mov eax, dword [esi]
xorps xmm0, xmm0
mov dword [esp + 0x44], eax
lea eax, [esp + 0x30]
push SysReAllocString
push eax
mov dword [esp + 0x38], 0
movlpd qword [esp + 0x40], xmm0
movlpd qword [esp + 0x54], xmm0
movlpd qword [esp + 0x5c], xmm0
mov dword [esp + 0x64], 0
mov dword [esp + 0x50], esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], 1
call fcn.0041d8f0
lea eax, [esp + 0x38]
push eax
call fcn.0041df10
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bd7c
mov eax, dword [ebp + 4]
mov ecx, 0xfffd
and word [eax + 0x16], cx
jmp 0x46bd9a
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xf], 0
jne 0x46bd9a
cmp byte [eax + 0xc], 0
jne 0x46bd9a
push eax
call fcn.0043e7b0
add esp, 4
cmp byte [esi + 9], 0
je 0x46bdaf
add dword [esi + 0xc], 0xffffffff
jne 0x46bdaf
push esi
call fcn.00486170
add esp, 4
cmp byte [ebp + 9], 0
je 0x46bdc4
add dword [ebp + 0xc], 0xffffffff
jne 0x46bdc4
push ebp
call fcn.00486170
add esp, 4
test edi, edi
jne 0x46be02
push esi
call fcn.0044bb90
mov edi, eax
add esp, 4
test edi, edi
jne 0x46be02
push esi
call fcn.0044c3a0
push eax
push ebp
call fcn.0044df60
mov eax, dword [esi + 4]
push 1
push dword [esp + 0x28]
push dword [eax + 0x20]
push ebp
call fcn.0044e060
add esp, 0x1c
mov edi, eax
jmp 0x46be02
mov edi, 7
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x24]
push 1
mov dword [ebx + 0x50], eax
mov eax, dword [esp + 0x2c]
push 0xffffffffffffffff
mov dword [ebx + 0x54], eax
mov eax, dword [esp + 0x34]
push 0xffffffffffffffff
push ebp
mov dword [ebx + 0xb0], eax
call fcn.0044e060
mov ebp, dword [esp + 0x2c]
add esp, 0x10
mov byte [ebx + 0x3f], 1
test ebp, ebp
je 0x46be55
push dword [ebp + 4]
call fcn.0044b800
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push ebx
call fcn.0046a9e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret