Function at 0x4a50d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x24], 0
mov ebx, ecx
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], ebx
cmp byte [edi + 0x55], 0
jne 0x4a5145
push 0
push 0x28
mov ecx, edi
call fcn.00411a60
mov esi, eax
add esp, 8
test esi, esi
je 0x4a512a
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x691844]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x691854]
movq qword [esi + 0x20], xmm0
mov edx, dword [ebx]
test edx, edx
je 0x4a5137
mov ecx, edi
call fcn.004115d0
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 0x4a5198
push 0
push 0x2b
mov ecx, edi
call fcn.00411a60
mov esi, eax
add esp, 8
test esi, esi
je 0x4a512a
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x69186c]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x69187c]
movq qword [esi + 0x20], xmm0
mov ax, word [0x691884]
mov word [esi + 0x28], ax
mov al, byte [0x691886]
mov byte [esi + 0x2a], al
jmp 0x4a512a
mov esi, dword [ebp + 0xc]
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x14], eax
test esi, esi
je 0x4a5240
movzx ecx, word [esi + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x697838], 3
je 0x4a51ed
push 0
push 0x12
mov ecx, edi
call fcn.00411a60
mov esi, eax
add esp, 8
test esi, esi
je 0x4a512a
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x691898]
mov word [esi + 0x10], cx
jmp 0x4a512a
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4a5212
cmp byte [esi + 0x12], 1
jne 0x4a5212
mov ecx, dword [edi + 0x3c]
mov edx, dword [esi + 8]
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4a5245
test cl, 1
je 0x4a5227
mov ecx, dword [edi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4a5245
mov dl, 1
mov ecx, esi
call fcn.0043abf0
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4a5245
mov edx, 0x688421
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
mov ebx, dword [edi + 0x68]
mov esi, dword [edi + 0x24]
mov dword [ebp - 0x38], ecx
and ecx, 0xefffafff
mov dword [ebp - 0x40], ebx
or ecx, 0x201
mov ebx, dword [edi + 0x6c]
mov dword [edi + 0x20], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x34], eax
or eax, 6
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x44], ebx
mov ebx, dword [edi + 0x70]
shl ecx, 4
mov dword [ebp - 0x48], ebx
mov ebx, dword [edi + 0x74]
mov dword [ebp - 0x3c], esi
and esi, 0xfffffffe
mov dword [edi + 0x24], esi
mov dword [ebp - 0x4c], ebx
mov bl, byte [edi + 0x5e]
mov byte [edi + 0x5e], 0
mov esi, dword [eax + ecx]
mov dword [ebp - 0x18], esi
mov esi, dword [eax + ecx + 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 0x4a52c5
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x1c], 0
je 0x4a52cc
mov dword [ebp - 0x1c], 1
mov eax, dword [edi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push ebx
push edi
mov dword [ebp - 0x20], eax
call fcn.004a4ed0
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x4a581f
mov eax, dword [ebp - 0x20]
shl eax, 4
add eax, dword [edi + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x24], eax
mov ebx, dword [eax + 4]
lea eax, [ebx + 4]
mov dword [ebp - 0x10], eax
je 0x4a53c8
mov eax, dword [eax]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x30], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4a53ac
lea edx, [ebp - 0x30]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4a5347
cmp dword [ebp - 0x2c], eax
jl 0x4a53ac
jg 0x4a5347
cmp dword [ebp - 0x30], eax
jbe 0x4a53ac
push 0
push 0x1b
mov ecx, edi
mov ebx, 1
call fcn.00411a60
mov edx, eax
add esp, 8
mov dword [ebp - 0x20], edx
test edx, edx
je 0x4a538d
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x6918c4]
movq qword [edx + 0x10], xmm0
mov cx, word [0x6918cc]
mov word [edx + 0x18], cx
mov al, byte [0x6918ce]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
test ecx, ecx
je 0x4a53a5
mov edx, ecx
mov ecx, edi
call fcn.004115d0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x4a581f
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
jmp 0x4a53cb
mov dword [ebp - 0x10], eax
cmp byte [esi + 9], 0
je 0x4a53e1
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a53e1
mov ecx, esi
call fcn.0042a6b0
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
cmp byte [esi + 9], 0
movzx edx, byte [eax + 0x16]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], ecx
je 0x4a540d
add dword [esi + 0xc], 0xffffffff
jne 0x4a540d
mov ecx, esi
call fcn.0042a690
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edi + 0x10]
cmp edx, ecx
cmovg ecx, edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax + 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x50]
call fcn.0042d510
xor edx, edx
mov ecx, esi
call fcn.0042d5b0
mov edx, eax
mov ecx, ebx
call fcn.0042d5b0
cmp byte [ebx + 9], 0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
mov dword [ebp - 0x2c], eax
je 0x4a5459
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a5459
mov ecx, ebx
call fcn.0042a6b0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 8]
or edx, 0x20
mov ecx, dword [ecx]
call fcn.00422fd0
cmp byte [ebx + 9], 0
je 0x4a547c
add dword [ebx + 0xc], 0xffffffff
jne 0x4a547c
mov ecx, ebx
call fcn.0042a690
mov edx, dword [ebp - 0xc]
mov ecx, edi
push str.BEGIN
call fcn.004a4cf0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
mov ecx, dword [ebp + 0xc]
xor edx, edx
test ecx, ecx
mov eax, 2
cmove edx, eax
cmp byte [esi + 9], 0
jne 0x4a54c1
mov al, byte [esi + 8]
test al, al
je 0x4a54c1
cmp al, 1
jne 0x4a553e
test ecx, ecx
jne 0x4a54db
push 0
mov ecx, esi
call fcn.0042dc60
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4a54ed
test ecx, ecx
jne 0x4a54ed
mov dword [edi + 0x64], ecx
mov eax, dword [esi + 4]
mov ecx, ebx
push 0
push dword [ebp - 0x14]
mov edx, dword [eax + 0x24]
call fcn.0042d690
add esp, 8
test eax, eax
jne 0x4a5815
cmp dword [ebp - 0x1c], eax
jne 0x4a5528
mov edx, dword [edi + 0x64]
mov ecx, ebx
push eax
push dword [ebp - 0x14]
call fcn.0042d690
add esp, 8
test eax, eax
jne 0x4a5815
cmp byte [edi + 0x57], 0
jne 0x4a5815
mov al, byte [edi + 0x5a]
test al, al
js 0x4a556b
movsx edx, al
jmp 0x4a55b7
test ecx, ecx
jne 0x4a54db
mov eax, dword [esi]
mov edx, dword [eax + 0x1f8]
mov eax, dword [esi + 4]
mov ecx, dword [eax]
cmp edx, dword [ecx + 0x68]
jle 0x4a5564
cmp byte [ecx + 6], 0
je 0x4a5564
call fcn.00425a20
jmp 0x4a54cd
xor eax, eax
jmp 0x4a54cd
mov cl, byte [esi + 9]
test cl, cl
je 0x4a5585
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a5585
mov ecx, esi
call fcn.0042a6b0
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4a5597
mov dword [ebp - 0x1c], 0
jmp 0x4a55a3
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4a55b4
add dword [esi + 0xc], 0xffffffff
jne 0x4a55b4
mov ecx, esi
call fcn.0042a690
mov edx, dword [ebp - 0x1c]
mov ecx, ebx
call fcn.0042d7d0
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
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.004a4ed0
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
push dword [ebp - 0x18]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0xc]
push edi
call fcn.004a4ed0
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
push dword [ebp - 0x18]
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.004a4ed0
and dword [edi + 0x18], 0xfffffffb
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
push dword [ebp - 0x18]
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.004a4ed0
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
mov dword [ebp - 0x18], eax
movzx edx, byte [eax + 0x692c34]
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x20], eax
test cl, cl
je 0x4a5680
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a5680
mov ecx, esi
call fcn.0042a6b0
mov cl, byte [esi + 9]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x20]
cmp edx, 0xf
jne 0x4a568f
mov eax, dword [eax]
mov eax, dword [eax + 0x6c]
add eax, dword [esi + 0x14]
jmp 0x4a569b
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + edx*4 + 0x24]
bswap eax
mov dword [ebp - 0x20], eax
test cl, cl
je 0x4a56af
add dword [esi + 0xc], 0xffffffff
jne 0x4a56af
mov ecx, esi
call fcn.0042a690
mov ecx, dword [ebp - 0x18]
movzx eax, byte [ecx + 0x692c35]
add eax, dword [ebp - 0x20]
movzx edx, byte [ecx + 0x692c34]
mov ecx, ebx
push eax
call fcn.00436e50
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
cmp eax, 0xa
jl 0x4a5650
cmp dword [ebp + 0xc], 0
jne 0x4a5705
mov edx, ebx
mov ecx, esi
call fcn.00439320
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a581c
cmp byte [ebx + 9], 0
je 0x4a571b
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a571b
mov ecx, ebx
call fcn.0042a6b0
xor edx, edx
mov ecx, ebx
call fcn.0042ec40
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a5737
xor edx, edx
mov ecx, ebx
call fcn.0042ee40
mov dword [ebp - 8], eax
cmp byte [ebx + 9], 0
je 0x4a574a
add dword [ebx + 0xc], 0xffffffff
jne 0x4a574a
mov ecx, ebx
call fcn.0042a690
cmp dword [ebp - 8], 0
jne 0x4a581c
cmp dword [ebp + 0xc], 0
jne 0x4a581c
mov cl, byte [ebx + 9]
test cl, cl
je 0x4a5778
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a5778
mov ecx, ebx
call fcn.0042a6b0
mov cl, byte [ebx + 9]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
cmp byte [edx + 0x11], 0
jne 0x4a578c
mov dword [ebp - 0x20], 0
jmp 0x4a5798
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x20], eax
test cl, cl
je 0x4a57a9
add dword [ebx + 0xc], 0xffffffff
jne 0x4a57a9
mov ecx, ebx
call fcn.0042a690
mov edx, dword [ebp - 0x20]
mov ecx, esi
call fcn.0042d7d0
cmp byte [ebx + 9], 0
je 0x4a57c9
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a57c9
mov ecx, ebx
call fcn.0042a6b0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
cmp byte [ebx + 9], 0
movzx edx, byte [eax + 0x16]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x2c], ecx
je 0x4a57f7
add dword [ebx + 0xc], 0xffffffff
jne 0x4a57f7
mov ecx, ebx
call fcn.0042a690
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
cmp edx, ecx
push 1
cmovg ecx, edx
push ecx
mov eax, dword [eax]
mov ecx, esi
mov edx, dword [eax + 0x24]
call fcn.0042d690
add esp, 8
mov ebx, eax
jmp 0x4a581f
mov ebx, 7
jmp 0x4a581f
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x34]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x38]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x3c]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x40]
mov dword [edi + 0x68], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 0x6c], eax
mov eax, dword [ebp - 0x48]
mov dword [edi + 0x70], eax
mov eax, dword [ebp - 0x4c]
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.0042d690
mov esi, dword [ebp - 0x24]
add esp, 8
mov byte [edi + 0x55], 1
test esi, esi
je 0x4a5888
mov ecx, dword [esi + 4]
call fcn.0042d300
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.00467e60
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret