Function at 0x49f470
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x57906c]
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 0x49f4ec
push 0
push 0x28
mov ecx, esi
call fcn.0042c5b0
mov edi, eax
add esp, 8
test edi, edi
je 0x49f4c7
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push edi
call fcn.00516430
add esp, 0xc
mov edx, dword [ebx]
test edx, edx
je 0x49f4d4
mov ecx, esi
call fcn.0042c2b0
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004c61ad
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xbc], 1
jle 0x49f512
push 0
push 0x2b
mov ecx, esi
call fcn.0042c5b0
mov edi, eax
add esp, 8
test edi, edi
je 0x49f4c7
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x49f4be
mov edi, dword [esi + 0x3c]
mov dword [ebp - 0xc], edi
test edx, edx
je 0x49f5b2
movzx ecx, word [edx + 0x10]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x564760], 3
je 0x49f560
push 0
push 0x12
mov ecx, esi
call fcn.0042c5b0
mov edi, eax
add esp, 8
test edi, edi
je 0x49f4c7
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [edi], xmm0
mov cx, word [0x56efa0]
mov word [edi + 0x10], cx
jmp 0x49f4c7
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x49f584
cmp byte [edx + 0x12], 1
jne 0x49f584
mov edx, dword [edx + 8]
mov eax, edi
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x49f5b7
test cl, 1
je 0x49f598
mov eax, edi
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x49f5b7
mov ecx, dword [ebp - 0x20]
mov dl, 1
call fcn.0044d4a0
mov edx, eax
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x49f5b7
mov edx, 0x55faaf
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 0x49f637
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x30], 0
je 0x49f63e
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.0049f330
mov ebx, eax
add esp, 0x10
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x3c], eax
test ebx, ebx
jne 0x49f96b
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 0x49f6fa
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 0x49f6f6
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x49f6af
cmp dword [ebp - 0xc], eax
jl 0x49f6f6
jg 0x49f6af
cmp dword [ebp - 0x10], eax
jbe 0x49f6f6
push 0
push 0x1b
mov ecx, esi
mov ebx, 1
call fcn.0042c5b0
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x49f6d9
push 0x1b
push str.output_file_already_exists
push eax
call fcn.00516430
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
test edx, edx
je 0x49f6ec
mov ecx, esi
call fcn.0042c2b0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
jmp 0x49f96b
or dword [esi + 0x18], 8
mov ecx, edi
call fcn.00442250
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.00441ee0
xor edx, edx
mov ecx, edi
call fcn.00441f80
mov edx, eax
mov ecx, ebx
call fcn.00441f80
mov edx, 0x21
mov ecx, ebx
call fcn.00442090
mov edx, dword [ebp - 0x14]
mov ecx, esi
push str.BEGIN
call fcn.0049f250
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49f96b
xor edx, edx
mov ecx, edi
cmp dword [ebp - 0x20], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.004428c0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49f96b
mov edx, dword [edi + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x49f78a
cmp dword [ebp - 0x20], ebx
jne 0x49f78a
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.00442160
add esp, 8
test eax, eax
jne 0x49f966
cmp dword [ebp - 0x30], eax
jne 0x49f7c5
mov edx, dword [esi + 0x64]
mov ecx, ebx
push eax
push dword [ebp - 0xc]
call fcn.00442160
add esp, 8
test eax, eax
jne 0x49f966
cmp byte [esi + 0x57], 0
jne 0x49f966
mov al, byte [esi + 0x5a]
test al, al
js 0x49f7db
movsx eax, al
jmp 0x49f7e2
mov ecx, edi
call fcn.004423e0
mov edx, eax
mov ecx, ebx
call fcn.00442360
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.0049f330
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49f96b
push dword [ebp - 0x2c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0x14]
push esi
call fcn.0049f330
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49f96b
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.0049f330
and dword [esi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49f96b
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.0049f330
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x49f96b
mov dword [ebp - 0x1c], eax
nop dword [eax]
mov cl, byte [edi + 9]
movzx ebx, byte [eax + 0x55fb6c]
mov eax, dword [edi + 4]
mov dword [ebp - 0x24], eax
test cl, cl
je 0x49f8aa
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x49f8aa
mov ecx, edi
call fcn.0043f6e0
mov cl, byte [edi + 9]
mov eax, dword [ebp - 0x24]
cmp ebx, 0xf
jne 0x49f8b9
mov eax, dword [eax]
mov ebx, dword [eax + 0x6c]
add ebx, dword [edi + 0x14]
jmp 0x49f8c5
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + ebx*4 + 0x24]
bswap ebx
test cl, cl
je 0x49f8d6
add dword [edi + 0xc], 0xffffffff
jne 0x49f8d6
mov ecx, edi
call fcn.0043f6a0
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 0x55fb6d]
movzx edx, byte [ecx + 0x55fb6c]
add eax, ebx
mov ecx, dword [ebp - 0x28]
push eax
call fcn.0044a060
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x49f96b
mov eax, dword [ebp - 0x1c]
add eax, 2
mov dword [ebp - 0x1c], eax
cmp eax, 0xa
jl 0x49f880
cmp dword [ebp - 0x20], ebx
jne 0x49f922
mov edx, dword [ebp - 0x28]
mov ecx, edi
call fcn.0044bee0
mov ebx, eax
test ebx, ebx
jne 0x49f96b
mov ecx, dword [ebp - 0x28]
call fcn.004438f0
mov ebx, eax
test ebx, ebx
jne 0x49f96b
cmp dword [ebp - 0x20], eax
jne 0x49f96b
mov ebx, dword [ebp - 0x28]
mov ecx, ebx
call fcn.004423e0
mov edx, eax
mov ecx, edi
call fcn.00442360
mov ecx, ebx
call fcn.00442250
mov ecx, dword [ebx + 4]
push 1
push eax
mov edx, dword [ecx + 0x24]
mov ecx, edi
call fcn.00442160
add esp, 8
mov ebx, eax
jmp 0x49f96b
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.00442160
mov edi, dword [ebp - 0x34]
add esp, 8
mov byte [esi + 0x55], 1
test edi, edi
je 0x49f9d4
mov ecx, dword [edi + 4]
call fcn.00441d80
mov dword [edi + 4], 0
mov dword [edi + 0xc], 0
mov ecx, esi
call fcn.00473ac0
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004c61ad
mov esp, ebp
pop ebp
ret