Function at 0x481750
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x6071d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
mov dword [ebp - 0x10], ecx
push esi
push edi
mov dword [ebp - 0x2c], 0
cmp byte [ebx + 0x55], 0
mov dword [ebp - 0x24], 1
jne 0x48179f
push str.cannot_VACUUM_from_within_a_transaction
call fcn.004065d0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053b206
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0xbc], 1
jle 0x4817cb
push str.cannot_VACUUM___SQL_statements_in_progress
call fcn.004065d0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053b206
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x3c]
mov dword [ebp - 0x1c], eax
test edx, edx
je 0x481826
movzx eax, word [edx + 0x10]
and eax, 0x3f
cmp byte [eax + 0x5de208], 3
je 0x48180d
push str.non_text_filename
mov edx, ebx
call fcn.004065d0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053b206
mov esp, ebp
pop ebp
ret
push edx
call fcn.00431a40
mov ecx, dword [ebx + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [ebx + 0x3c], ecx
jmp 0x48182b
mov edx, 0x5d2d2d
mov edi, dword [ebx + 0x18]
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x68]
mov esi, dword [ebx + 0x24]
mov dword [ebp - 0x30], edi
or edi, 6
mov dword [ebx + 0x18], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebx + 0x6c]
mov dword [ebp - 0x34], eax
or eax, 0x201
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0x10]
and dword [ebx + 0x20], 0xefffafff
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebx + 0x70]
shl edi, 4
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebx + 0x74]
mov dword [ebx + 0x24], esi
and dword [ebx + 0x24], 0xfffffffe
mov dword [ebp - 0x48], ecx
mov cl, byte [ebx + 0x5e]
mov byte [ebx + 0x5e], 0
mov dword [ebp - 0x38], esi
mov esi, dword [edi + eax]
mov dword [ebp - 8], esi
mov esi, dword [edi + eax + 4]
mov byte [ebp - 9], cl
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 8], edi
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x4818ac
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x28], 0
je 0x4818b3
mov dword [ebp - 0x28], 1
mov eax, dword [ebx + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push ecx
push ebx
mov dword [ebp - 0x18], eax
call fcn.00481610
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x3c], eax
test edi, edi
jne 0x481bd9
mov eax, dword [ebp - 0x18]
shl eax, 4
add eax, dword [ebx + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x2c], eax
mov edi, dword [eax + 4]
mov dword [ebp - 0x14], edi
je 0x481965
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x20], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x48194b
mov edi, dword [ecx + 0x18]
lea edx, [ebp - 0x20]
push edx
push eax
mov ecx, edi
call dword [0x5a143c]
call edi
add esp, 8
test eax, eax
jne 0x48192c
cmp dword [ebp - 0x1c], eax
jl 0x481948
jg 0x48192c
cmp dword [ebp - 0x20], eax
jbe 0x481948
mov ecx, dword [ebp - 0x10]
mov edx, ebx
push str.output_file_already_exists
mov edi, 1
call fcn.004065d0
add esp, 4
jmp 0x481bd9
mov edi, dword [ebp - 0x14]
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp + 8]
or dword [ebx + 0x18], 8
movzx ecx, byte [ecx + eax + 8]
mov eax, dword [ebx + 0x20]
and eax, 0x38
or ecx, eax
mov dword [ebp - 0x24], ecx
mov ecx, esi
call fcn.00420300
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + ecx + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.00420130
xor edx, edx
mov ecx, esi
call fcn.00420180
mov edx, eax
mov ecx, edi
call fcn.00420180
mov edx, dword [ebp - 0x24]
mov ecx, edi
or edx, 0x20
call fcn.004201d0
mov edx, dword [ebp - 0x10]
mov ecx, ebx
push str.BEGIN
call fcn.00481530
mov edi, eax
add esp, 4
test edi, edi
jne 0x481bd9
xor edx, edx
mov ecx, esi
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00420b40
mov edi, eax
add esp, 4
test edi, edi
jne 0x481bd9
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4819f3
cmp dword [ebp + 0xc], edi
jne 0x4819f3
mov dword [ebx + 0x64], edi
mov eax, dword [esi + 4]
mov edi, dword [ebp - 0x14]
mov ecx, edi
push 0
push dword [ebp - 0x1c]
mov edx, dword [eax + 0x24]
call fcn.00420210
add esp, 8
test eax, eax
jne 0x481bd4
cmp dword [ebp - 0x28], eax
jne 0x481a31
mov edx, dword [ebx + 0x64]
mov ecx, edi
push eax
push dword [ebp - 0x1c]
call fcn.00420210
add esp, 8
test eax, eax
jne 0x481bd4
cmp byte [ebx + 0x57], 0
jne 0x481bd4
mov al, byte [ebx + 0x5a]
test al, al
js 0x481a47
movsx eax, al
jmp 0x481a4e
mov ecx, esi
call fcn.00420440
mov edx, eax
mov ecx, edi
call fcn.004203c0
push dword [ebp - 8]
mov eax, dword [ebp - 0x18]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 0x10]
mov byte [ebx + 0xb0], al
push ebx
call fcn.00481610
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x481bd9
push dword [ebp - 8]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp - 0x10]
push ebx
call fcn.00481610
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x481bd9
push dword [ebp - 8]
mov byte [ebx + 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 - 0x10]
push ebx
call fcn.00481610
and dword [ebx + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x481bd9
push dword [ebp - 8]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 0x10]
push ebx
call fcn.00481610
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x481bd9
mov dword [ebp - 8], eax
nop word [eax + eax]
cmp byte [esi + 9], 0
movzx edi, byte [eax + 0x5d95d4]
mov eax, dword [esi + 4]
mov dword [ebp - 0x18], eax
je 0x481b16
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x481b16
mov ecx, esi
call fcn.0041d670
mov eax, dword [ebp - 0x18]
cmp edi, 0xf
jne 0x481b25
mov eax, dword [eax]
mov edi, dword [eax + 0x6c]
add edi, dword [esi + 0x14]
jmp 0x481b31
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov edi, dword [eax + edi*4 + 0x24]
bswap edi
cmp byte [esi + 9], 0
je 0x481b44
add dword [esi + 0xc], 0xffffffff
jne 0x481b44
mov ecx, esi
call fcn.0041d600
mov ecx, dword [ebp - 8]
movzx eax, byte [ecx + 0x5d95d5]
movzx edx, byte [ecx + 0x5d95d4]
add eax, edi
mov ecx, dword [ebp - 0x14]
push eax
call fcn.004283b0
mov edi, eax
add esp, 4
test edi, edi
jne 0x481bd9
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
cmp eax, 0xa
jl 0x481af0
cmp dword [ebp + 0xc], edi
jne 0x481b90
mov edx, dword [ebp - 0x14]
mov ecx, esi
call fcn.0042a710
mov edi, eax
test edi, edi
jne 0x481bd9
mov ecx, dword [ebp - 0x14]
call fcn.00421880
mov edi, eax
test edi, edi
jne 0x481bd9
cmp dword [ebp + 0xc], eax
jne 0x481bd9
mov edi, dword [ebp - 0x14]
mov ecx, edi
call fcn.00420440
mov edx, eax
mov ecx, esi
call fcn.004203c0
mov ecx, edi
call fcn.00420300
mov ecx, dword [edi + 4]
push 1
push eax
mov edx, dword [ecx + 0x24]
mov ecx, esi
call fcn.00420210
add esp, 8
mov edi, eax
jmp 0x481bd9
mov edi, 7
mov eax, dword [ebp - 0x30]
or edx, 0xffffffff
mov dword [ebx + 0x18], eax
mov ecx, esi
mov eax, dword [ebp - 0x34]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebx + 0x68], eax
mov eax, dword [ebp - 0x40]
mov dword [ebx + 0x6c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebx + 0x70], eax
mov eax, dword [ebp - 0x48]
mov dword [ebx + 0x74], eax
mov al, byte [ebp - 9]
push 1
push 0
mov byte [ebx + 0xb0], 0
mov byte [ebx + 0x5e], al
call fcn.00420210
mov esi, dword [ebp - 0x2c]
add esp, 8
mov byte [ebx + 0x55], 1
test esi, esi
je 0x481c42
mov ecx, dword [esi + 4]
call fcn.00420040
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov ecx, ebx
call fcn.00453db0
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0053b206
mov esp, ebp
pop ebp
ret