Function at 0x4e7720
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x705034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x38], 0
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
cmp byte [esi + 0x4f], 0
mov dword [ebp - 0x24], ecx
jne 0x4e7772
push str.cannot_VACUUM_from_within_a_transaction
mov ecx, ebx
call fcn.00479d70
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00621f5c
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x4e77a0
push str.cannot_VACUUM___SQL_statements_in_progress
mov ecx, ebx
call fcn.00479d70
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00621f5c
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x4e77f8
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x6caa00], 3
je 0x4e77df
push str.non_text_filename
mov ecx, ebx
call fcn.00479d70
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00621f5c
mov esp, ebp
pop ebp
ret
push ecx
call fcn.004a0700
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x4e77fd
mov edx, 0x717a8c
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x40], eax
or eax, 0x201
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 0x20], eax
and dword [esi + 0x20], 0xefffaf7f
mov dword [ebp - 0x30], ecx
mov ecx, dword [esi + 0x64]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x44], ecx
or eax, 6
mov ecx, dword [esi + 0x68]
mov dword [esi + 0x18], eax
mov dword [ebp - 0x48], ecx
mov cl, byte [esi + 0x58]
mov byte [ebp - 0x15], cl
mov ecx, dword [ebp - 0x34]
mov eax, ecx
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x10]
shl edi, 4
mov byte [esi + 0x58], 0
push edx
push str.ATTACH__Q_AS_vacuum_db
mov ecx, dword [eax + edi]
mov eax, dword [eax + edi + 4]
mov dword [ebp - 0x14], eax
push ebx
push esi
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax]
movzx eax, byte [eax + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x2c], eax
call fcn.004e75a0
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x4e7b0b
mov eax, dword [ebp - 0x2c]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp - 0x24], 0
mov dword [ebp - 0x38], eax
mov edi, dword [eax + 4]
mov dword [ebp - 0x20], edi
je 0x4e78f7
mov eax, dword [edi + 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 0x4e78f3
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4e78d8
cmp dword [ebp - 0xc], eax
jl 0x4e78f3
jg 0x4e78d8
cmp dword [ebp - 0x10], eax
jbe 0x4e78f3
push str.output_file_already_exists
mov edx, esi
mov ecx, ebx
mov edi, 1
call fcn.00479d70
add esp, 4
jmp 0x4e7b0b
or dword [esi + 0x18], 8
mov ecx, dword [ebp - 0x14]
call fcn.0048fba0
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0xc], eax
mov edx, dword [ecx + edx + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.0048f970
mov ecx, dword [ebp - 0x14]
xor edx, edx
call fcn.0048f9f0
mov edx, eax
mov ecx, edi
call fcn.0048f9f0
mov edx, 0x21
mov ecx, edi
call fcn.0048fa90
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.004e74c0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4e7b0b
mov ecx, dword [ebp - 0x14]
xor edx, edx
cmp dword [ebp - 0x24], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00490100
mov edi, eax
add esp, 4
test edi, edi
jne 0x4e7b0b
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4e7984
mov dword [esi + 0x5c], edi
mov eax, dword [ecx + 4]
mov edi, dword [ebp - 0x20]
mov ecx, edi
push 0
push dword [ebp - 0xc]
mov edx, dword [eax + 0x20]
call fcn.0048fad0
add esp, 8
test eax, eax
jne 0x4e7b06
cmp dword [ebp - 0x28], eax
jne 0x4e79c2
mov edx, dword [esi + 0x5c]
mov ecx, edi
push eax
push dword [ebp - 0xc]
call fcn.0048fad0
add esp, 8
test eax, eax
jne 0x4e7b06
cmp byte [esi + 0x51], 0
jne 0x4e7b06
mov al, byte [esi + 0x54]
test al, al
js 0x4e79d8
movsx eax, al
jmp 0x4e79e0
mov ecx, dword [ebp - 0x14]
call fcn.0048fd20
mov edx, eax
mov ecx, edi
call fcn.0048fca0
push dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0xa4], al
call fcn.004e75a0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4e7b0b
push dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push esi
call fcn.004e75a0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4e7b0b
push dword [ebp - 0x1c]
mov byte [esi + 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 ebx
push esi
call fcn.004e75a0
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4e7b0b
push dword [ebp - 0x1c]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.004e75a0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4e7b0b
xor ebx, ebx
nop
movzx edx, byte [ebx + 0x6c6574]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
push eax
call fcn.00497200
movzx eax, byte [ebx + 0x6c6575]
add esp, 4
add eax, dword [ebp - 0x28]
movzx edx, byte [ebx + 0x6c6574]
mov ecx, dword [ebp - 0x20]
push eax
call fcn.00497260
mov edi, eax
add esp, 4
test edi, edi
jne 0x4e7b0b
add ebx, 2
cmp ebx, 0xa
jl 0x4e7a70
mov ebx, dword [ebp - 0x20]
cmp dword [ebp - 0x24], eax
jne 0x4e7ac9
mov ecx, dword [ebp - 0x14]
mov edx, ebx
call fcn.004994a0
mov edi, eax
test edi, edi
jne 0x4e7b0b
mov ecx, ebx
call fcn.00490f60
mov edi, eax
test edi, edi
jne 0x4e7b0b
cmp dword [ebp - 0x24], eax
jne 0x4e7b0b
mov ecx, ebx
call fcn.0048fd20
mov ecx, dword [ebp - 0x14]
mov edx, eax
call fcn.0048fca0
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x14]
push 1
push dword [ebp - 0xc]
mov edx, dword [eax + 0x20]
call fcn.0048fad0
add esp, 8
mov edi, eax
jmp 0x4e7b0b
mov edi, 7
mov eax, dword [ebp - 0x30]
or edx, 0xffffffff
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 0x68], eax
mov al, byte [ebp - 0x15]
push 1
push 0xffffffffffffffff
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.0048fad0
mov ebx, dword [ebp - 0x38]
add esp, 8
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x4e7b69
mov ecx, dword [ebx + 4]
call fcn.0048f890
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, esi
call fcn.004bf5b0
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00621f5c
mov esp, ebp
pop ebp
ret