Function at 0x4c51a0
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 0x4c5215
push 0
push 0x28
mov ecx, edi
call fcn.0043b7c0
mov esi, eax
add esp, 8
test esi, esi
je 0x4c51fa
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x5c6dec]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x5c6dfc]
movq qword [esi + 0x20], xmm0
mov edx, dword [ebx]
test edx, edx
je 0x4c5207
mov ecx, edi
call fcn.0043b330
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 0x4c5268
push 0
push 0x2b
mov ecx, edi
call fcn.0043b7c0
mov esi, eax
add esp, 8
test esi, esi
je 0x4c51fa
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x5c6e14]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x5c6e24]
movq qword [esi + 0x20], xmm0
mov ax, word [0x5c6e2c]
mov word [esi + 0x28], ax
mov al, byte [0x5c6e2e]
mov byte [esi + 0x2a], al
jmp 0x4c51fa
mov esi, dword [ebp + 0xc]
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x10], eax
test esi, esi
je 0x4c5310
movzx ecx, word [esi + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x5b74a8], 3
je 0x4c52bd
push 0
push 0x12
mov ecx, edi
call fcn.0043b7c0
mov esi, eax
add esp, 8
test esi, esi
je 0x4c51fa
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x5c6e40]
mov word [esi + 0x10], cx
jmp 0x4c51fa
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4c52e2
cmp byte [esi + 0x12], 1
jne 0x4c52e2
mov ecx, dword [edi + 0x3c]
mov edx, dword [esi + 8]
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4c5315
test cl, 1
je 0x4c52f7
mov ecx, dword [edi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4c5315
mov dl, 1
mov ecx, esi
call fcn.00460000
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4c5315
mov edx, 0x5bc114
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 0x4c5395
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x18], 0
je 0x4c539c
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.004c4f00
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x4c5869
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 0x4c5491
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 0x4c5477
lea edx, [ebp - 0x28]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4c5412
cmp dword [ebp - 0x24], eax
jl 0x4c5477
jg 0x4c5412
cmp dword [ebp - 0x28], eax
jbe 0x4c5477
push 0
push 0x1b
mov ecx, edi
mov ebx, 1
call fcn.0043b7c0
mov edx, eax
add esp, 8
mov dword [ebp - 0x1c], edx
test edx, edx
je 0x4c5458
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x5c6e6c]
movq qword [edx + 0x10], xmm0
mov cx, word [0x5c6e74]
mov word [edx + 0x18], cx
mov al, byte [0x5c6e76]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
test ecx, ecx
je 0x4c5470
mov edx, ecx
mov ecx, edi
call fcn.0043b330
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
jmp 0x4c5869
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
cmp byte [esi + 9], 0
je 0x4c54a7
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4c54a7
mov ecx, esi
call fcn.00450c80
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 - 0x24], edx
mov dword [ebp - 0x10], ecx
je 0x4c54d3
add dword [esi + 0xc], 0xffffffff
jne 0x4c54d3
mov ecx, esi
call fcn.00450c60
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
mov eax, dword [edi + 0x10]
cmp edx, ecx
cmovg ecx, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax + 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x50]
call fcn.00453760
xor edx, edx
mov ecx, esi
call fcn.00453800
mov edx, eax
mov ecx, ebx
call fcn.00453800
mov edx, dword [ebp - 8]
mov ecx, ebx
or edx, 0x20
call fcn.004538e0
mov edx, dword [ebp - 0xc]
mov ecx, edi
push str.BEGIN
call fcn.004c4d20
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
xor edx, edx
mov ecx, esi
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00453f40
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4c5566
cmp dword [ebp + 0xc], 0
jne 0x4c5566
mov dword [edi + 0x64], 0
mov eax, dword [esi + 4]
mov ecx, ebx
push 0
push dword [ebp - 0x10]
mov edx, dword [eax + 0x24]
call fcn.004539c0
add esp, 8
test eax, eax
jne 0x4c585f
cmp dword [ebp - 0x18], eax
jne 0x4c55a1
mov edx, dword [edi + 0x64]
mov ecx, ebx
push eax
push dword [ebp - 0x10]
call fcn.004539c0
add esp, 8
test eax, eax
jne 0x4c585f
cmp byte [edi + 0x57], 0
jne 0x4c585f
mov al, byte [edi + 0x5a]
test al, al
js 0x4c55b7
movsx edx, al
jmp 0x4c5603
mov cl, byte [esi + 9]
test cl, cl
je 0x4c55d1
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4c55d1
mov ecx, esi
call fcn.00450c80
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4c55e3
mov dword [ebp - 0x18], 0
jmp 0x4c55ef
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x18], eax
test cl, cl
je 0x4c5600
add dword [esi + 0xc], 0xffffffff
jne 0x4c5600
mov ecx, esi
call fcn.00450c60
mov edx, dword [ebp - 0x18]
mov ecx, ebx
call fcn.00453b00
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.004c4f00
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
push dword [ebp - 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0xc]
push edi
call fcn.004c4f00
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
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.004c4f00
and dword [edi + 0x18], 0xfffffffb
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
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.004c4f00
add esp, 0x10
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
mov dword [ebp - 0x14], eax
nop dword [eax]
movzx edx, byte [eax + 0x5afacc]
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4c56d0
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4c56d0
mov ecx, esi
call fcn.00450c80
mov cl, byte [esi + 9]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
cmp edx, 0xf
jne 0x4c56df
mov eax, dword [eax]
mov eax, dword [eax + 0x6c]
add eax, dword [esi + 0x14]
jmp 0x4c56eb
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 0x4c56ff
add dword [esi + 0xc], 0xffffffff
jne 0x4c56ff
mov ecx, esi
call fcn.00450c60
mov ecx, dword [ebp - 0x14]
movzx eax, byte [ecx + 0x5afacd]
add eax, dword [ebp - 0x1c]
movzx edx, byte [ecx + 0x5afacc]
mov ecx, ebx
push eax
call fcn.0045c570
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
mov eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x14], eax
cmp eax, 0xa
jl 0x4c56a0
cmp dword [ebp + 0xc], 0
jne 0x4c5755
mov edx, ebx
mov ecx, esi
call fcn.0045e990
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5866
cmp byte [ebx + 9], 0
je 0x4c576b
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4c576b
mov ecx, ebx
call fcn.00450c80
xor edx, edx
mov ecx, ebx
call fcn.00454d80
mov dword [ebp - 8], eax
test eax, eax
jne 0x4c5787
xor edx, edx
mov ecx, ebx
call fcn.00454f80
mov dword [ebp - 8], eax
cmp byte [ebx + 9], 0
je 0x4c579a
add dword [ebx + 0xc], 0xffffffff
jne 0x4c579a
mov ecx, ebx
call fcn.00450c60
cmp dword [ebp - 8], 0
jne 0x4c5866
cmp dword [ebp + 0xc], 0
jne 0x4c5866
mov cl, byte [ebx + 9]
test cl, cl
je 0x4c57c8
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4c57c8
mov ecx, ebx
call fcn.00450c80
mov cl, byte [ebx + 9]
mov edx, dword [ebx + 4]
cmp byte [edx + 0x11], 0
jne 0x4c57da
mov dword [ebp - 0x1c], 0
jmp 0x4c57e6
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4c57f7
add dword [ebx + 0xc], 0xffffffff
jne 0x4c57f7
mov ecx, ebx
call fcn.00450c60
mov edx, dword [ebp - 0x1c]
mov ecx, esi
call fcn.00453b00
cmp byte [ebx + 9], 0
je 0x4c5817
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4c5817
mov ecx, ebx
call fcn.00450c80
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
cmp byte [ebx + 9], 0
movzx edx, byte [eax + 0x16]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x24], ecx
je 0x4c5843
add dword [ebx + 0xc], 0xffffffff
jne 0x4c5843
mov ecx, ebx
call fcn.00450c60
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebx + 4]
cmp edx, ecx
push 1
cmovg ecx, edx
push ecx
mov edx, dword [eax + 0x24]
mov ecx, esi
call fcn.004539c0
add esp, 8
mov ebx, eax
jmp 0x4c5869
mov ebx, 7
jmp 0x4c5869
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.004539c0
mov esi, dword [ebp - 0x20]
add esp, 8
mov byte [edi + 0x55], 1
test esi, esi
je 0x4c58d2
mov ecx, dword [esi + 4]
call fcn.00453550
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.0048bb60
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret