Function at 0x4a87d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
mov ebx, edx
mov dword [esp + 0x2c], 0
push esi
mov esi, ecx
push edi
cmp byte [ebx + 0x4f], 0
mov dword [esp + 0x14], esi
jne 0x4a883d
mov edx, dword [esi]
mov ecx, ebx
call fcn.00431ae0
push 0
push 0x28
mov ecx, ebx
call fcn.00431de0
add esp, 8
test eax, eax
je 0x4a882f
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [eax], xmm0
movups xmm0, xmmword [0x518210]
movups xmmword [eax + 0x10], xmm0
movq xmm0, qword [0x518220]
movq qword [eax + 0x20], xmm0
mov dword [esi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0xb0], 1
jle 0x4a88a5
mov edx, dword [esi]
mov ecx, ebx
call fcn.00431ae0
push 0
push 0x2b
mov ecx, ebx
call fcn.00431de0
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4a8897
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [0x518250]
movups xmmword [ecx + 0x10], xmm0
movq xmm0, qword [0x518260]
movq qword [ecx + 0x20], xmm0
mov ax, word [0x518268]
mov word [ecx + 0x28], ax
mov al, byte [0x51826a]
mov byte [ecx + 0x2a], al
mov dword [esi], ecx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov edi, dword [ebx + 0x3c]
mov dword [esp + 0x20], edi
test edx, edx
je 0x4a8959
movzx ecx, word [edx + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x50c040], 3
je 0x4a8907
mov edx, dword [esi]
mov ecx, ebx
call fcn.00431ae0
push 0
push 0x12
mov ecx, ebx
call fcn.00431de0
add esp, 8
test eax, eax
je 0x4a88f9
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x51823c]
mov word [eax + 0x10], cx
mov dword [esi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4a892b
cmp byte [edx + 0xa], 1
jne 0x4a892b
mov edx, dword [edx + 0x10]
mov eax, edi
and eax, 0xfffffffe
or eax, 6
mov dword [ebx + 0x3c], eax
jmp 0x4a895e
test cl, 1
je 0x4a893f
mov eax, edi
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [ebx + 0x3c], eax
jmp 0x4a895e
mov ecx, dword [ebp + 0xc]
mov dl, 1
call fcn.00452710
mov edx, eax
mov eax, dword [ebx + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [ebx + 0x3c], eax
jmp 0x4a895e
mov edx, 0x50df2b
mov ecx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x18]
mov edi, dword [ebx + 0x24]
mov dword [esp + 0x30], ecx
mov cl, byte [ebx + 0x58]
mov esi, dword [ebx + 0x64]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x38], eax
and ecx, 0xefffafff
or eax, 6
mov dword [esp + 0x3c], edi
mov dword [ebx + 0x18], eax
or ecx, 0x201
mov eax, dword [ebx + 0x10]
and edi, 0xfffffffe
mov dword [ebx + 0x20], ecx
mov ecx, dword [ebp + 8]
shl ecx, 4
mov dword [ebx + 0x24], edi
mov byte [ebx + 0x58], 0
push edx
mov edi, dword [ecx + eax]
mov dword [esp + 0x20], edi
mov edi, dword [ecx + eax + 4]
mov dword [esp + 0x44], esi
mov esi, dword [ebx + 0x68]
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [edi + 4]
mov dword [esp + 0x4c], esi
mov esi, dword [esp + 0x1c]
push esi
mov eax, dword [eax]
push ebx
mov dword [ebp + 8], ecx
mov al, byte [eax + 0xc]
mov byte [esp + 0x1e], al
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x3c], eax
call fcn.004a85e0
mov esi, eax
add esp, 0x10
mov eax, dword [esp + 0x20]
mov dword [ebx + 0x3c], eax
test esi, esi
jne 0x4a8f45
mov eax, dword [esp + 0x2c]
shl eax, 4
add eax, dword [ebx + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x34], eax
mov esi, dword [eax + 4]
mov dword [esp + 0x10], esi
je 0x4a8abb
mov eax, dword [esi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [esp + 0x20], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4a8ab7
mov esi, dword [ecx + 0x18]
lea edx, [esp + 0x20]
push edx
push eax
mov ecx, esi
call dword [0x4f4350]
call esi
add esp, 8
test eax, eax
jne 0x4a8a5c
cmp dword [esp + 0x24], eax
jl 0x4a8ab7
jg 0x4a8a5c
cmp dword [esp + 0x20], eax
jbe 0x4a8ab7
mov edx, dword [esp + 0x14]
mov ecx, ebx
mov esi, 1
mov edx, dword [edx]
call fcn.00431ae0
push 0
push 0x1b
mov ecx, ebx
call fcn.00431de0
mov edx, eax
add esp, 8
test edx, edx
je 0x4a8aac
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x51827c]
movq qword [edx + 0x10], xmm0
mov cx, word [0x518284]
mov word [edx + 0x18], cx
mov al, byte [0x518286]
mov byte [edx + 0x1a], al
mov eax, dword [esp + 0x14]
mov dword [eax], edx
jmp 0x4a8f45
or dword [ebx + 0x18], 8
mov cl, byte [edi + 9]
test cl, cl
je 0x4a8ad5
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a8ad5
mov ecx, edi
call fcn.004447d0
mov cl, byte [edi + 9]
mov eax, dword [edi + 4]
mov esi, dword [eax + 0x24]
sub esi, dword [eax + 0x28]
movzx edx, byte [eax + 0x16]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x10]
mov dword [esp + 0x20], edx
test cl, cl
je 0x4a8b03
add dword [edi + 0xc], 0xffffffff
jne 0x4a8b03
mov ecx, edi
call fcn.004447a0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
mov ecx, esi
cmp edx, eax
cmovg eax, edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x10]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.00446df0
mov cl, byte [edi + 9]
mov eax, dword [edi + 4]
mov dword [esp + 0x20], eax
mov byte [esp + 0xd], cl
test cl, cl
je 0x4a8b55
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
mov byte [esp + 0xd], cl
jne 0x4a8b55
mov ecx, edi
call fcn.004447d0
mov al, byte [edi + 9]
mov byte [esp + 0xd], al
mov eax, dword [esp + 0x20]
mov eax, dword [eax]
mov ecx, dword [eax + 0xd4]
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x10]
test eax, eax
jns 0x4a8b8e
mov eax, dword [ecx + 0x1c]
add eax, dword [ecx + 0x18]
cdq
mov esi, eax
mov eax, ecx
push edx
mov edx, 0xfffffc00
push esi
mov eax, dword [eax + 0x10]
imul edx
push edx
push eax
call fcn.004ccaa0
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx + 0x14]
cmp eax, ecx
cmovge ecx, eax
cmp byte [esp + 0xd], 0
mov dword [esp + 0x20], ecx
je 0x4a8bb2
add dword [edi + 0xc], 0xffffffff
jne 0x4a8bb2
mov ecx, edi
call fcn.004447a0
mov ecx, dword [esp + 0x20]
mov edx, ecx
mov ecx, esi
call fcn.00446e80
cmp byte [esi + 9], 0
mov eax, dword [esi + 4]
mov dword [esp + 0x20], eax
je 0x4a8bdc
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a8bdc
mov ecx, esi
call fcn.004447d0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
xor edx, edx
mov word [ecx + 7], 1
mov byte [ecx + 9], 0
mov word [ecx + 0xa], 0
cmp byte [ecx + 8], dl
movzx eax, byte [ecx + 0xb]
cmovne eax, edx
and byte [ecx + 0x14], 0xfe
mov byte [ecx + 0xb], al
cmp byte [esi + 9], dl
je 0x4a8c13
add dword [esi + 0xc], 0xffffffff
jne 0x4a8c13
mov ecx, esi
call fcn.004447a0
mov edx, dword [esp + 0x14]
mov ecx, ebx
push str.BEGIN
call fcn.004a8500
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
xor edx, edx
mov ecx, edi
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00447600
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
mov edx, dword [edi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4a8c6b
mov dword [ebx + 0x5c], 0
mov edx, dword [edi + 4]
mov edx, dword [edx + 0x24]
mov ecx, esi
push 0
push dword [esp + 0x1c]
call fcn.00447000
add esp, 8
test eax, eax
jne 0x4a8f3a
cmp byte [esp + 0xe], al
jne 0x4a8ca6
mov edx, dword [ebx + 0x5c]
mov ecx, esi
push eax
push dword [esp + 0x1c]
call fcn.00447000
add esp, 8
test eax, eax
jne 0x4a8f3a
cmp byte [ebx + 0x51], 0
jne 0x4a8f3a
mov al, byte [ebx + 0x54]
test al, al
js 0x4a8cbc
movsx edx, al
jmp 0x4a8d0b
mov cl, byte [edi + 9]
test cl, cl
je 0x4a8cd6
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a8cd6
mov ecx, edi
call fcn.004447d0
mov cl, byte [edi + 9]
mov edx, dword [edi + 4]
cmp byte [edx + 0x11], 0
jne 0x4a8ce9
mov dword [esp + 0x20], 0
jmp 0x4a8cf6
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x20], eax
test cl, cl
je 0x4a8d07
add dword [edi + 0xc], 0xffffffff
jne 0x4a8d07
mov ecx, edi
call fcn.004447a0
mov edx, dword [esp + 0x20]
mov ecx, esi
call fcn.00447120
push dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [esp + 0x1c]
mov byte [ebx + 0xa4], al
push ebx
call fcn.004a85e0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
push dword [esp + 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [esp + 0x1c]
push ebx
call fcn.004a85e0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
push dword [esp + 0x1c]
mov byte [ebx + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push dword [esp + 0x1c]
push ebx
call fcn.004a85e0
and dword [ebx + 0x18], 0xfffffffb
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
push dword [esp + 0x1c]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [esp + 0x1c]
push ebx
call fcn.004a85e0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
mov dword [esp + 0x1c], eax
movzx edx, byte [eax + 0x507a88]
mov cl, byte [edi + 9]
mov eax, dword [edi + 4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x20], eax
test cl, cl
je 0x4a8de6
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a8de6
mov ecx, edi
call fcn.004447d0
mov cl, byte [edi + 9]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
cmp edx, 0xf
jne 0x4a8df5
mov eax, dword [eax]
mov eax, dword [eax + 0x64]
add eax, dword [edi + 0x14]
jmp 0x4a8e01
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + edx*4 + 0x24]
bswap eax
mov dword [esp + 0x2c], eax
test cl, cl
je 0x4a8e16
add dword [edi + 0xc], 0xffffffff
jne 0x4a8e16
mov ecx, edi
call fcn.004447a0
mov ecx, dword [esp + 0x1c]
movzx eax, byte [ecx + 0x507a89]
add eax, dword [esp + 0x2c]
movzx edx, byte [ecx + 0x507a88]
mov ecx, esi
push eax
call fcn.0044f150
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x1c], eax
cmp eax, 0xa
jl 0x4a8db2
cmp dword [ebp + 0xc], 0
jne 0x4a8e72
mov edx, esi
mov ecx, edi
call fcn.00451360
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8f41
cmp byte [esi + 9], 0
je 0x4a8e88
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a8e88
mov ecx, esi
call fcn.004447d0
xor edx, edx
mov ecx, esi
call fcn.00448490
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4a8ea6
xor edx, edx
mov ecx, esi
call fcn.00448630
mov dword [esp + 0x10], eax
cmp byte [esi + 9], 0
je 0x4a8eb9
add dword [esi + 0xc], 0xffffffff
jne 0x4a8eb9
mov ecx, esi
call fcn.004447a0
cmp dword [esp + 0x10], 0
jne 0x4a8f41
cmp dword [ebp + 0xc], 0
jne 0x4a8f41
mov cl, byte [esi + 9]
test cl, cl
je 0x4a8ee4
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a8ee4
mov ecx, esi
call fcn.004447d0
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4a8ef7
mov dword [esp + 0x2c], 0
jmp 0x4a8f04
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x2c], eax
test cl, cl
je 0x4a8f15
add dword [esi + 0xc], 0xffffffff
jne 0x4a8f15
mov ecx, esi
call fcn.004447a0
mov edx, dword [esp + 0x2c]
mov ecx, edi
call fcn.00447120
mov eax, dword [esi + 4]
mov ecx, edi
push 1
push dword [esp + 0x1c]
mov edx, dword [eax + 0x24]
call fcn.00447000
add esp, 8
mov esi, eax
jmp 0x4a8f45
mov esi, 7
jmp 0x4a8f45
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
or edx, 0xffffffff
mov dword [ebx + 0x18], eax
mov ecx, edi
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x64], eax
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x68], eax
mov al, byte [esp + 0xf]
push 1
push 0
mov byte [ebx + 0xa4], 0
mov byte [ebx + 0x58], al
call fcn.00447000
mov edi, dword [esp + 0x3c]
add esp, 8
mov byte [ebx + 0x4f], 1
test edi, edi
je 0x4a8fa9
mov ecx, dword [edi + 4]
call fcn.00446c30
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov ecx, ebx
call fcn.00478ca0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret