Function at 0x4544af
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov edi, edx
xor eax, eax
mov ebp, ecx
mov dword [esp + 0x24], eax
cmp byte [edi + 0x3f], al
jne 0x4544d8
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0041417b
xor eax, eax
pop ecx
inc eax
jmp 0x45480e
cmp dword [edi + 0x94], 1
jle 0x4544e8
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4544ca
mov eax, dword [edi + 0x18]
mov edx, ebp
mov ecx, dword [edi + 0x50]
mov dword [esp + 0x2c], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [esp + 0x30], ecx
mov ecx, dword [edi + 0x54]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov esi, dword [edi + 0x14]
mov dword [esp + 0x34], ecx
mov ecx, dword [edi + 0xb0]
and dword [edi + 0xb0], 0
mov eax, dword [eax + 4]
cmp byte [edi + 0x40], 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xf]
mov byte [esp + 0x17], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
mov ecx, edi
push eax
call fcn.004543d4
pop ecx
mov ecx, dword [edi + 0x14]
mov ebx, eax
cmp ecx, esi
jle 0x45456a
mov eax, dword [edi + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x24], eax
test ebx, ebx
jne 0x4547b7
mov eax, dword [edi + 0x10]
add ecx, ecx
mov eax, dword [eax + ecx*8 - 0xc]
mov ecx, eax
mov dword [esp + 0x1c], eax
call fcn.00422d77
mov esi, dword [esp + 0x18]
mov ecx, esi
call fcn.004203ea
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x20]
sub ecx, dword [eax + 0x24]
mov dword [esp + 0x20], ecx
mov ecx, esi
call fcn.0042045c
push str.PRAGMA_vacuum_db.synchronousOFF
mov edx, ebp
mov ecx, edi
call fcn.004543d4
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push str.BEGIN_
mov edx, ebp
mov ecx, edi
call fcn.004543d4
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push 2
pop edx
mov ecx, esi
call fcn.00422386
mov ebx, eax
test ebx, ebx
jne 0x4547bb
mov edx, dword [esi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4545fc
and dword [edi + 0x48], ebx
mov edx, dword [esi + 4]
mov ebx, dword [esp + 0x1c]
mov ecx, ebx
mov edx, dword [edx + 0x20]
push 0
push dword [esp + 0x24]
call fcn.00421f3a
pop ecx
pop ecx
test eax, eax
jne 0x4547ae
cmp byte [esp + 0x17], al
jne 0x454639
mov edx, dword [edi + 0x48]
mov ecx, ebx
push eax
push dword [esp + 0x24]
call fcn.00421f3a
pop ecx
pop ecx
test eax, eax
jne 0x4547ae
cmp byte [edi + 0x41], 0
jne 0x4547ae
mov al, byte [edi + 0x43]
test al, al
js 0x45464f
movsx eax, al
jmp 0x454656
mov ecx, esi
call fcn.00422082
mov edx, eax
mov ecx, ebx
call fcn.00422037
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 edx, ebp
mov ecx, edi
call fcn.00454437
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov edx, ebp
mov ecx, edi
call fcn.00454437
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov edx, ebp
mov ecx, edi
call fcn.00454437
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
or dword [edi + 0x18], 0x8000000
mov edx, ebp
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, edi
call fcn.00454437
and dword [edi + 0x18], 0xf7ffffff
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov edx, ebp
mov ecx, edi
call fcn.00454437
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov edx, ebp
mov ecx, edi
call fcn.00454437
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
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 edx, ebp
mov ecx, edi
call fcn.004543d4
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547bb
mov ebp, dword [esp + 0x18]
xor esi, esi
movzx edx, byte [esi + 0x4b2d70]
lea eax, [esp + 0x28]
push eax
mov ecx, ebp
call fcn.004271bf
movzx eax, byte [esi + 0x4b2d71]
add eax, dword [esp + 0x2c]
movzx edx, byte [esi + 0x4b2d70]
pop ecx
mov ecx, dword [esp + 0x1c]
push eax
call fcn.004271ff
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x4547b3
add esi, 2
cmp esi, 0xa
jl 0x454722
mov ebp, dword [esp + 0x1c]
mov edx, ebp
mov esi, dword [esp + 0x18]
mov ecx, esi
call fcn.00428926
mov ebx, eax
test ebx, ebx
jne 0x4547bb
mov ecx, ebp
call fcn.00422d77
mov ebx, eax
test ebx, ebx
jne 0x4547bb
mov ecx, ebp
call fcn.00422082
mov edx, eax
mov ecx, esi
call fcn.00422037
mov eax, dword [ebp + 4]
mov ecx, esi
push 1
push dword [esp + 0x24]
mov edx, dword [eax + 0x20]
call fcn.00421f3a
pop ecx
pop ecx
mov ebx, eax
jmp 0x4547bb
push 7
pop ebx
jmp 0x4547bb
mov esi, ebp
jmp 0x4547bb
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [esp + 0x30]
mov dword [edi + 0x50], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x54], eax
mov eax, dword [esp + 0x38]
push 1
push edx
mov dword [edi + 0xb0], eax
call fcn.00421f3a
mov ebp, dword [esp + 0x2c]
mov byte [edi + 0x3f], 1
pop ecx
pop ecx
test ebp, ebp
je 0x454805
mov ecx, dword [ebp + 4]
call fcn.00421df4
and dword [ebp + 4], 0
and dword [ebp + 0xc], 0
mov ecx, edi
call fcn.0043d5dc
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret