Function at 0x475f30
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x3c]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], eax
or eax, 0x2800
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
push ebx
push edi
mov edi, dword [eax + 4]
mov eax, dword [edi + 4]
mov eax, dword [eax]
movzx eax, byte [eax + 0xd]
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x40]
push str.ATTACH__AS_vacuum_db_
push esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0xc], eax
call fcn.00475e89
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
shl eax, 4
add eax, ecx
lea ecx, [eax - 0x10]
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
call fcn.00450e5c
mov eax, dword [edi + 4]
movzx ecx, word [eax + 0x16]
movzx ebx, word [eax + 0x14]
sub ebx, ecx
mov eax, edi
mov dword [ebp - 0x18], ebx
call fcn.00450ec0
mov eax, dword [edi + 4]
movzx eax, word [eax + 0x14]
push 0
push ebx
push dword [ebp - 8]
call fcn.004523ca
add esp, 0xc
test eax, eax
jne 0x47617f
cmp dword [ebp - 0xc], eax
jne 0x475fed
push eax
mov eax, dword [esi + 0x24]
push ebx
push dword [ebp - 8]
call fcn.004523ca
add esp, 0xc
test eax, eax
jne 0x47617f
cmp byte [esi + 0x1e], 0
jne 0x47617f
push str.PRAGMA_vacuum_db.synchronousOFF
push esi
call fcn.00475e89
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
mov al, byte [esi + 0x21]
test al, al
jl 0x47601b
movsx eax, al
jmp 0x476022
mov eax, edi
call fcn.004524ac
push eax
mov eax, dword [ebp - 8]
call fcn.0045245e
mov dword [esp], str.BEGIN_EXCLUSIVE_
push esi
call fcn.00475e89
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push esi
call fcn.00475ecf
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
push str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
push esi
call fcn.00475e89
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
xor ebx, ebx
mov dword [ebp - 0xc], ebx
jmp 0x4760f7
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x14]
push eax
movzx eax, byte [ebx + 0x4af888]
push eax
mov eax, edi
call fcn.00455fd5
movzx eax, byte [ebx + 0x4af889]
add eax, dword [ebp - 0x14]
push eax
movzx eax, byte [ebx + 0x4af888]
mov ebx, dword [ebp - 8]
push eax
call fcn.00456003
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 8
jl 0x4760f4
push edi
call fcn.004571c6
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
mov eax, ebx
call fcn.00452fb7
mov dword [ebp - 4], eax
test eax, eax
jne 0x476186
mov eax, ebx
call fcn.004524ac
push eax
mov eax, edi
call fcn.0045245e
mov eax, dword [ebx + 4]
movzx eax, word [eax + 0x14]
pop ecx
push 1
push dword [ebp - 0x18]
push edi
call fcn.004523ca
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x476186
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x40], eax
mov byte [esi + 0x1c], 1
test edi, edi
je 0x4761b3
mov eax, dword [edi + 4]
call fcn.00452298
and dword [edi + 4], 0
and dword [edi + 0xc], 0
xor eax, eax
mov ebx, esi
call fcn.004660bf
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret