Function at 0x4a18f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x540020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, edx
mov dword [ebp - 0x30], eax
mov esi, ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x20], esi
cmp byte [edi + 0x4f], 0
jne 0x4a19b3
mov ecx, dword [esi]
test ecx, ecx
je 0x4a1967
cmp dword [edi + 0x1e8], 0
je 0x4a193e
mov edx, ecx
mov ecx, edi
call fcn.0042c6f0
jmp 0x4a1967
cmp ecx, dword [edi + 0x138]
jb 0x4a195e
cmp ecx, dword [edi + 0x13c]
jae 0x4a195e
mov eax, dword [edi + 0x134]
mov dword [ecx], eax
mov dword [edi + 0x134], ecx
jmp 0x4a1967
push ecx
call fcn.0042c680
add esp, 4
push 0
push 0x28
mov ecx, edi
call fcn.0042ca80
add esp, 8
test eax, eax
je 0x4a199b
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [eax], xmm0
movups xmm0, xmmword [0x521808]
movups xmmword [eax + 0x10], xmm0
movq xmm0, qword [0x521818]
movq qword [eax + 0x20], xmm0
mov dword [esi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ddc19
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xac], 1
jle 0x4a1a63
mov ecx, dword [esi]
test ecx, ecx
je 0x4a1a03
cmp dword [edi + 0x1e8], 0
je 0x4a19da
mov edx, ecx
mov ecx, edi
call fcn.0042c6f0
jmp 0x4a1a03
cmp ecx, dword [edi + 0x138]
jb 0x4a19fa
cmp ecx, dword [edi + 0x13c]
jae 0x4a19fa
mov eax, dword [edi + 0x134]
mov dword [ecx], eax
mov dword [edi + 0x134], ecx
jmp 0x4a1a03
push ecx
call fcn.0042c680
add esp, 4
push 0
push 0x2b
mov ecx, edi
call fcn.0042ca80
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4a1a4b
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [0x521830]
movups xmmword [ecx + 0x10], xmm0
movq xmm0, qword [0x521840]
movq qword [ecx + 0x20], xmm0
mov ax, word [0x521848]
mov word [ecx + 0x28], ax
mov al, byte [0x52184a]
mov byte [ecx + 0x2a], al
mov dword [esi], ecx
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ddc19
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0xc], edx
test eax, eax
je 0x4a1b5d
movzx ecx, word [eax + 8]
mov eax, ecx
and eax, 0x1f
cmp byte [eax + 0x51860c], 3
je 0x4a1b09
mov ecx, dword [esi]
test ecx, ecx
je 0x4a1aca
cmp dword [edi + 0x1e8], 0
je 0x4a1aa1
mov edx, ecx
mov ecx, edi
call fcn.0042c6f0
jmp 0x4a1aca
cmp ecx, dword [edi + 0x138]
jb 0x4a1ac1
cmp ecx, dword [edi + 0x13c]
jae 0x4a1ac1
mov eax, dword [edi + 0x134]
mov dword [ecx], eax
mov dword [edi + 0x134], ecx
jmp 0x4a1aca
push ecx
call fcn.0042c680
add esp, 4
push 0
push 0x12
mov ecx, edi
call fcn.0042ca80
add esp, 8
test eax, eax
je 0x4a1af1
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x52185c]
mov word [eax + 0x10], cx
mov dword [esi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ddc19
mov esp, ebp
pop ebp
ret
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
mov eax, dword [ebp - 0x30]
jne 0x4a1b30
cmp byte [eax + 0xa], 1
jne 0x4a1b30
mov ecx, dword [eax + 0x10]
mov eax, edx
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4a1b62
test cl, 1
je 0x4a1b44
mov eax, edx
xor ecx, ecx
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4a1b62
mov dl, 1
mov ecx, eax
call fcn.0044c650
mov ecx, eax
mov eax, dword [edi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4a1b62
mov ecx, 0x51274f
mov eax, dword [edi + 0x24]
mov edx, dword [edi + 0x20]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x40], eax
or eax, 6
mov dword [edi + 0x18], eax
mov esi, dword [edi + 0x64]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
mov dl, byte [edi + 0x58]
and eax, 0xefffaf7f
or eax, 0x201
shl ebx, 4
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [edi + 0x24], eax
mov eax, dword [edi + 0x10]
mov byte [edi + 0x58], 0
mov byte [ebp - 0x26], dl
mov dword [ebp - 0x14], ebx
mov edx, dword [ebx + eax]
mov ebx, dword [ebx + eax + 4]
push ecx
mov dword [ebp - 0x44], esi
mov esi, dword [edi + 0x68]
mov eax, dword [ebx + 4]
push str.ATTACH__Q_AS_vacuum_db
mov dword [ebp - 0x48], esi
mov esi, dword [ebp - 0x20]
mov eax, dword [eax]
push esi
push edi
mov dword [ebp - 0x24], edx
mov al, byte [eax + 0xc]
mov byte [ebp - 0x25], al
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004a16c0
mov esi, eax
add esp, 0x10
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x3c], eax
test esi, esi
jne 0x4a211c
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [edi + 0x10]
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x3c], eax
mov esi, dword [eax + 4]
mov dword [ebp - 0x2c], esi
je 0x4a1cdf
mov eax, dword [esi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x10], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4a1cdb
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4a1c48
cmp dword [ebp - 0xc], eax
jl 0x4a1cdb
jg 0x4a1c48
cmp dword [ebp - 0x10], eax
jbe 0x4a1cdb
mov eax, dword [ebp - 0x20]
mov esi, 1
mov ecx, dword [eax]
test ecx, ecx
je 0x4a1c93
cmp dword [edi + 0x1e8], 0
je 0x4a1c6a
mov edx, ecx
mov ecx, edi
call fcn.0042c6f0
jmp 0x4a1c93
cmp ecx, dword [edi + 0x138]
jb 0x4a1c8a
cmp ecx, dword [edi + 0x13c]
jae 0x4a1c8a
mov eax, dword [edi + 0x134]
mov dword [ecx], eax
mov dword [edi + 0x134], ecx
jmp 0x4a1c93
push ecx
call fcn.0042c680
add esp, 4
push 0
push 0x1b
mov ecx, edi
call fcn.0042ca80
mov edx, eax
add esp, 8
test edx, edx
je 0x4a1cd1
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x521888]
movq qword [edx + 0x10], xmm0
mov cx, word [0x521890]
mov word [edx + 0x18], cx
mov al, byte [0x521892]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x4a211c
or dword [edi + 0x18], 8
mov cl, byte [ebx + 9]
test cl, cl
je 0x4a1cf9
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a1cf9
mov ecx, ebx
call fcn.0043e860
mov cl, byte [ebx + 9]
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0xc], edx
test cl, cl
je 0x4a1d16
add dword [ebx + 0xc], 0xffffffff
jne 0x4a1d16
mov ecx, ebx
call fcn.0043e840
mov eax, dword [edi + 0x10]
mov ecx, esi
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.00440e20
mov cl, byte [ebx + 9]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x15], cl
test cl, cl
je 0x4a1d56
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
mov byte [ebp - 0x15], cl
jne 0x4a1d56
mov ecx, ebx
call fcn.0043e860
mov al, byte [ebx + 9]
mov byte [ebp - 0x15], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov ecx, dword [eax + 0xd4]
mov dword [ebp - 0x14], ecx
mov eax, dword [ecx + 0x10]
test eax, eax
jns 0x4a1d8c
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.004ff670
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x14]
cmp eax, ecx
cmovge ecx, eax
cmp byte [ebp - 0x15], 0
mov dword [ebp - 0x2c], ecx
je 0x4a1dad
add dword [ebx + 0xc], 0xffffffff
jne 0x4a1dad
mov ecx, ebx
call fcn.0043e840
mov ecx, dword [ebp - 0x2c]
mov edx, ecx
mov ecx, esi
call fcn.00440ea0
cmp byte [esi + 9], 0
mov eax, dword [esi + 4]
mov dword [ebp - 0x2c], eax
je 0x4a1dd5
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a1dd5
mov ecx, esi
call fcn.0043e860
mov eax, dword [ebp - 0x2c]
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 0x4a1e0c
add dword [esi + 0xc], 0xffffffff
jne 0x4a1e0c
mov ecx, esi
call fcn.0043e840
mov edx, dword [ebp - 0x20]
mov ecx, edi
push str.BEGIN
call fcn.004a15e0
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
xor edx, edx
mov ecx, ebx
cmp dword [ebp - 0x30], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00441630
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4a1e61
mov dword [edi + 0x5c], 0
mov edx, dword [ebx + 4]
mov edx, dword [edx + 0x20]
mov ecx, esi
push 0
push dword [ebp - 0xc]
call fcn.00441020
add esp, 8
test eax, eax
jne 0x4a2112
cmp byte [ebp - 0x25], al
jne 0x4a1e99
mov edx, dword [edi + 0x5c]
mov ecx, esi
push eax
push dword [ebp - 0xc]
call fcn.00441020
add esp, 8
test eax, eax
jne 0x4a2112
cmp byte [edi + 0x51], 0
jne 0x4a2112
mov al, byte [edi + 0x54]
test al, al
js 0x4a1eaf
movsx edx, al
jmp 0x4a1efb
mov cl, byte [ebx + 9]
test cl, cl
je 0x4a1ec9
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a1ec9
mov ecx, ebx
call fcn.0043e860
mov cl, byte [ebx + 9]
mov edx, dword [ebx + 4]
cmp byte [edx + 0x11], 0
jne 0x4a1edb
mov dword [ebp - 0x14], 0
jmp 0x4a1ee7
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x14], eax
test cl, cl
je 0x4a1ef8
add dword [ebx + 0xc], 0xffffffff
jne 0x4a1ef8
mov ecx, ebx
call fcn.0043e840
mov edx, dword [ebp - 0x14]
mov ecx, esi
call fcn.00441140
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 0x20]
mov byte [edi + 0xa4], al
push edi
call fcn.004a16c0
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
push dword [ebp - 0x24]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp - 0x20]
push edi
call fcn.004a16c0
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
push dword [ebp - 0x24]
mov byte [edi + 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 [ebp - 0x20]
push edi
call fcn.004a16c0
and dword [edi + 0x18], 0xfffffffb
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
push dword [ebp - 0x24]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 0x20]
push edi
call fcn.004a16c0
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
mov dword [ebp - 0x24], eax
nop dword [eax]
nop dword [eax + eax]
movzx edx, byte [eax + 0x513fc8]
mov cl, byte [ebx + 9]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4a1fd0
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4a1fd0
mov ecx, ebx
call fcn.0043e860
mov cl, byte [ebx + 9]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
cmp edx, 0xf
jne 0x4a1fdf
mov eax, dword [eax]
mov eax, dword [eax + 0x64]
add eax, dword [ebx + 0x14]
jmp 0x4a1feb
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 0x4a1fff
add dword [ebx + 0xc], 0xffffffff
jne 0x4a1fff
mov ecx, ebx
call fcn.0043e840
mov ecx, dword [ebp - 0x24]
movzx eax, byte [ecx + 0x513fc9]
add eax, dword [ebp - 0x1c]
movzx edx, byte [ecx + 0x513fc8]
mov ecx, esi
push eax
call fcn.00449220
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
mov eax, dword [ebp - 0x24]
add eax, 2
mov dword [ebp - 0x24], eax
cmp eax, 0xa
jl 0x4a1fa0
cmp dword [ebp - 0x30], 0
jne 0x4a2055
mov edx, esi
mov ecx, ebx
call fcn.0044b440
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2119
cmp byte [esi + 9], 0
je 0x4a206b
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a206b
mov ecx, esi
call fcn.0043e860
xor edx, edx
mov ecx, esi
call fcn.00442540
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a2087
xor edx, edx
mov ecx, esi
call fcn.00442740
mov dword [ebp - 0x14], eax
cmp byte [esi + 9], 0
je 0x4a209a
add dword [esi + 0xc], 0xffffffff
jne 0x4a209a
mov ecx, esi
call fcn.0043e840
cmp dword [ebp - 0x14], 0
jne 0x4a2119
cmp dword [ebp - 0x30], 0
jne 0x4a2119
mov cl, byte [esi + 9]
test cl, cl
je 0x4a20c0
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a20c0
mov ecx, esi
call fcn.0043e860
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4a20d2
mov dword [ebp - 0x1c], 0
jmp 0x4a20de
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4a20ef
add dword [esi + 0xc], 0xffffffff
jne 0x4a20ef
mov ecx, esi
call fcn.0043e840
mov edx, dword [ebp - 0x1c]
mov ecx, ebx
call fcn.00441140
mov eax, dword [esi + 4]
mov ecx, ebx
push 1
push dword [ebp - 0xc]
mov edx, dword [eax + 0x20]
call fcn.00441020
add esp, 8
mov esi, eax
jmp 0x4a211c
mov esi, 7
jmp 0x4a211c
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x40]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, ebx
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 0x64], eax
mov eax, dword [ebp - 0x48]
mov dword [edi + 0x68], eax
mov al, byte [ebp - 0x26]
push 1
push 0xffffffffffffffff
mov byte [edi + 0xa4], 0
mov byte [edi + 0x58], al
call fcn.00441020
mov ebx, dword [ebp - 0x3c]
add esp, 8
mov byte [edi + 0x4f], 1
test ebx, ebx
je 0x4a2179
mov ecx, dword [ebx + 4]
call fcn.00440ca0
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, edi
call fcn.00472fe0
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ddc19
mov esp, ebp
pop ebp
ret