Function at 0x52f450
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
push edi
mov edi, ecx
cmp byte [edi + 0x4f], 0
mov esi, eax
mov dword [ebp - 0x20], 0
jne 0x52f487
mov eax, dword [ebp + 8]
push str.cannot_VACUUM_from_within_a_transaction
push eax
mov eax, edi
call fcn.004c4520
add esp, 8
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xb0], 1
jle 0x52f4ae
mov ecx, dword [ebp + 8]
push str.cannot_VACUUM___SQL_statements_in_progress
push ecx
mov eax, edi
call fcn.004c4520
add esp, 8
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x10], edx
test eax, eax
je 0x52f500
movzx ecx, word [eax + 8]
and ecx, 0x3f
cmp byte [ecx + 0x5699b8], 3
je 0x52f4e9
mov edx, dword [ebp + 8]
push str.non_text_filename
push edx
mov eax, edi
call fcn.004c4520
add esp, 8
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
push eax
call fcn.004d26e0
mov ecx, dword [edi + 0x3c]
and ecx, 0xfffffffe
add esp, 4
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x52f505
mov eax, 0x54ecee
mov ecx, dword [edi + 0x20]
mov edx, dword [edi + 0x24]
push ebx
mov ebx, dword [edi + 0x18]
mov dword [edi + 0x24], edx
and dword [edi + 0x24], 0xfffffffe
mov dword [ebp - 0x1c], ebx
mov ebx, dword [edi + 0x64]
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x2c], ebx
mov ebx, dword [edi + 0x68]
or ecx, 0x201
mov dword [edi + 0x20], ecx
and dword [edi + 0x20], 0xefffafff
mov ecx, dword [edi + 0x10]
or edx, 6
mov dword [edi + 0x18], edx
mov dword [ebp - 0x30], ebx
mov bl, byte [edi + 0x58]
mov byte [edi + 0x58], 0
shl esi, 4
mov edx, dword [ecx + esi]
mov byte [ebp - 1], bl
mov ebx, dword [ecx + esi + 4]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], edx
mov edx, dword [ecx]
movzx ecx, byte [edx + 0xc]
mov edx, dword [edi + 0x14]
push eax
mov eax, dword [ebp + 8]
push str.ATTACH__Q_AS_vacuum_db
push eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], edx
call fcn.0052f400
mov ecx, dword [ebp - 0x10]
mov esi, eax
xor edx, edx
add esp, 0xc
mov dword [edi + 0x3c], ecx
cmp esi, edx
jne 0x52f823
mov eax, dword [ebp - 0x18]
shl eax, 4
add eax, dword [edi + 0x10]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], esi
cmp dword [ebp + 0xc], edx
je 0x52f600
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov eax, dword [ecx + 0x3c]
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], edx
mov ecx, dword [eax]
cmp ecx, edx
je 0x52f5fc
lea edx, [ebp - 0x14]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x52f5df
cmp dword [ebp - 0x10], eax
jl 0x52f5fc
jg 0x52f5df
cmp dword [ebp - 0x14], eax
jbe 0x52f5fc
mov ecx, dword [ebp + 8]
push str.output_file_already_exists
push ecx
mov eax, edi
mov esi, 1
call fcn.004c4520
add esp, 8
jmp 0x52f823
or dword [edi + 0x18], 8
mov eax, ebx
call fcn.004c0510
mov edx, dword [edi + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + edx + 0xc]
mov edx, dword [ecx + 0x50]
push edx
mov eax, esi
call fcn.004c0420
push 0
mov eax, ebx
call fcn.004c0470
push eax
mov eax, esi
call fcn.004c0470
push 0x21
mov eax, esi
call fcn.004c04c0
mov eax, dword [ebp + 8]
push str.BEGIN
push eax
push edi
call fcn.0052f310
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x52f823
mov ecx, dword [ebp + 0xc]
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
push eax
add ecx, 2
push ecx
push ebx
call fcn.005097d0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x52f823
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x52f685
mov dword [edi + 0x5c], esi
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebx + 4]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + 0x24]
push 0
push edx
push esi
call fcn.004fac60
add esp, 0xc
test eax, eax
jne 0x52f81e
cmp dword [ebp - 0x28], eax
jne 0x52f6c3
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [edi + 0x5c]
push esi
call fcn.004fac60
add esp, 0xc
test eax, eax
jne 0x52f81e
cmp byte [edi + 0x51], 0
jne 0x52f81e
mov al, byte [edi + 0x54]
test al, al
js 0x52f6d9
movsx eax, al
jmp 0x52f6e0
mov eax, ebx
call fcn.004c06a0
push eax
mov eax, esi
call fcn.004c0620
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 0x18]
push edx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push eax
mov byte [edi + 0xa4], cl
call fcn.0052f400
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x52f823
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
push ecx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push edx
call fcn.0052f400
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x52f823
mov ecx, dword [ebp + 8]
mov byte [edi + 0xa4], al
mov eax, dword [ebp - 0xc]
push eax
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ecx
call fcn.0052f400
and dword [edi + 0x18], 0xfffffffb
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x52f823
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
push edx
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push eax
call fcn.0052f400
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x52f823
mov dword [ebp - 0xc], esi
jmp 0x52f783
mov esi, dword [ebp - 0xc]
movzx edx, byte [esi + 0x56a6e8]
lea ecx, [ebp - 0x28]
push ecx
push edx
mov eax, ebx
call fcn.004c0750
movzx eax, byte [esi + 0x56a6e9]
add eax, dword [ebp - 0x28]
movzx ecx, byte [esi + 0x56a6e8]
mov edx, dword [ebp - 8]
push eax
push ecx
push edx
call fcn.004c5c90
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x52f823
mov eax, dword [ebp - 0xc]
add eax, 2
mov dword [ebp - 0xc], eax
cmp eax, 0xa
jl 0x52f780
cmp dword [ebp + 0xc], esi
jne 0x52f7e0
mov eax, dword [ebp - 8]
push ebx
call fcn.0051baf0
mov esi, eax
add esp, 4
test esi, esi
jne 0x52f823
mov eax, dword [ebp - 8]
call fcn.00511540
mov esi, eax
test esi, esi
jne 0x52f823
cmp dword [ebp + 0xc], eax
jne 0x52f823
mov esi, dword [ebp - 8]
mov eax, esi
call fcn.004c06a0
push eax
mov eax, ebx
call fcn.004c0620
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x24]
push 1
push ecx
push ebx
call fcn.004fac60
add esp, 0x10
mov esi, eax
jmp 0x52f823
mov esi, 7
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x30]
push 1
mov dword [edi + 0x18], edx
mov edx, dword [ebp - 0x2c]
mov dword [edi + 0x24], ecx
mov cl, byte [ebp - 1]
mov dword [edi + 0x68], eax
push 0
push ebx
or eax, 0xffffffff
mov byte [edi + 0xa4], 0
mov dword [edi + 0x64], edx
mov byte [edi + 0x58], cl
call fcn.004fac60
mov ebx, dword [ebp - 0x20]
add esp, 0xc
mov byte [edi + 0x4f], 1
test ebx, ebx
je 0x52f879
mov eax, dword [ebx + 4]
call fcn.00515650
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], eax
mov eax, edi
call fcn.004dbf20
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret