Function at 0x497280
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x20], 0
mov ebx, ecx
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], ebx
cmp byte [edi + 0x55], 0
jne 0x4972f3
push 0
push 0x28
mov ecx, edi
call fcn.00413890
mov esi, eax
add esp, 8
test esi, esi
je 0x4972da
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x50562c]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x50563c]
movq qword [esi + 0x20], xmm0
push dword [ebx]
push edi
call fcn.00413560
add esp, 8
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xbc], 1
jle 0x497346
push 0
push 0x2b
mov ecx, edi
call fcn.00413890
mov esi, eax
add esp, 8
test esi, esi
je 0x4972da
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x505654]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x505664]
movq qword [esi + 0x20], xmm0
mov ax, word [0x50566c]
mov word [esi + 0x28], ax
mov al, byte [0x50566e]
mov byte [esi + 0x2a], al
jmp 0x4972da
mov edx, dword [ebp + 0xc]
mov esi, dword [edi + 0x3c]
mov dword [ebp - 0x10], esi
test edx, edx
je 0x4973ed
movzx ecx, word [edx + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x4fd318], 3
je 0x49739b
push 0
push 0x12
mov ecx, edi
call fcn.00413890
mov esi, eax
add esp, 8
test esi, esi
je 0x4972da
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x505680]
mov word [esi + 0x10], cx
jmp 0x4972da
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4973bf
cmp byte [edx + 0x12], 1
jne 0x4973bf
mov edx, dword [edx + 8]
mov eax, esi
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4973f2
test cl, 1
je 0x4973d3
mov eax, esi
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4973f2
mov ecx, dword [ebp + 0xc]
mov dl, 1
call fcn.00436800
mov edx, eax
mov eax, dword [edi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4973f2
mov edx, 0x4ff790
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
mov ebx, dword [edi + 0x68]
mov esi, dword [edi + 0x24]
mov dword [ebp - 0x30], ecx
and ecx, 0xefffafff
mov dword [ebp - 0x38], ebx
or ecx, 0x201
mov ebx, dword [edi + 0x6c]
mov dword [edi + 0x20], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2c], eax
or eax, 6
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [edi + 0x70]
shl ecx, 4
mov dword [ebp - 0x40], ebx
mov ebx, dword [edi + 0x74]
mov dword [ebp - 0x34], esi
and esi, 0xfffffffe
mov dword [edi + 0x24], esi
mov dword [ebp - 0x44], ebx
mov bl, byte [edi + 0x5e]
mov byte [edi + 0x5e], 0
mov esi, dword [ecx + eax]
mov dword [ebp - 0x14], esi
mov esi, dword [ecx + eax + 4]
mov byte [ebp - 1], bl
mov ebx, dword [ebp - 0xc]
mov dword [ebp + 8], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x497472
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x18], 0
je 0x497479
mov dword [ebp - 0x18], 1
mov eax, dword [edi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push ebx
push edi
mov dword [ebp - 0x1c], eax
call fcn.00497090
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x49797a
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [edi + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x20], eax
mov ebx, dword [eax + 4]
je 0x497566
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x28], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x49754c
lea edx, [ebp - 0x28]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4974eb
cmp dword [ebp - 0x24], eax
jl 0x49754c
jg 0x4974eb
cmp dword [ebp - 0x28], eax
jbe 0x49754c
push 0
push 0x1b
mov ecx, edi
mov ebx, 1
call fcn.00413890
mov edx, eax
add esp, 8
mov dword [ebp - 0x1c], edx
test edx, edx
je 0x497531
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x5056ac]
movq qword [edx + 0x10], xmm0
mov cx, word [0x5056b4]
mov word [edx + 0x18], cx
mov al, byte [0x5056b6]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0xc]
push dword [eax]
push edi
call fcn.00413560
mov eax, dword [ebp - 0xc]
add esp, 8
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
jmp 0x49797a
mov eax, dword [edi + 0x10]
mov ecx, dword [ebp + 8]
or dword [edi + 0x18], 8
movzx ecx, byte [ecx + eax + 8]
mov eax, dword [edi + 0x20]
and eax, 0x38
or ecx, eax
mov dword [ebp - 8], ecx
mov cl, byte [esi + 9]
test cl, cl
je 0x497580
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x497580
mov ecx, esi
call fcn.004277e0
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
movzx edx, byte [eax + 0x16]
mov dword [ebp - 0x24], edx
mov edx, dword [eax + 0x24]
sub edx, dword [eax + 0x28]
mov dword [ebp - 0x10], edx
test cl, cl
je 0x4975a7
add dword [esi + 0xc], 0xffffffff
jne 0x4975a7
mov ecx, esi
call fcn.004277c0
mov edx, dword [ebp - 0x10]
cmp dword [ebp - 0x24], edx
mov eax, dword [edi + 0x10]
cmovg edx, dword [ebp - 0x24]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], edx
mov edx, dword [ecx + eax + 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x50]
call fcn.00429f60
xor edx, edx
mov ecx, esi
call fcn.0042a000
mov edx, eax
mov ecx, ebx
call fcn.0042a000
cmp byte [ebx + 9], 0
mov eax, dword [ebx + 4]
mov dword [ebp - 0x24], eax
je 0x4975f3
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4975f3
mov ecx, ebx
call fcn.004277e0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 8]
or edx, 0x20
mov ecx, dword [ecx]
call fcn.00421710
cmp byte [ebx + 9], 0
je 0x497616
add dword [ebx + 0xc], 0xffffffff
jne 0x497616
mov ecx, ebx
call fcn.004277c0
mov edx, dword [ebp - 0xc]
mov ecx, edi
push str.BEGIN
call fcn.00496fa0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
xor edx, edx
mov ecx, esi
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.0042a6e0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
mov edx, dword [esi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x497671
cmp dword [ebp + 0xc], 0
jne 0x497671
mov dword [edi + 0x64], 0
mov edx, dword [esi + 4]
mov edx, dword [edx + 0x24]
mov ecx, ebx
push 0
push dword [ebp - 0x10]
call fcn.0042a0c0
add esp, 8
test eax, eax
jne 0x497970
cmp dword [ebp - 0x18], eax
jne 0x4976a9
mov edx, dword [edi + 0x64]
mov ecx, ebx
push eax
push dword [ebp - 0x10]
call fcn.0042a0c0
add esp, 8
test eax, eax
jne 0x497970
cmp byte [edi + 0x57], 0
jne 0x497970
mov al, byte [edi + 0x5a]
test al, al
js 0x4976bf
movsx edx, al
jmp 0x49770b
mov cl, byte [esi + 9]
test cl, cl
je 0x4976d9
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4976d9
mov ecx, esi
call fcn.004277e0
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4976eb
mov dword [ebp - 0x18], 0
jmp 0x4976f7
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x18], eax
test cl, cl
je 0x497708
add dword [esi + 0xc], 0xffffffff
jne 0x497708
mov ecx, esi
call fcn.004277c0
mov edx, dword [ebp - 0x18]
mov ecx, ebx
call fcn.0042a200
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 0xc]
mov byte [edi + 0xb0], al
push edi
call fcn.00497090
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
push dword [ebp - 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0xc]
push edi
call fcn.00497090
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
push dword [ebp - 0x14]
mov byte [edi + 0xb0], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
push dword [ebp - 0xc]
push edi
call fcn.00497090
and dword [edi + 0x18], 0xfffffffb
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
push dword [ebp - 0x14]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 0xc]
push edi
call fcn.00497090
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
mov dword [ebp - 0x14], eax
nop dword [eax]
nop dword [eax + eax]
movzx edx, byte [eax + 0x4f8744]
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4977e0
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4977e0
mov ecx, esi
call fcn.004277e0
mov cl, byte [esi + 9]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
cmp edx, 0xf
jne 0x4977ef
mov eax, dword [eax]
mov eax, dword [eax + 0x6c]
add eax, dword [esi + 0x14]
jmp 0x4977fb
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + edx*4 + 0x24]
bswap eax
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x49780f
add dword [esi + 0xc], 0xffffffff
jne 0x49780f
mov ecx, esi
call fcn.004277c0
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x4f8745]
add eax, dword [ebp - 0x1c]
movzx edx, byte [ecx + 0x4f8744]
mov ecx, ebx
push eax
call fcn.00432ed0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x14], eax
cmp eax, 0xa
jl 0x4977b0
cmp dword [ebp + 0xc], 0
jne 0x497865
mov edx, ebx
mov ecx, esi
call fcn.00434fb0
mov dword [ebp - 8], eax
test eax, eax
jne 0x497977
cmp byte [ebx + 9], 0
je 0x49787b
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x49787b
mov ecx, ebx
call fcn.004277e0
xor edx, edx
mov ecx, ebx
call fcn.0042b660
mov dword [ebp - 8], eax
test eax, eax
jne 0x497897
xor edx, edx
mov ecx, ebx
call fcn.0042b860
mov dword [ebp - 8], eax
cmp byte [ebx + 9], 0
je 0x4978aa
add dword [ebx + 0xc], 0xffffffff
jne 0x4978aa
mov ecx, ebx
call fcn.004277c0
cmp dword [ebp - 8], 0
jne 0x497977
cmp dword [ebp + 0xc], 0
jne 0x497977
mov cl, byte [ebx + 9]
test cl, cl
je 0x4978d8
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4978d8
mov ecx, ebx
call fcn.004277e0
mov cl, byte [ebx + 9]
mov edx, dword [ebx + 4]
cmp byte [edx + 0x11], 0
jne 0x4978ea
mov dword [ebp - 0x1c], 0
jmp 0x4978f6
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x497907
add dword [ebx + 0xc], 0xffffffff
jne 0x497907
mov ecx, ebx
call fcn.004277c0
mov edx, dword [ebp - 0x1c]
mov ecx, esi
call fcn.0042a200
mov cl, byte [ebx + 9]
test cl, cl
je 0x49792b
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x49792b
mov ecx, ebx
call fcn.004277e0
mov cl, byte [ebx + 9]
mov edx, dword [ebx + 4]
movzx eax, byte [edx + 0x16]
mov dword [ebp - 0x1c], eax
mov eax, dword [edx + 0x24]
sub eax, dword [edx + 0x28]
mov dword [ebp - 0x24], eax
test cl, cl
je 0x497955
add dword [ebx + 0xc], 0xffffffff
jne 0x497955
mov ecx, ebx
call fcn.004277c0
mov edx, dword [ebx + 4]
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x1c], eax
mov ecx, esi
mov edx, dword [edx + 0x24]
cmovg eax, dword [ebp - 0x1c]
push 1
push eax
call fcn.0042a0c0
add esp, 8
mov ebx, eax
jmp 0x49797a
mov ebx, 7
jmp 0x49797a
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x38]
mov dword [edi + 0x68], eax
mov eax, dword [ebp - 0x3c]
mov dword [edi + 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x70], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 0x74], eax
mov al, byte [ebp - 1]
push 1
push 0
mov byte [edi + 0xb0], 0
mov byte [edi + 0x5e], al
call fcn.0042a0c0
mov esi, dword [ebp - 0x20]
add esp, 8
mov byte [edi + 0x55], 1
test esi, esi
je 0x4979e3
mov ecx, dword [esi + 4]
call fcn.00429e00
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.00460830
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret