Function at 0x476820
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x44
push ebx
push ebp
mov ebp, dword [esp + 0x54]
cmp byte [ebp + 0x55], 0
push esi
mov ebx, 1
push edi
mov edi, eax
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], ebx
jne 0x47685e
mov edi, dword [esp + 0x58]
mov eax, str.cannot_VACUUM_from_within_a_transaction
mov esi, ebp
call fcn.00420e40
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
cmp dword [ebp + 0xbc], ebx
jle 0x476880
mov edi, dword [esp + 0x58]
mov eax, str.cannot_VACUUM___SQL_statements_in_progress
mov esi, ebp
call fcn.00420e40
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov edx, dword [esp + 0x60]
mov eax, dword [ebp + 0x3c]
mov dword [esp + 0x14], eax
test edx, edx
je 0x4768d0
push edx
call fcn.00411c50
add esp, 4
cmp eax, 3
je 0x4768b7
mov edi, dword [esp + 0x58]
mov eax, str.non_text_filename
mov esi, ebp
call fcn.00420e40
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
push edx
call fcn.00428570
mov ecx, dword [ebp + 0x3c]
and ecx, 0xfffffffe
add esp, 4
or ecx, 6
mov edx, eax
mov dword [ebp + 0x3c], ecx
jmp 0x4768d5
mov edx, 0x4c5279
mov ebx, dword [ebp + 0x68]
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x24]
mov dword [esp + 0x44], ebx
mov ebx, dword [ebp + 0x6c]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], ebx
mov ebx, dword [ebp + 0x70]
or eax, 0x201
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x10]
and dword [ebp + 0x20], 0xefffafff
mov dword [esp + 0x38], esi
or esi, 6
mov dword [ebp + 0x18], esi
mov dword [esp + 0x4c], ebx
mov ebx, dword [ebp + 0x74]
shl edi, 4
mov esi, edi
mov dword [ebp + 0x24], ecx
and dword [ebp + 0x24], 0xfffffffe
add eax, esi
mov dword [esp + 0x50], ebx
mov bl, byte [ebp + 0x5e]
mov byte [ebp + 0x5e], 0
mov edi, dword [eax + 4]
mov dword [esp + 0x40], ecx
mov ecx, dword [eax]
mov eax, edi
mov byte [esp + 0x5c], bl
mov dword [esp + 0x24], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x10], edi
call fcn.00410380
call fcn.0040e860
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x14]
push edx
mov dword [esp + 0x20], eax
push str.ATTACH__Q_AS_vacuum_db
push ecx
mov eax, ebp
call fcn.004767e0
mov edx, dword [esp + 0x20]
mov dword [ebp + 0x3c], edx
mov ebx, eax
xor edx, edx
add esp, 0xc
cmp ebx, edx
jne 0x4769fa
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, dword [ebp + 0x10]
mov ebx, dword [eax + 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebx
cmp dword [esp + 0x60], edx
je 0x476a91
mov eax, ebx
call fcn.00410380
call fcn.0040e8c0
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
cmp dword [eax], edx
je 0x476a79
lea edx, [esp + 0x28]
call fcn.00409920
test eax, eax
jne 0x4769e1
cmp dword [esp + 0x2c], eax
jl 0x476a79
jg 0x4769e1
cmp dword [esp + 0x28], eax
jbe 0x476a79
mov edi, dword [esp + 0x58]
mov eax, str.output_file_already_exists
mov esi, ebp
mov ebx, 1
call fcn.00420e40
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
push 1
mov dword [ebp + 0x18], eax
mov eax, dword [esp + 0x48]
mov dword [ebp + 0x20], ecx
mov ecx, dword [esp + 0x4c]
push 0
mov dword [ebp + 0x24], edx
mov edx, dword [esp + 0x54]
mov dword [ebp + 0x68], eax
mov eax, dword [esp + 0x58]
mov dword [ebp + 0x6c], ecx
mov cl, byte [esp + 0x64]
push 0xffffffffffffffff
push edi
mov byte [ebp + 0xb0], 0
mov dword [ebp + 0x70], edx
mov dword [ebp + 0x74], eax
mov byte [ebp + 0x5e], cl
call fcn.004469e0
mov esi, dword [esp + 0x30]
xor edi, edi
add esp, 0x10
mov byte [ebp + 0x55], 1
cmp esi, edi
je 0x476a68
mov edx, dword [esi + 4]
push edx
call fcn.0045e000
add esp, 4
mov dword [esi + 4], edi
mov dword [esi + 0xc], edi
mov esi, ebp
call fcn.0042ddb0
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
or dword [ebp + 0x18], 8
mov eax, dword [ebp + 0x10]
movzx eax, byte [esi + eax + 8]
mov ecx, dword [ebp + 0x20]
and ecx, 0x38
or eax, ecx
mov dword [esp + 0x18], eax
mov esi, edi
call fcn.0041c9e0
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + edx + 0xc]
mov edx, dword [ecx + 0x50]
push edx
mov esi, ebx
call fcn.0041c950
push 0
mov esi, edi
call fcn.0041c980
push eax
mov esi, ebx
call fcn.0041c980
mov eax, dword [esp + 0x24]
or eax, 0x20
push eax
call fcn.0041c9b0
mov eax, dword [esp + 0x68]
push str.BEGIN
push eax
push ebp
call fcn.00476700
mov ebx, eax
add esp, 0x1c
test ebx, ebx
jne 0x4769fa
mov esi, dword [esp + 0x60]
mov ecx, esi
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
push eax
add ecx, 2
push ecx
push edi
call fcn.0044a840
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4769fa
mov eax, edi
call fcn.00410380
call fcn.0040e910
cmp eax, 5
jne 0x476b2a
test esi, esi
jne 0x476b2a
mov dword [ebp + 0x64], ebx
mov ebx, dword [esp + 0x28]
push 0
push ebx
mov eax, edi
call fcn.0040ffe0
mov esi, dword [esp + 0x1c]
push eax
push esi
call fcn.004469e0
add esp, 0x10
test eax, eax
jne 0x476ce4
cmp dword [esp + 0x30], eax
jne 0x476b6b
mov edx, dword [ebp + 0x64]
push eax
push ebx
push edx
push esi
call fcn.004469e0
add esp, 0x10
test eax, eax
jne 0x476ce4
cmp byte [ebp + 0x57], 0
jne 0x476ce4
mov al, byte [ebp + 0x5a]
test al, al
jl 0x476b81
movsx eax, al
jmp 0x476b86
call fcn.0041caf0
push eax
mov edi, esi
call fcn.0041ca90
mov esi, dword [esp + 0x38]
mov al, byte [esp + 0x20]
mov edi, dword [esp + 0x5c]
push esi
mov byte [ebp + 0xb0], al
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push edi
mov eax, ebp
call fcn.004767e0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4769f6
push esi
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push edi
mov eax, ebp
call fcn.004767e0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4769f6
push esi
mov byte [ebp + 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 edi
mov eax, ebp
call fcn.004767e0
and dword [ebp + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4769f6
push esi
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push edi
mov eax, ebp
call fcn.004767e0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4769f6
xor edi, edi
mov dword [esp + 0x18], edi
jmp 0x476c24
mov edi, dword [esp + 0x18]
movzx edx, byte [edi + 0x4c9944]
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x34]
push ecx
push edx
call fcn.0041cb60
movzx eax, byte [edi + 0x4c9945]
add eax, dword [esp + 0x3c]
movzx ecx, byte [edi + 0x4c9944]
mov esi, dword [esp + 0x1c]
push eax
push ecx
mov edi, esi
call fcn.00421e50
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4769f6
mov eax, dword [esp + 0x18]
add eax, 2
cmp eax, 0xa
mov dword [esp + 0x18], eax
jl 0x476c20
mov edi, dword [esp + 0x60]
test edi, edi
jne 0x476c95
mov edx, dword [esp + 0x10]
push edx
call fcn.00461750
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4769f6
mov eax, esi
call fcn.00455c00
mov ebx, eax
test ebx, ebx
jne 0x4769f6
test edi, edi
jne 0x4769f6
mov edi, esi
call fcn.0041caf0
mov edi, dword [esp + 0x10]
push eax
call fcn.0041ca90
add esp, 4
call fcn.0041c9e0
push 1
push eax
mov eax, dword [esp + 0x1c]
call fcn.0040ffe0
push eax
push edi
call fcn.004469e0
add esp, 0x10
mov ebx, eax
jmp 0x4769fa
mov ebx, 7
jmp 0x4769fa