Function at 0x4e3950
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x20], 0
mov ebx, ecx
mov dword [ebp - 8], ebx
cmp byte [edi + 0x4f], 0
jne 0x4e39e0
mov edx, dword [ebx]
test edx, edx
je 0x4e39ae
cmp dword [edi + 0x1e8], 0
je 0x4e3985
mov ecx, edi
call fcn.0047da50
jmp 0x4e39ae
cmp edx, dword [edi + 0x138]
jb 0x4e39a5
cmp edx, dword [edi + 0x13c]
jae 0x4e39a5
mov eax, dword [edi + 0x134]
mov dword [edx], eax
mov dword [edi + 0x134], edx
jmp 0x4e39ae
push edx
call fcn.0047d9e0
add esp, 4
push 0
push 0x28
mov ecx, edi
call fcn.0047ddb0
mov esi, eax
add esp, 8
test esi, esi
je 0x4e39d2
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call fcn.00573870
add esp, 0xc
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0xac], 1
jle 0x4e3a02
push str.cannot_VACUUM___SQL_statements_in_progress
call fcn.0047e150
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x14], edx
test esi, esi
je 0x4e3a93
movzx ecx, word [esi + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x61ae70], 3
je 0x4e3a42
push str.non_text_filename
mov edx, edi
mov ecx, ebx
call fcn.0047e150
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x4e3a66
cmp byte [esi + 0xa], 1
jne 0x4e3a66
mov ecx, dword [esi + 0x10]
mov eax, edx
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4e3a98
test cl, 1
je 0x4e3a7a
mov eax, edx
xor ecx, ecx
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4e3a98
mov dl, 1
mov ecx, esi
call fcn.0049c370
mov ecx, eax
mov eax, dword [edi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [edi + 0x3c], eax
jmp 0x4e3a98
mov ecx, 0x610f54
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x24]
mov edx, dword [edi + 0x20]
mov ebx, dword [edi + 0x64]
mov dword [ebp - 0x24], eax
or eax, 6
mov dword [edi + 0x24], esi
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x28], edx
and edx, 0xefffaf7f
mov dword [ebp - 0x30], ebx
or edx, 0x201
mov ebx, dword [edi + 0x68]
shl esi, 4
mov dword [edi + 0x20], edx
mov dword [ebp - 0x34], ebx
mov bl, byte [edi + 0x58]
mov byte [edi + 0x58], 0
mov edx, dword [esi + eax]
mov dword [ebp + 8], esi
mov esi, dword [esi + eax + 4]
push ecx
push str.ATTACH__Q_AS_vacuum_db
mov byte [ebp - 2], bl
mov eax, dword [esi + 4]
mov ebx, dword [ebp - 8]
push ebx
push edi
mov eax, dword [eax]
mov dword [ebp - 0x10], edx
mov al, byte [eax + 0xc]
mov byte [ebp - 1], al
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004e37e0
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x4e3e26
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]
mov dword [ebp - 0xc], ebx
je 0x4e3b8d
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4e3b89
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4e3b6d
cmp dword [ebp - 0x14], eax
jl 0x4e3b89
jg 0x4e3b6d
cmp dword [ebp - 0x18], eax
jbe 0x4e3b89
mov ecx, dword [ebp - 8]
mov edx, edi
push str.output_file_already_exists
mov ebx, 1
call fcn.0047e150
add esp, 4
jmp 0x4e3e26
or dword [edi + 0x18], 8
mov cl, byte [esi + 9]
test cl, cl
je 0x4e3ba7
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4e3ba7
mov ecx, esi
call fcn.0048f2e0
mov cl, byte [esi + 9]
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x14], edx
test cl, cl
je 0x4e3bc4
add dword [esi + 0xc], 0xffffffff
jne 0x4e3bc4
mov ecx, esi
call fcn.0048f2a0
mov eax, dword [edi + 0x10]
mov ecx, ebx
mov edx, dword [ebp + 8]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.00491850
xor edx, edx
mov ecx, esi
call fcn.004918d0
mov edx, eax
mov ecx, ebx
call fcn.004918d0
mov edx, 0x21
mov ecx, ebx
call fcn.004919d0
mov edx, dword [ebp - 8]
mov ecx, edi
push str.BEGIN
call fcn.004e3700
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4e3e26
xor edx, edx
mov ecx, esi
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00492150
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4e3e26
mov edx, dword [esi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4e3c45
mov dword [edi + 0x5c], ebx
mov edx, dword [esi + 4]
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x20]
push 0
push dword [ebp - 0x14]
call fcn.00491aa0
add esp, 8
test eax, eax
jne 0x4e3e21
cmp byte [ebp - 1], al
jne 0x4e3c80
mov edx, dword [edi + 0x5c]
mov ecx, ebx
push eax
push dword [ebp - 0x14]
call fcn.00491aa0
add esp, 8
test eax, eax
jne 0x4e3e21
cmp byte [edi + 0x51], 0
jne 0x4e3e21
mov al, byte [edi + 0x54]
test al, al
js 0x4e3c96
movsx eax, al
jmp 0x4e3c9d
mov ecx, esi
call fcn.00491cb0
mov edx, eax
mov ecx, ebx
call fcn.00491c30
push dword [ebp - 0x10]
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 - 8]
mov byte [edi + 0xa4], al
push edi
call fcn.004e37e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4e3e26
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp - 8]
push edi
call fcn.004e37e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4e3e26
push dword [ebp - 0x10]
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 - 8]
push edi
call fcn.004e37e0
and dword [edi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4e3e26
push dword [ebp - 0x10]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 8]
push edi
call fcn.004e37e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4e3e26
mov dword [ebp - 0x10], eax
nop dword [eax]
nop dword [eax + eax]
mov cl, byte [esi + 9]
movzx ebx, byte [eax + 0x6167ac]
mov eax, dword [esi + 4]
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x4e3d6a
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4e3d6a
mov ecx, esi
call fcn.0048f2e0
mov cl, byte [esi + 9]
mov eax, dword [ebp - 0x1c]
cmp ebx, 0xf
jne 0x4e3d79
mov eax, dword [eax]
mov ebx, dword [eax + 0x64]
add ebx, dword [esi + 0x14]
jmp 0x4e3d85
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + ebx*4 + 0x24]
bswap ebx
test cl, cl
je 0x4e3d96
add dword [esi + 0xc], 0xffffffff
jne 0x4e3d96
mov ecx, esi
call fcn.0048f2a0
mov ecx, dword [ebp - 0x10]
movzx eax, byte [ecx + 0x6167ad]
movzx edx, byte [ecx + 0x6167ac]
add eax, ebx
mov ecx, dword [ebp - 0xc]
push eax
call fcn.00499100
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4e3e26
mov eax, dword [ebp - 0x10]
add eax, 2
mov dword [ebp - 0x10], eax
cmp eax, 0xa
jl 0x4e3d40
cmp dword [ebp + 0xc], ebx
jne 0x4e3de2
mov edx, dword [ebp - 0xc]
mov ecx, esi
call fcn.0049afc0
mov ebx, eax
test ebx, ebx
jne 0x4e3e26
mov ecx, dword [ebp - 0xc]
call fcn.00493130
mov ebx, eax
test ebx, ebx
jne 0x4e3e26
cmp dword [ebp + 0xc], eax
jne 0x4e3e26
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.00491cb0
mov edx, eax
mov ecx, esi
call fcn.00491c30
mov eax, dword [ebx + 4]
mov ecx, esi
push 1
push dword [ebp - 0x14]
mov edx, dword [eax + 0x20]
call fcn.00491aa0
add esp, 8
mov ebx, eax
jmp 0x4e3e26
mov ebx, 7
mov eax, dword [ebp - 0x24]
or edx, 0xffffffff
mov dword [edi + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x28]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x2c]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x64], eax
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x68], eax
mov al, byte [ebp - 2]
push 1
push 0xffffffffffffffff
mov byte [edi + 0xa4], 0
mov byte [edi + 0x58], al
call fcn.00491aa0
mov esi, dword [ebp - 0x20]
add esp, 8
mov byte [edi + 0x4f], 1
test esi, esi
je 0x4e3e83
mov ecx, dword [esi + 4]
call fcn.004916d0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, edi
call fcn.004be1b0
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret