Function at 0x491420
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x57f0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x34], 0
mov edx, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp + 0xc]
cmp byte [esi + 0x55], 0
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], edx
jne 0x49149c
push 0
push 0x28
mov ecx, esi
call fcn.0041e1f0
mov edi, eax
add esp, 8
test edi, edi
je 0x491477
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push edi
call fcn.0051ad20
add esp, 0xc
mov edx, dword [ebx]
test edx, edx
je 0x491484
mov ecx, esi
call fcn.0041def0
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00518690
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xbc], 1
jle 0x4914c2
push 0
push 0x2b
mov ecx, esi
call fcn.0041e1f0
mov edi, eax
add esp, 8
test edi, edi
je 0x491477
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x49146e
mov edi, dword [esi + 0x3c]
mov dword [ebp - 0xc], edi
test edx, edx
je 0x491562
movzx ecx, word [edx + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x5699f8], 3
je 0x491510
push 0
push 0x12
mov ecx, esi
call fcn.0041e1f0
mov edi, eax
add esp, 8
test edi, edi
je 0x491477
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [edi], xmm0
mov cx, word [0x573d28]
mov word [edi + 0x10], cx
jmp 0x491477
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x491534
cmp byte [edx + 0x12], 1
jne 0x491534
mov edx, dword [edx + 8]
mov eax, edi
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x491567
test cl, 1
je 0x491548
mov eax, edi
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x491567
mov ecx, dword [ebp - 0x20]
mov dl, 1
call fcn.0043f450
mov edx, eax
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x491567
mov edx, 0x563af1
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov ebx, dword [esi + 0x68]
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x40], edi
and edi, 0xfffffffe
mov dword [esi + 0x24], edi
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x44], ebx
mov ebx, dword [esi + 0x6c]
mov dword [ebp - 0x38], eax
or eax, 6
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x48], ebx
mov ebx, dword [esi + 0x70]
mov dword [ebp - 0x3c], ecx
and ecx, 0xefffafff
shl edi, 4
or ecx, 0x201
mov dword [ebp - 0x4c], ebx
mov ebx, dword [esi + 0x74]
mov dword [esi + 0x20], ecx
mov dword [ebp - 0x50], ebx
mov bl, byte [esi + 0x5e]
mov byte [esi + 0x5e], 0
mov ecx, dword [edi + eax]
mov dword [ebp - 0x1c], edi
mov edi, dword [edi + eax + 4]
mov byte [ebp - 0x15], bl
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x2c], ecx
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x4915e7
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x30], 0
je 0x4915ee
mov dword [ebp - 0x30], 1
mov eax, dword [esi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push ebx
push esi
mov dword [ebp - 0x24], eax
call fcn.004912e0
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x3c], eax
test ebx, ebx
jne 0x49191b
mov eax, dword [ebp - 0x24]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp - 0x20], 0
mov dword [ebp - 0x34], eax
mov ebx, dword [eax + 4]
mov dword [ebp - 0x28], ebx
je 0x4916aa
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x10], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4916a6
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x49165f
cmp dword [ebp - 0xc], eax
jl 0x4916a6
jg 0x49165f
cmp dword [ebp - 0x10], eax
jbe 0x4916a6
push 0
push 0x1b
mov ecx, esi
mov ebx, 1
call fcn.0041e1f0
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x491689
push 0x1b
push str.output_file_already_exists
push eax
call fcn.0051ad20
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
test edx, edx
je 0x49169c
mov ecx, esi
call fcn.0041def0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
jmp 0x49191b
or dword [esi + 0x18], 8
mov ecx, edi
call fcn.00433e60
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov edx, dword [edx + ecx + 0xc]
mov ecx, ebx
mov edx, dword [edx + 0x50]
call fcn.00433af0
xor edx, edx
mov ecx, edi
call fcn.00433b90
mov edx, eax
mov ecx, ebx
call fcn.00433b90
mov edx, 0x21
mov ecx, ebx
call fcn.00433ca0
mov edx, dword [ebp - 0x14]
mov ecx, esi
push str.BEGIN
call fcn.00491200
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49191b
xor edx, edx
mov ecx, edi
cmp dword [ebp - 0x20], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.004344d0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49191b
mov edx, dword [edi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x49173a
cmp dword [ebp - 0x20], ebx
jne 0x49173a
mov dword [esi + 0x64], ebx
mov edx, dword [edi + 4]
mov ebx, dword [ebp - 0x28]
mov ecx, ebx
mov edx, dword [edx + 0x24]
push 0
push dword [ebp - 0xc]
call fcn.00433d70
add esp, 8
test eax, eax
jne 0x491916
cmp dword [ebp - 0x30], eax
jne 0x491775
mov edx, dword [esi + 0x64]
mov ecx, ebx
push eax
push dword [ebp - 0xc]
call fcn.00433d70
add esp, 8
test eax, eax
jne 0x491916
cmp byte [esi + 0x57], 0
jne 0x491916
mov al, byte [esi + 0x5a]
test al, al
js 0x49178b
movsx eax, al
jmp 0x491792
mov ecx, edi
call fcn.00433ff0
mov edx, eax
mov ecx, ebx
call fcn.00433f70
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x24]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 0x14]
mov byte [esi + 0xb0], al
push esi
call fcn.004912e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49191b
push dword [ebp - 0x2c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0x14]
push esi
call fcn.004912e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49191b
push dword [ebp - 0x2c]
mov byte [esi + 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 - 0x14]
push esi
call fcn.004912e0
and dword [esi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49191b
push dword [ebp - 0x2c]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 0x14]
push esi
call fcn.004912e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49191b
mov dword [ebp - 0x1c], eax
nop dword [eax]
mov cl, byte [edi + 9]
movzx ebx, byte [eax + 0x564e14]
mov eax, dword [edi + 4]
mov dword [ebp - 0x24], eax
test cl, cl
je 0x49185a
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x49185a
mov ecx, edi
call fcn.004312d0
mov cl, byte [edi + 9]
mov eax, dword [ebp - 0x24]
cmp ebx, 0xf
jne 0x491869
mov eax, dword [eax]
mov ebx, dword [eax + 0x6c]
add ebx, dword [edi + 0x14]
jmp 0x491875
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + ebx*4 + 0x24]
bswap ebx
test cl, cl
je 0x491886
add dword [edi + 0xc], 0xffffffff
jne 0x491886
mov ecx, edi
call fcn.00431290
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 0x564e15]
movzx edx, byte [ecx + 0x564e14]
add eax, ebx
mov ecx, dword [ebp - 0x28]
push eax
call fcn.0043bf60
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49191b
mov eax, dword [ebp - 0x1c]
add eax, 2
mov dword [ebp - 0x1c], eax
cmp eax, 0xa
jl 0x491830
cmp dword [ebp - 0x20], ebx
jne 0x4918d2
mov edx, dword [ebp - 0x28]
mov ecx, edi
call fcn.0043de70
mov ebx, eax
test ebx, ebx
jne 0x49191b
mov ecx, dword [ebp - 0x28]
call fcn.00435560
mov ebx, eax
test ebx, ebx
jne 0x49191b
cmp dword [ebp - 0x20], eax
jne 0x49191b
mov ebx, dword [ebp - 0x28]
mov ecx, ebx
call fcn.00433ff0
mov edx, eax
mov ecx, edi
call fcn.00433f70
mov ecx, ebx
call fcn.00433e60
mov ecx, dword [ebx + 4]
push 1
push eax
mov edx, dword [ecx + 0x24]
mov ecx, edi
call fcn.00433d70
add esp, 8
mov ebx, eax
jmp 0x49191b
mov ebx, 7
mov eax, dword [ebp - 0x38]
or edx, 0xffffffff
mov dword [esi + 0x18], eax
mov ecx, edi
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 0x6c], eax
mov eax, dword [ebp - 0x4c]
mov dword [esi + 0x70], eax
mov eax, dword [ebp - 0x50]
mov dword [esi + 0x74], eax
mov al, byte [ebp - 0x15]
push 1
push 0
mov byte [esi + 0xb0], 0
mov byte [esi + 0x5e], al
call fcn.00433d70
mov edi, dword [ebp - 0x34]
add esp, 8
mov byte [esi + 0x55], 1
test edi, edi
je 0x491984
mov ecx, dword [edi + 4]
call fcn.00433990
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov ecx, esi
call fcn.00465a40
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00518690
mov esp, ebp
pop ebp
ret