Function at 0x46b7b0
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 0x46b7df
push str.cannot_VACUUM_from_within_a_transaction
push ebx
push dword [esp + 0x60]
call fcn.0046ec30
add esp, 0xc
mov eax, 1
pop ebx
add esp, 0x50
ret
cmp dword [ebx + 0x94], 1
jle 0x46b7ef
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46b7c8
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.0042c310
mov ecx, dword [ebx + 0x14]
add esp, 0xc
mov edi, eax
cmp ecx, esi
jle 0x46b876
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 0x46bc1d
mov eax, dword [ebx + 0x10]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
push esi
mov dword [esp + 0x14], esi
call fcn.0044ba10
mov cl, byte [ebp + 9]
add esp, 4
test cl, cl
je 0x46b8b0
inc dword [ebp + 0xc]
cmp byte [ebp + 0xa], 0
jne 0x46b8b0
push ebp
call fcn.00423a60
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 0x46b8d0
add dword [ebp + 0xc], 0xffffffff
jne 0x46b8d0
push ebp
call fcn.00486180
add esp, 4
push str.PRAGMA_vacuum_db.synchronousOFF
push dword [esp + 0x68]
push ebx
call fcn.0042c310
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
push str.BEGIN_
push dword [esp + 0x68]
push ebx
call fcn.0042c310
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
push 2
push ebp
call fcn.0044b300
mov edi, eax
add esp, 8
test edi, edi
jne 0x46bc1d
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x46b92e
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.0044ded0
add esp, 0x10
test eax, eax
jne 0x46bc18
cmp byte [esp + 0x68], al
jne 0x46b965
push eax
push edi
push dword [ebx + 0x48]
push esi
call fcn.0044ded0
add esp, 0x10
test eax, eax
jne 0x46bc18
cmp byte [ebx + 0x41], 0
jne 0x46bc18
mov al, byte [ebx + 0x43]
test al, al
js 0x46b97b
movsx eax, al
jmp 0x46b984
push ebp
call fcn.0044c210
add esp, 4
push eax
push esi
call fcn.0044ddd0
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.0042c1a0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x46bc1d
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push esi
push ebx
call fcn.0042c1a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
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.0042c1a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
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.0042c1a0
and dword [ebx + 0x18], 0xf7ffffff
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push esi
push ebx
call fcn.0042c1a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
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.0042c1a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
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.0042c310
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bc1d
xor esi, esi
mov edi, edi
lea eax, [esp + 0x68]
push eax
movzx eax, byte [esi + 0x4ee120]
push eax
push ebp
call fcn.0044c260
movzx eax, byte [esi + 0x4ee121]
add eax, dword [esp + 0x74]
push eax
movzx eax, byte [esi + 0x4ee120]
push eax
push dword [esp + 0x24]
call fcn.0044e280
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46bc1d
add esi, 2
cmp esi, 0xa
jl 0x46ba50
cmp byte [ebp + 9], al
je 0x46baab
inc dword [ebp + 0xc]
cmp byte [ebp + 0xa], al
jne 0x46baab
push ebp
call fcn.00423a60
add esp, 4
mov esi, dword [esp + 0x10]
cmp byte [esi + 9], 0
je 0x46bac7
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x46bac7
push esi
call fcn.00423a60
add esp, 4
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov edi, dword [eax + 0x3c]
cmp dword [edi], 0
je 0x46bb11
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.004bfcf0
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 0x46bb11
test edi, edi
jne 0x46bbb5
mov eax, dword [esi]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x30]
push SysReAllocString
push eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x50], esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], 1
call fcn.0041d7c0
lea eax, [esp + 0x38]
push eax
call fcn.0041dde0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46bb97
mov eax, dword [ebp + 4]
mov ecx, 0xfffd
and word [eax + 0x16], cx
jmp 0x46bbb5
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xf], 0
jne 0x46bbb5
cmp byte [eax + 0xc], 0
jne 0x46bbb5
push eax
call fcn.0043e650
add esp, 4
cmp byte [esi + 9], 0
je 0x46bbca
add dword [esi + 0xc], 0xffffffff
jne 0x46bbca
push esi
call fcn.00486180
add esp, 4
cmp byte [ebp + 9], 0
je 0x46bbdf
add dword [ebp + 0xc], 0xffffffff
jne 0x46bbdf
push ebp
call fcn.00486180
add esp, 4
test edi, edi
jne 0x46bc1d
push esi
call fcn.0044ba10
mov edi, eax
add esp, 4
test edi, edi
jne 0x46bc1d
push esi
call fcn.0044c210
push eax
push ebp
call fcn.0044ddd0
mov eax, dword [esi + 4]
push 1
push dword [esp + 0x28]
push dword [eax + 0x20]
push ebp
call fcn.0044ded0
add esp, 0x1c
mov edi, eax
jmp 0x46bc1d
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.0044ded0
mov ebp, dword [esp + 0x2c]
add esp, 0x10
mov byte [ebx + 0x3f], 1
test ebp, ebp
je 0x46bc70
push dword [ebp + 4]
call fcn.0044b680
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push ebx
call fcn.0046a7d0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret