Function at 0x4a5e90
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x511080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, edx
push edi
mov edi, ecx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x58], edi
cmp byte [ebx + 0x55], 0
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x14], 1
jne 0x4a5f28
push 0
push 0x28
mov ecx, ebx
call fcn.00419010
mov esi, eax
add esp, 8
test esi, esi
je 0x4a5f03
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x50b20c]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x50b21c]
movq qword [esi + 0x20], xmm0
mov edx, dword [edi]
test edx, edx
je 0x4a5f10
mov ecx, ebx
call fcn.00418b80
mov dword [edi], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d2eed
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0xbc], 1
jle 0x4a5f7b
push 0
push 0x2b
mov ecx, ebx
call fcn.00419010
mov esi, eax
add esp, 8
test esi, esi
je 0x4a5f03
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x50b234]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x50b244]
movq qword [esi + 0x20], xmm0
mov ax, word [0x50b24c]
mov word [esi + 0x28], ax
mov al, byte [0x50b24e]
mov byte [esi + 0x2a], al
jmp 0x4a5f03
mov eax, dword [ebx + 0x3c]
mov dword [ebp - 0x64], eax
test esi, esi
je 0x4a6020
movzx ecx, word [esi + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x503fc0], 3
je 0x4a5fcd
push 0
push 0x12
mov ecx, ebx
call fcn.00419010
mov esi, eax
add esp, 8
test esi, esi
je 0x4a5f03
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x50b260]
mov word [esi + 0x10], cx
jmp 0x4a5f03
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4a5ff2
cmp byte [esi + 0x12], 1
jne 0x4a5ff2
mov ecx, dword [ebx + 0x3c]
mov edx, dword [esi + 8]
and ecx, 0xfffffffe
or ecx, 6
mov dword [ebx + 0x3c], ecx
jmp 0x4a6025
test cl, 1
je 0x4a6007
mov ecx, dword [ebx + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [ebx + 0x3c], ecx
jmp 0x4a6025
mov dl, 1
mov ecx, esi
call fcn.0043fe80
mov ecx, dword [ebx + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [ebx + 0x3c], ecx
jmp 0x4a6025
mov edx, 0x504da5
mov ecx, dword [ebx + 0x20]
mov esi, dword [ebx + 0x24]
mov eax, dword [ebx + 0x18]
mov edi, dword [ebx + 0x68]
mov dword [ebp - 0x6c], ecx
mov cl, byte [ebx + 0x5e]
mov dword [ebp - 0x78], esi
and esi, 0xfffffffe
mov dword [ebx + 0x24], esi
mov esi, dword [ebp - 0x4c]
mov dword [ebp - 0x74], eax
or eax, 6
mov byte [ebp - 0x5d], cl
mov ecx, dword [ebp - 0x6c]
mov dword [ebx + 0x18], eax
and ecx, 0xefffafff
mov eax, dword [ebx + 0x10]
or ecx, 0x201
shl esi, 4
mov dword [ebx + 0x20], ecx
mov byte [ebx + 0x5e], 0
mov dword [ebp - 0x54], esi
mov ecx, dword [eax + esi]
mov esi, dword [eax + esi + 4]
mov dword [ebp - 0x7c], edi
mov edi, dword [ebx + 0x6c]
mov dword [ebp - 0x80], edi
mov eax, dword [esi + 4]
mov edi, dword [ebx + 0x70]
mov dword [ebp - 0x84], edi
mov edi, dword [ebx + 0x74]
mov eax, dword [eax]
mov dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x58]
mov dword [ebp - 0x5c], ecx
cmp byte [eax + 0xc], 0
jne 0x4a60ae
cmp byte [eax + 0x10], 0
mov dword [ebp - 0xc], 0
je 0x4a60b5
mov dword [ebp - 0xc], 1
mov eax, dword [ebx + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push edi
push ebx
mov dword [ebp - 0x50], eax
call fcn.004a5bf0
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x64]
mov dword [ebx + 0x3c], eax
test edi, edi
jne 0x4a66bd
mov eax, dword [ebp - 0x50]
shl eax, 4
add eax, dword [ebx + 0x10]
cmp dword [ebp - 0x68], 0
mov dword [ebp - 0x70], eax
mov edi, dword [eax + 4]
je 0x4a61aa
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4a6190
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4a612b
cmp dword [ebp - 0x14], eax
jl 0x4a6190
jg 0x4a612b
cmp dword [ebp - 0x18], eax
jbe 0x4a6190
push 0
push 0x1b
mov ecx, ebx
mov edi, 1
call fcn.00419010
mov edx, eax
add esp, 8
mov dword [ebp - 0x50], edx
test edx, edx
je 0x4a6171
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [edx], xmm0
movq xmm0, qword [0x50b28c]
movq qword [edx + 0x10], xmm0
mov cx, word [0x50b294]
mov word [edx + 0x18], cx
mov al, byte [0x50b296]
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
test ecx, ecx
je 0x4a6189
mov edx, ecx
mov ecx, ebx
call fcn.00418b80
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x50]
mov dword [eax], edx
jmp 0x4a66bd
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0x54]
or dword [ebx + 0x18], 8
movzx ecx, byte [ecx + eax + 8]
mov eax, dword [ebx + 0x20]
and eax, 0x38
or ecx, eax
mov dword [ebp - 0x14], ecx
cmp byte [esi + 9], 0
je 0x4a61c0
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a61c0
mov ecx, esi
call fcn.0042fda0
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 - 0x54], edx
mov dword [ebp - 0x64], ecx
je 0x4a61ec
sub dword [esi + 0xc], 1
jne 0x4a61ec
mov ecx, esi
call fcn.0042fd80
mov ecx, dword [ebp - 0x64]
mov edx, dword [ebp - 0x54]
mov eax, dword [ebx + 0x10]
cmp edx, ecx
cmovg ecx, edx
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp - 0x4c]
add ecx, ecx
mov edx, dword [eax + ecx*8 + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.00432c10
xor edx, edx
mov ecx, esi
call fcn.00432cb0
mov edx, eax
mov ecx, edi
call fcn.00432cb0
mov edx, dword [ebp - 0x14]
mov ecx, edi
or edx, 0x20
call fcn.00432da0
mov edx, dword [ebp - 0x58]
mov ecx, ebx
push str.BEGIN
call fcn.004a5a00
add esp, 4
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
xor edx, edx
mov ecx, esi
cmp dword [ebp - 0x68], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.004334b0
add esp, 4
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4a6281
cmp dword [ebp - 0x68], 0
jne 0x4a6281
mov dword [ebx + 0x64], 0
mov eax, dword [esi + 4]
mov ecx, edi
push 0
push dword [ebp - 0x64]
mov edx, dword [eax + 0x24]
call fcn.00432e80
add esp, 8
test eax, eax
jne 0x4a66b3
cmp dword [ebp - 0xc], eax
jne 0x4a62bc
mov edx, dword [ebx + 0x64]
mov ecx, edi
push eax
push dword [ebp - 0x64]
call fcn.00432e80
add esp, 8
test eax, eax
jne 0x4a66b3
cmp byte [ebx + 0x57], 0
jne 0x4a66b3
mov al, byte [ebx + 0x5a]
test al, al
js 0x4a62d2
movsx edx, al
jmp 0x4a631c
cmp byte [esi + 9], 0
je 0x4a62e8
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a62e8
mov ecx, esi
call fcn.0042fda0
mov ecx, dword [esi + 4]
cmp byte [ecx + 0x11], 0
jne 0x4a62fa
mov dword [ebp - 0xc], 0
jmp 0x4a6306
xor eax, eax
cmp byte [ecx + 0x12], al
setne al
inc eax
mov dword [ebp - 0xc], eax
cmp byte [esi + 9], 0
je 0x4a6319
sub dword [esi + 0xc], 1
jne 0x4a6319
mov ecx, esi
call fcn.0042fd80
mov edx, dword [ebp - 0xc]
mov ecx, edi
call fcn.00432fc0
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x50]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 0x58]
mov byte [ebx + 0xb0], al
push ebx
call fcn.004a5bf0
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
push dword [ebp - 0x5c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0x58]
push ebx
call fcn.004a5bf0
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
push dword [ebp - 0x5c]
mov byte [ebx + 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 - 0x58]
push ebx
call fcn.004a5bf0
and dword [ebx + 0x18], 0xfffffffb
mov ecx, eax
add esp, 0x10
mov dword [ebp - 0x4c], ecx
test ecx, ecx
jne 0x4a66ba
push dword [ebp - 0x5c]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 0x58]
push ebx
call fcn.004a5bf0
add esp, 0x10
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
mov dword [ebp - 0x5c], eax
nop word [eax + eax]
cmp byte [esi + 9], 0
movzx ecx, byte [eax + 0x4ff3b0]
mov eax, dword [esi + 4]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], eax
je 0x4a63ec
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a63ec
mov ecx, esi
call fcn.0042fda0
mov ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
cmp ecx, 0xf
jne 0x4a63fb
mov eax, dword [eax]
mov eax, dword [eax + 0x6c]
add eax, dword [esi + 0x14]
jmp 0x4a6407
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + ecx*4 + 0x24]
bswap eax
cmp byte [esi + 9], 0
mov dword [ebp - 0x50], eax
je 0x4a641d
add dword [esi + 0xc], 0xffffffff
jne 0x4a641d
mov ecx, esi
call fcn.0042fd80
mov ecx, dword [ebp - 0x5c]
movzx eax, byte [ecx + 0x4ff3b1]
add eax, dword [ebp - 0x50]
movzx edx, byte [ecx + 0x4ff3b0]
mov ecx, edi
push eax
call fcn.0043c4a0
add esp, 4
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a66ba
mov eax, dword [ebp - 0x5c]
add eax, 2
mov dword [ebp - 0x5c], eax
cmp eax, 0xa
jl 0x4a63c0
cmp dword [ebp - 0x68], 0
jne 0x4a65ab
cmp byte [esi + 9], 0
je 0x4a6479
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4a6479
mov ecx, esi
call fcn.0042fda0
cmp byte [edi + 9], 0
je 0x4a648f
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a648f
mov ecx, edi
call fcn.0042fda0
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x54], eax
mov eax, dword [eax]
mov dword [ebp - 0x50], eax
test eax, eax
je 0x4a64e4
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x24]
cdq
push edx
push eax
push 0
push ecx
call fcn.004d39f0
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x50]
push 0xb
push dword [ebp - 0x54]
mov dword [ebp - 0xc], edx
mov eax, dword [eax + 0x28]
call eax
xor ecx, ecx
add esp, 0xc
cmp eax, 0xc
cmovne ecx, eax
mov dword [ebp - 0x4c], ecx
test ecx, ecx
jne 0x4a657b
mov eax, dword [edi]
xorps xmm0, xmm0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x48]
push 0x7fffffff
push eax
mov dword [ebp - 0x48], 0
movlpd qword [ebp - 0x40], xmm0
movlpd qword [ebp - 0x2c], xmm0
movlpd qword [ebp - 0x24], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x38], 1
call fcn.0043e050
lea eax, [ebp - 0x48]
push eax
call fcn.0043e740
add esp, 0xc
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a6545
mov eax, dword [esi + 4]
mov ecx, 0xfffd
and word [eax + 0x18], cx
jmp 0x4a657b
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xc], 0
jne 0x4a657b
inc dword [ecx + 0x6c]
mov eax, dword [ecx + 0x60]
test eax, eax
je 0x4a656e
nop dword [eax]
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x4a6560
mov ecx, dword [ecx + 0xe4]
xor edx, edx
call fcn.00425790
cmp byte [edi + 9], 0
je 0x4a658e
sub dword [edi + 0xc], 1
jne 0x4a658e
mov ecx, edi
call fcn.0042fd80
cmp byte [esi + 9], 0
je 0x4a65a1
sub dword [esi + 0xc], 1
jne 0x4a65a1
mov ecx, esi
call fcn.0042fd80
cmp dword [ebp - 0x4c], 0
jne 0x4a66ba
cmp byte [edi + 9], 0
je 0x4a65c1
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a65c1
mov ecx, edi
call fcn.0042fda0
xor edx, edx
mov ecx, edi
call fcn.00434500
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x4a65dd
xor edx, edx
mov ecx, edi
call fcn.00434700
mov dword [ebp - 0x4c], eax
cmp byte [edi + 9], 0
je 0x4a65f0
sub dword [edi + 0xc], 1
jne 0x4a65f0
mov ecx, edi
call fcn.0042fd80
cmp dword [ebp - 0x4c], 0
jne 0x4a66ba
cmp dword [ebp - 0x68], 0
jne 0x4a66ba
cmp byte [edi + 9], 0
je 0x4a661a
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a661a
mov ecx, edi
call fcn.0042fda0
mov ecx, dword [edi + 4]
cmp byte [ecx + 0x11], 0
jne 0x4a662c
mov dword [ebp - 0x50], 0
jmp 0x4a6638
xor eax, eax
cmp byte [ecx + 0x12], al
setne al
inc eax
mov dword [ebp - 0x50], eax
cmp byte [edi + 9], 0
je 0x4a664b
sub dword [edi + 0xc], 1
jne 0x4a664b
mov ecx, edi
call fcn.0042fd80
mov edx, dword [ebp - 0x50]
mov ecx, esi
call fcn.00432fc0
cmp byte [edi + 9], 0
je 0x4a666b
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x4a666b
mov ecx, edi
call fcn.0042fda0
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
cmp byte [edi + 9], 0
movzx edx, byte [eax + 0x16]
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x54], ecx
je 0x4a6697
sub dword [edi + 0xc], 1
jne 0x4a6697
mov ecx, edi
call fcn.0042fd80
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
mov eax, dword [edi + 4]
cmp edx, ecx
push 1
cmovg ecx, edx
push ecx
mov edx, dword [eax + 0x24]
mov ecx, esi
call fcn.00432e80
add esp, 8
mov edi, eax
jmp 0x4a66bd
mov edi, 7
jmp 0x4a66bd
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x74]
or edx, 0xffffffff
mov dword [ebx + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x6c]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x78]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebx + 0x68], eax
mov eax, dword [ebp - 0x80]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebp - 0x84]
mov dword [ebx + 0x70], eax
mov eax, dword [ebp - 0x88]
mov dword [ebx + 0x74], eax
mov al, byte [ebp - 0x5d]
push 1
push 0
mov byte [ebx + 0xb0], 0
mov byte [ebx + 0x5e], al
call fcn.00432e80
mov esi, dword [ebp - 0x70]
add esp, 8
mov byte [ebx + 0x55], 1
test esi, esi
je 0x4a672c
mov ecx, dword [esi + 4]
call fcn.00432a00
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, ebx
call fcn.0046c290
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d2eed
mov esp, ebp
pop ebp
ret