Function at 0x46e970
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, edx
xor eax, eax
mov edx, ecx
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edx
mov dword [ebp - 0x18], eax
cmp byte [edi + 0x3e], al
jne 0x46e9a8
push str.cannot_VACUUM_from_within_a_transaction
push edi
push edx
call fcn.0040aaa0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x8c], 1
jle 0x46e9cc
push str.cannot_VACUUM___SQL_statements_in_progress
push edi
push edx
call fcn.0040aaa0
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x50]
mov dword [ebp - 0x20], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [edi + 0x3f], 2
mov esi, dword [edi + 0x14]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edi + 0x54]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edi + 0xa4]
mov dword [edi + 0xa4], 0
mov dword [ebp - 0x2c], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 8], ecx
mov eax, dword [ecx + 4]
mov ecx, str.ATTACH__AS_vacuum_db_
mov eax, dword [eax]
movzx eax, byte [eax + 0xf]
mov dword [ebp - 0x1c], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
cmovne eax, ecx
push eax
mov ecx, edi
call fcn.0046e520
mov edi, dword [edi + 0x14]
add esp, 4
cmp edi, esi
mov esi, dword [ebp - 0xc]
mov ebx, eax
jle 0x46ea4e
mov eax, dword [esi + 0x10]
mov edx, edi
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [ebp - 0x18], eax
test ebx, ebx
jne 0x46eecf
mov eax, dword [esi + 0x10]
add edi, edi
mov eax, dword [eax + edi*8 - 0xc]
mov ecx, eax
mov dword [ebp - 0x10], eax
call fcn.0041ef00
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.0041dac0
mov edx, dword [ebp - 4]
push str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, esi
mov dword [ebp - 0x14], eax
call fcn.0046e520
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
push str.BEGIN_
mov ecx, esi
call fcn.0046e520
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov esi, dword [edi + 4]
mov ecx, edi
call fcn.0041b720
cmp byte [edi + 8], 2
je 0x46ecc3
movzx ecx, word [esi + 0x16]
test cl, 1
je 0x46ead5
mov ebx, 8
jmp 0x46ecd9
cmp byte [esi + 0x14], 2
je 0x46eb14
test cl, 0x40
jne 0x46eb14
mov eax, dword [esi + 0x48]
test eax, eax
je 0x46eaf2
cmp dword [eax], edi
jne 0x46eb10
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x46eae7
cmp byte [edi + 9], 0
mov eax, dword [edi + 4]
je 0x46eb47
cmp dword [eax + 0x4c], edi
je 0x46eb27
test byte [eax + 0x16], 0x20
je 0x46eb27
mov ebx, 0x106
jmp 0x46ecd9
mov eax, dword [eax]
jmp 0x46eb17
mov eax, dword [esi + 0x4c]
mov eax, dword [eax]
test eax, eax
je 0x46eaf2
mov ebx, 0x106
jmp 0x46ecd9
mov eax, dword [eax + 0x48]
test eax, eax
je 0x46eb47
mov edi, edi
cmp dword [eax], edi
je 0x46eb40
cmp dword [eax + 4], 1
jne 0x46eb40
cmp byte [eax + 8], 1
jne 0x46eb1d
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x46eb30
xor ebx, ebx
and ecx, 0xfff7
mov word [esi + 0x16], cx
cmp dword [esi + 0x2c], ebx
jne 0x46eb60
or ecx, 8
mov word [esi + 0x16], cx
nop
cmp dword [esi + 0xc], 0
jne 0x46eb75
mov ecx, esi
call fcn.0041dc80
mov ebx, eax
test ebx, ebx
je 0x46eb60
jmp 0x46ebb4
test ebx, ebx
jne 0x46ebb4
test byte [esi + 0x16], 1
je 0x46eb86
mov ebx, 8
jmp 0x46ebb4
mov eax, dword [edi]
xor ecx, ecx
cmp byte [eax + 0x3f], 2
mov edx, 1
sete cl
push ecx
mov ecx, dword [esi]
call fcn.00417b80
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46ebb4
mov ecx, esi
call fcn.0041df30
mov ebx, eax
test ebx, ebx
je 0x46ebe7
cmp byte [esi + 0x14], 0
jne 0x46ebe7
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x46ebe7
mov ecx, dword [ecx + 0x44]
test byte [ecx + 0x18], 0x40
mov edi, dword [ecx + 0x10]
je 0x46ebd4
call fcn.004165a0
jmp 0x46ebd9
call fcn.00412360
mov ecx, edi
call fcn.004176c0
mov dword [esi + 0xc], 0
cmp bl, 5
jne 0x46ec29
cmp byte [esi + 0x14], 0
jne 0x46ec29
mov edi, dword [esi + 4]
add edi, 0x1b4
je 0x46ec29
mov eax, dword [edi]
test eax, eax
je 0x46ec29
mov ecx, dword [edi + 8]
test ecx, ecx
js 0x46ec29
push ecx
push dword [edi + 4]
call eax
add esp, 8
test eax, eax
je 0x46ec22
inc dword [edi + 8]
mov edi, dword [ebp - 8]
jmp 0x46eb60
mov dword [edi + 8], 0xffffffff
test ebx, ebx
jne 0x46ecd6
mov ecx, dword [ebp - 8]
cmp byte [ecx + 8], bl
jne 0x46ec51
inc dword [esi + 0x28]
cmp byte [ecx + 9], bl
je 0x46ec51
mov byte [ecx + 0x24], 1
mov eax, dword [esi + 0x48]
mov dword [ecx + 0x28], eax
lea eax, [ecx + 0x1c]
mov dword [esi + 0x48], eax
mov byte [ecx + 8], 2
cmp byte [esi + 0x14], 2
jae 0x46ec5f
mov byte [esi + 0x14], 2
or word [esi + 0x16], 0x20
mov edi, dword [esi + 0xc]
mov dword [esi + 0x4c], ecx
mov edx, dword [edi + 0x38]
movzx ecx, byte [edx + 0x1c]
movzx eax, byte [edx + 0x1d]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1e]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0x1f]
shl ecx, 8
or ecx, eax
cmp dword [esi + 0x2c], ecx
je 0x46ecc0
mov ecx, dword [edi + 0x44]
call fcn.00417e40
mov ebx, eax
test ebx, ebx
jne 0x46ecd6
mov ecx, dword [esi + 0x2c]
mov edx, dword [edi + 0x38]
mov eax, ecx
shr eax, 0x18
mov byte [edx + 0x1c], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 0x1d], al
mov eax, ecx
shr eax, 8
mov byte [edx + 0x1e], al
mov byte [edx + 0x1f], cl
mov edi, dword [ebp - 8]
mov edx, dword [edi]
mov ecx, dword [esi]
mov edx, dword [edx + 0x1e8]
call fcn.00418400
mov ebx, eax
jmp 0x46ecd9
mov edi, dword [ebp - 8]
cmp byte [edi + 9], 0
je 0x46ecfc
dec dword [edi + 0xc]
jne 0x46ecfc
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x46ecf8
push eax
call dword [0x4e5c64]
add esp, 4
mov byte [edi + 0xa], 0
test ebx, ebx
jne 0x46eed2
mov eax, dword [edi + 4]
mov esi, dword [ebp - 0xc]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x46ed15
mov dword [esi + 0x48], ebx
mov eax, dword [edi + 4]
mov ebx, dword [ebp - 0x10]
mov edx, dword [eax + 0x20]
push 0
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.0041d9e0
add esp, 8
test eax, eax
jne 0x46eec8
cmp dword [ebp - 0x1c], eax
jne 0x46ed53
mov edx, dword [esi + 0x48]
push eax
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.0041d9e0
add esp, 8
test eax, eax
jne 0x46eec8
cmp byte [esi + 0x40], 0
jne 0x46eec8
mov al, byte [esi + 0x42]
test al, al
js 0x46ed69
movsx eax, al
jmp 0x46ed70
mov ecx, edi
call fcn.0041dc40
mov edx, eax
mov ecx, ebx
call fcn.0041dbc0
mov edx, dword [ebp - 4]
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
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
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov ecx, esi
call fcn.0046e5b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
mov edx, dword [ebp - 4]
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_
mov ecx, esi
call fcn.0046e520
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
xor esi, esi
nop
movzx edx, byte [esi + 0x4cbb60]
lea eax, [ebp - 0x1c]
push eax
mov ecx, edi
call fcn.00423c40
movzx eax, byte [esi + 0x4cbb61]
add eax, dword [ebp - 0x1c]
movzx edx, byte [esi + 0x4cbb60]
mov ecx, dword [ebp - 0x10]
add esp, 4
push eax
call fcn.00423cb0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46eed2
add esi, 2
cmp esi, 0xa
jl 0x46ee40
mov esi, dword [ebp - 0x10]
mov edx, esi
mov ecx, edi
call fcn.00426850
mov ebx, eax
test ebx, ebx
jne 0x46eed2
mov ecx, esi
call fcn.0041ef00
mov ebx, eax
test ebx, ebx
jne 0x46eed2
mov ecx, esi
call fcn.0041dc40
mov edx, eax
mov ecx, edi
call fcn.0041dbc0
mov eax, dword [esi + 4]
push 1
push dword [ebp - 0x14]
mov edx, dword [eax + 0x20]
mov ecx, edi
call fcn.0041d9e0
add esp, 8
mov ebx, eax
jmp 0x46eed2
mov ebx, 7
jmp 0x46eed2
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 0x2c]
push 1
push 0xffffffffffffffff
or edx, 0xffffffff
mov ecx, edi
mov dword [esi + 0xa4], eax
call fcn.0041d9e0
mov edi, dword [ebp - 0x18]
add esp, 8
mov byte [esi + 0x3e], 1
test edi, edi
je 0x46ef22
mov ecx, dword [edi + 4]
call fcn.0041d750
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov ecx, esi
call fcn.00443a20
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret