Function at 0x4d7040
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x609e44]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov edi, edx
mov dword [esp + 0x20], ebx
mov edx, dword [ebp + 8]
mov dword [esp + 0x10], edx
mov dword [esp + 0x2c], esi
cmp byte [edi + 0x4f], 0
mov dword [esp + 0x30], 0
jne 0x4d70a1
push str.cannot_VACUUM_from_within_a_transaction
mov edx, edi
call fcn.004585f0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.005a6fed
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xb0], 1
jle 0x4d70d0
push str.cannot_VACUUM___SQL_statements_in_progress
mov edx, edi
call fcn.004585f0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.005a6fed
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x24], eax
test esi, esi
je 0x4d716c
movzx ecx, word [esi + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x5fd840], 3
je 0x4d7119
push str.non_text_filename
mov edx, edi
mov ecx, ebx
call fcn.004585f0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.005a6fed
mov esp, ebp
pop ebp
ret
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4d713e
cmp byte [esi + 0xa], 1
jne 0x4d713e
mov ecx, dword [edi + 0x3c]
mov edx, dword [esi + 0x10]
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4d7171
test cl, 1
je 0x4d7153
mov ecx, dword [edi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4d7171
mov dl, 1
mov ecx, esi
call fcn.004797e0
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4d7171
mov edx, 0x5f8cb8
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x24]
mov ebx, dword [edi + 0x64]
mov dword [esp + 0x38], ecx
and ecx, 0xefffafff
mov dword [esp + 0x34], eax
or ecx, 0x201
mov dword [edi + 0x20], ecx
or eax, 6
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
shl ecx, 4
mov dword [esp + 0x40], ebx
mov ebx, dword [edi + 0x68]
mov dword [esp + 0x3c], esi
and esi, 0xfffffffe
mov dword [edi + 0x24], esi
mov dword [esp + 0x44], ebx
mov bl, byte [edi + 0x58]
mov byte [edi + 0x58], 0
mov esi, dword [ecx + eax]
mov dword [esp + 0x18], esi
mov esi, dword [ecx + eax + 4]
push edx
push str.ATTACH__Q_AS_vacuum_db
mov byte [esp + 0x27], bl
mov eax, dword [esi + 4]
mov ebx, dword [esp + 0x28]
push ebx
push edi
mov eax, dword [eax]
mov dword [esp + 0x20], ecx
mov al, byte [eax + 0xc]
mov byte [esp + 0x2e], al
mov eax, dword [edi + 0x14]
mov dword [esp + 0x24], eax
call fcn.004d6db0
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x4d768b
mov eax, dword [esp + 0x14]
shl eax, 4
add eax, dword [edi + 0x10]
cmp dword [esp + 0x2c], 0
mov dword [esp + 0x30], eax
mov ebx, dword [eax + 4]
lea eax, [ebx + 4]
mov dword [esp + 0x24], eax
je 0x4d7283
mov eax, dword [eax]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [esp + 0x48], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4d727d
lea edx, [esp + 0x48]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4d7260
cmp dword [esp + 0x4c], eax
jl 0x4d727d
jg 0x4d7260
cmp dword [esp + 0x48], eax
jbe 0x4d727d
mov ecx, dword [esp + 0x20]
mov edx, edi
push str.output_file_already_exists
mov ebx, 1
call fcn.004585f0
add esp, 4
jmp 0x4d768b
or dword [edi + 0x18], 8
jmp 0x4d7287
mov dword [esp + 0x24], eax
cmp byte [esi + 9], 0
je 0x4d729d
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4d729d
mov ecx, esi
call fcn.0046af90
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x24]
sub edx, dword [eax + 0x28]
cmp byte [esi + 9], 0
movzx ecx, byte [eax + 0x16]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x28], edx
je 0x4d72cd
add dword [esi + 0xc], 0xffffffff
jne 0x4d72cd
mov ecx, esi
call fcn.0046af70
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x28]
mov eax, dword [edi + 0x10]
cmp ecx, edx
cmovg edx, ecx
mov ecx, ebx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x10]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.0046d600
xor edx, edx
mov ecx, esi
call fcn.0046d680
mov edx, eax
mov ecx, ebx
call fcn.0046d680
cmp byte [ebx + 9], 0
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov dword [esp + 0x48], eax
je 0x4d7321
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4d7321
mov ecx, ebx
call fcn.0046af90
mov eax, dword [esp + 0x48]
mov eax, dword [eax]
mov dword [eax + 7], 1
and byte [eax + 0x14], 0xfe
mov byte [eax + 0xb], 0
cmp byte [ebx + 9], 0
je 0x4d7345
add dword [ebx + 0xc], 0xffffffff
jne 0x4d7345
mov ecx, ebx
call fcn.0046af70
mov edx, dword [esp + 0x20]
mov ecx, edi
push str.BEGIN
call fcn.004d6cc0
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
xor edx, edx
mov ecx, esi
cmp dword [esp + 0x2c], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.0046de40
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4d739b
mov dword [edi + 0x5c], 0
mov eax, dword [esi + 4]
mov ecx, ebx
push 0
push dword [esp + 0x2c]
mov edx, dword [eax + 0x24]
call fcn.0046d830
add esp, 8
test eax, eax
jne 0x4d7680
cmp byte [esp + 0x1e], al
jne 0x4d73d9
mov edx, dword [edi + 0x5c]
mov ecx, ebx
push eax
push dword [esp + 0x2c]
call fcn.0046d830
add esp, 8
test eax, eax
jne 0x4d7680
cmp byte [edi + 0x51], 0
jne 0x4d7680
mov al, byte [edi + 0x54]
test al, al
js 0x4d73ef
movsx edx, al
jmp 0x4d743e
mov cl, byte [esi + 9]
test cl, cl
je 0x4d7409
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4d7409
mov ecx, esi
call fcn.0046af90
mov cl, byte [esi + 9]
mov edx, dword [esi + 4]
cmp byte [edx + 0x11], 0
jne 0x4d741c
mov dword [esp + 0x10], 0
jmp 0x4d7429
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x10], eax
test cl, cl
je 0x4d743a
add dword [esi + 0xc], 0xffffffff
jne 0x4d743a
mov ecx, esi
call fcn.0046af70
mov edx, dword [esp + 0x10]
mov ecx, ebx
call fcn.0046d950
push dword [esp + 0x18]
mov eax, dword [esp + 0x18]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [esp + 0x28]
mov byte [edi + 0xa4], al
push edi
call fcn.004d6db0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
push dword [esp + 0x18]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [esp + 0x28]
push edi
call fcn.004d6db0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
push dword [esp + 0x18]
mov byte [edi + 0xa4], 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 [esp + 0x28]
push edi
call fcn.004d6db0
and dword [edi + 0x18], 0xfffffffb
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
push dword [esp + 0x18]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [esp + 0x28]
push edi
call fcn.004d6db0
add esp, 0x10
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
mov dword [esp + 0x18], eax
nop word [eax + eax]
movzx edx, byte [eax + 0x5f91dc]
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov dword [esp + 0x48], edx
mov dword [esp + 0x14], eax
test cl, cl
je 0x4d7524
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4d7524
mov ecx, esi
call fcn.0046af90
mov cl, byte [esi + 9]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x14]
cmp edx, 0xf
jne 0x4d7533
mov eax, dword [eax]
mov eax, dword [eax + 0x64]
add eax, dword [esi + 0x14]
jmp 0x4d753f
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov eax, dword [eax + edx*4 + 0x24]
bswap eax
mov dword [esp + 0x14], eax
test cl, cl
je 0x4d7554
add dword [esi + 0xc], 0xffffffff
jne 0x4d7554
mov ecx, esi
call fcn.0046af70
mov ecx, dword [esp + 0x18]
movzx eax, byte [ecx + 0x5f91dd]
add eax, dword [esp + 0x14]
movzx edx, byte [ecx + 0x5f91dc]
mov ecx, ebx
push eax
call fcn.00476060
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
mov eax, dword [esp + 0x18]
add eax, 2
mov dword [esp + 0x18], eax
cmp eax, 0xa
jl 0x4d74f0
cmp dword [esp + 0x2c], 0
jne 0x4d75b1
mov edx, ebx
mov ecx, esi
call fcn.00478350
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d7687
cmp byte [ebx + 9], 0
je 0x4d75c7
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4d75c7
mov ecx, ebx
call fcn.0046af90
xor edx, edx
mov ecx, ebx
call fcn.0046ed40
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d75e5
xor edx, edx
mov ecx, ebx
call fcn.0046ef40
mov dword [esp + 0x10], eax
cmp byte [ebx + 9], 0
je 0x4d75f8
add dword [ebx + 0xc], 0xffffffff
jne 0x4d75f8
mov ecx, ebx
call fcn.0046af70
cmp dword [esp + 0x10], 0
jne 0x4d7687
cmp dword [esp + 0x2c], 0
jne 0x4d7687
mov cl, byte [ebx + 9]
test cl, cl
je 0x4d7624
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4d7624
mov ecx, ebx
call fcn.0046af90
mov cl, byte [ebx + 9]
mov eax, dword [esp + 0x24]
mov edx, dword [eax]
cmp byte [edx + 0x11], 0
jne 0x4d763a
mov dword [esp + 0x14], 0
jmp 0x4d7647
xor eax, eax
cmp byte [edx + 0x12], al
setne al
inc eax
mov dword [esp + 0x14], eax
test cl, cl
je 0x4d7658
add dword [ebx + 0xc], 0xffffffff
jne 0x4d7658
mov ecx, ebx
call fcn.0046af70
mov edx, dword [esp + 0x14]
mov ecx, esi
call fcn.0046d950
mov ecx, dword [esp + 0x24]
push 1
push dword [esp + 0x2c]
mov eax, dword [ecx]
mov ecx, esi
mov edx, dword [eax + 0x24]
call fcn.0046d830
add esp, 8
mov ebx, eax
jmp 0x4d768b
mov ebx, 7
jmp 0x4d768b
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [esp + 0x38]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x40]
mov dword [edi + 0x64], eax
mov eax, dword [esp + 0x44]
mov dword [edi + 0x68], eax
mov al, byte [esp + 0x1f]
push 1
push 0
mov byte [edi + 0xa4], 0
mov byte [edi + 0x58], al
call fcn.0046d830
mov esi, dword [esp + 0x38]
add esp, 8
mov byte [edi + 0x4f], 1
test esi, esi
je 0x4d76ef
mov ecx, dword [esi + 4]
call fcn.0046d480
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.004a2ee0
mov ecx, dword [esp + 0x54]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005a6fed
mov esp, ebp
pop ebp
ret