Function at 0x506810
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x55]
test ecx, ecx
jne 0x50684e
push str.cannot_VACUUM_from_within_a_transaction
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00509e70
add esp, 0xc
mov eax, 1
jmp 0x506e33
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0xbc], 1
jle 0x506879
push str.cannot_VACUUM___SQL_statements_in_progress
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00509e70
add esp, 0xc
mov eax, 1
jmp 0x506e33
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x3c]
mov dword [ebp - 0x38], edx
cmp dword [ebp + 0x14], 0
je 0x5068e7
mov eax, dword [ebp + 0x14]
push eax
call fcn.004a9e40
add esp, 4
cmp eax, 3
je 0x5068b8
push str.non_text_filename
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00509e70
add esp, 0xc
mov eax, 1
jmp 0x506e33
mov eax, dword [ebp + 0x14]
push eax
call fcn.004a9da0
add esp, 4
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x3c]
and edx, 0xfffffffe
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x3c], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x3c]
or edx, 6
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x3c], edx
jmp 0x5068ee
mov dword [ebp - 0x24], 0x5fd9f4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x20]
mov eax, dword [ecx + 0x24]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 0x44], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x68]
mov edx, dword [eax + 0x6c]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x70]
mov edx, dword [eax + 0x74]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], edx
mov eax, dword [ebp + 0xc]
mov cl, byte [eax + 0x5e]
mov byte [ebp - 1], cl
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x20]
or eax, 0x201
mov ecx, dword [edx + 0x24]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x20], eax
mov dword [edx + 0x24], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
or ecx, 6
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x20]
and ecx, 0xefffafff
mov edx, dword [eax + 0x24]
and edx, 0xfffffffe
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], edx
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x5e], 0
mov edx, dword [ebp + 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + edx]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp + 0x10]
shl eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + eax + 4]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004e2dd0
add esp, 4
push eax
call fcn.004fcef0
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x24]
push ecx
push str.ATTACH__Q_AS_vacuum_db
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004ba820
add esp, 0x10
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x38]
mov dword [ecx + 0x3c], edx
cmp dword [ebp - 8], 0
je 0x5069eb
jmp 0x506d99
mov eax, dword [ebp - 0x34]
shl eax, 4
mov ecx, dword [ebp + 0xc]
add eax, dword [ecx + 0x10]
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 4]
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0x14], 0
je 0x506a83
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e2dd0
add esp, 4
push eax
call fcn.004fcdc0
add esp, 4
mov dword [ebp - 0x28], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0x4c], xmm0
mov edx, dword [ebp - 0x28]
cmp dword [edx], 0
je 0x506a74
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004fbe40
add esp, 8
test eax, eax
jne 0x506a53
cmp dword [ebp - 0x48], 0
jl 0x506a74
jg 0x506a53
cmp dword [ebp - 0x4c], 0
jbe 0x506a74
mov dword [ebp - 8], 1
push str.output_file_already_exists
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00509e70
add esp, 0xc
jmp 0x506d99
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
or edx, 8
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x18], edx
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004e11b0
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp + 0x10]
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + edx + 0xc]
mov eax, dword [edx + 0x50]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e33f0
add esp, 8
push 0
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e35d0
add esp, 8
push eax
mov eax, dword [ebp - 0xc]
push eax
call fcn.004e35d0
add esp, 8
push 0x21
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e3590
add esp, 8
push str.BEGIN
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004ba730
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506afe
jmp 0x506d99
cmp dword [ebp + 0x14], 0
jne 0x506b0d
mov dword [ebp - 0x2c], 2
jmp 0x506b14
mov dword [ebp - 0x2c], 0
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.004dfc40
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506b34
jmp 0x506d99
mov eax, dword [ebp - 0x10]
push eax
call fcn.004e2dd0
add esp, 4
push eax
call fcn.004fcee0
add esp, 4
cmp eax, 5
jne 0x506b5e
cmp dword [ebp + 0x14], 0
jne 0x506b5e
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x64], 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x10]
push eax
call fcn.004e11a0
add esp, 4
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e3480
add esp, 0x10
test eax, eax
jne 0x506baf
cmp dword [ebp - 0x3c], 0
jne 0x506ba4
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x64]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004e3480
add esp, 0x10
test eax, eax
jne 0x506baf
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x57]
test ecx, ecx
je 0x506bbb
mov dword [ebp - 8], 7
jmp 0x506d99
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx + 0x5a]
test eax, eax
jl 0x506bd2
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx + 0x5a]
mov dword [ebp - 0x30], edx
jmp 0x506be1
mov eax, dword [ebp - 0x10]
push eax
call fcn.004e1050
add esp, 4
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004e3330
add esp, 8
mov eax, dword [ebp + 0xc]
mov cl, byte [ebp - 0x34]
mov byte [eax + 0xb0], cl
mov edx, dword [ebp - 0x1c]
push edx
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004ba820
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506c24
jmp 0x506d99
mov edx, dword [ebp - 0x1c]
push edx
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004ba820
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506c4b
jmp 0x506d99
mov edx, dword [ebp + 0xc]
mov byte [edx + 0xb0], 0
mov eax, dword [ebp - 0x1c]
push eax
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004ba820
add esp, 0x10
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
and ecx, 0xfffffffb
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
cmp dword [ebp - 8], 0
je 0x506c8b
jmp 0x506d99
mov eax, dword [ebp - 0x1c]
push eax
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004ba820
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506cb2
jmp 0x506d99
mov dword [ebp - 0x14], 0
jmp 0x506cc4
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xa
jge 0x506d1a
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + 0x5b8158]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004e1130
add esp, 0xc
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + 0x5b8159]
add eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + 0x5b8158]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.004e3f90
add esp, 0xc
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506d18
jmp 0x506d99
jmp 0x506cbb
cmp dword [ebp + 0x14], 0
jne 0x506d33
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e0540
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506d3b
jmp 0x506d99
mov eax, dword [ebp - 0xc]
push eax
call fcn.004e0380
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x506d52
jmp 0x506d99
cmp dword [ebp + 0x14], 0
jne 0x506d71
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e1050
add esp, 4
push eax
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e3330
add esp, 8
cmp dword [ebp + 0x14], 0
jne 0x506d99
push 1
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004e11a0
add esp, 4
push eax
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e3480
add esp, 0x10
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov byte [eax + 0xb0], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x44]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x58]
mov dword [eax + 0x68], ecx
mov dword [eax + 0x6c], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x60]
mov dword [eax + 0x70], ecx
mov dword [eax + 0x74], edx
mov eax, dword [ebp + 0xc]
mov cl, byte [ebp - 1]
mov byte [eax + 0x5e], cl
push 1
push 0
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
push edx
call fcn.004e3480
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x55], 1
cmp dword [ebp - 0x18], 0
je 0x506e24
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
push edx
call fcn.004e0190
add esp, 4
mov eax, dword [ebp - 0x18]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0xc], 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.005054b0
add esp, 4
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret