Function at 0x1007e140
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
mov dword [ebp - 0x18], eax
or eax, 0x2800
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebx + 4]
push edi
mov dword [ebp - 0x20], edx
mov edx, dword [ecx]
mov eax, dword [edx + 0x38]
xor ecx, ecx
cmp dword [eax], ecx
push 0
lea edx, [ebp - 8]
push edx
sete cl
push 0
push 0xffffffffffffffff
push str.ATTACH__AS_vacuum_db_
push esi
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], ecx
call fcn.10071980
add esp, 0x18
test eax, eax
je 0x1007e1a8
push esi
call fcn.100886e0
jmp 0x1007e1bd
mov eax, dword [ebp - 8]
push eax
call fcn.100508c0
mov ecx, dword [ebp - 8]
add esp, 4
push ecx
call fcn.1004ff00
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
mov eax, dword [esi + 4]
lea edx, [eax + eax*2]
mov eax, dword [esi + 8]
lea eax, [eax + edx*8]
mov edx, dword [eax - 0x14]
lea ecx, [eax - 0x18]
mov edi, ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
call fcn.10041eb0
mov eax, dword [ebx + 4]
movzx ecx, word [eax + 0x16]
movzx edi, word [eax + 0x14]
sub edi, ecx
cmp byte [ebx + 9], 0
mov dword [ebp - 0x14], edi
je 0x1007e219
dec dword [ebx + 0xc]
jne 0x1007e219
mov eax, dword [eax + 0x30]
test eax, eax
je 0x1007e215
push eax
call dword [0x1010a8e8]
add esp, 4
mov byte [ebx + 0xa], 0
mov edx, dword [ebx + 4]
movzx eax, word [edx + 0x14]
push 0
push edi
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.10043ce0
add esp, 0x10
test eax, eax
jne 0x1007e3f8
cmp dword [ebp - 0x10], eax
jne 0x1007e257
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 4]
push eax
push edi
push ecx
push edx
call fcn.10043ce0
add esp, 0x10
test eax, eax
jne 0x1007e3f8
cmp byte [esi + 0x1e], 0
jne 0x1007e3f8
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.1007de70
mov edi, eax
test edi, edi
jne 0x1007e3fd
mov al, byte [esi + 0x21]
test al, al
js 0x1007e281
movsx eax, al
jmp 0x1007e288
mov eax, ebx
call fcn.10043ea0
push eax
mov eax, dword [ebp - 4]
call fcn.10043e20
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
call fcn.1007de70
mov edi, eax
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, 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
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
push esi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.1007ded0
mov edi, eax
add esp, 4
test edi, edi
jne 0x1007e3fd
mov eax, 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_
call fcn.1007de70
mov edi, eax
test edi, edi
jne 0x1007e3fd
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx + 0x100e8b7c]
lea eax, [ebp - 0x10]
push eax
push edx
mov eax, ebx
call fcn.10049d70
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007e3fd
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x100e8b7d]
add ecx, dword [ebp - 0x10]
movzx edx, byte [eax + 0x100e8b7c]
mov eax, dword [ebp - 4]
push ecx
push edx
call fcn.10049ed0
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007e3fd
mov eax, dword [ebp - 8]
add eax, 2
mov dword [ebp - 8], eax
cmp eax, 8
jl 0x1007e34f
mov eax, dword [ebp - 4]
push eax
push ebx
call fcn.1004be20
mov edi, eax
add esp, 8
test edi, edi
jne 0x1007e3fd
mov eax, dword [ebp - 4]
call fcn.10044fd0
mov edi, eax
test edi, edi
jne 0x1007e3fd
mov edi, dword [ebp - 4]
mov eax, edi
call fcn.10043ea0
push eax
mov eax, ebx
call fcn.10043e20
mov ecx, dword [edi + 4]
movzx eax, word [ecx + 0x14]
mov edx, dword [ebp - 0x14]
add esp, 4
push 1
push edx
push eax
push ebx
call fcn.10043ce0
add esp, 0x10
mov edi, eax
jmp 0x1007e3fd
mov edi, 7
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov dword [esi + 0xc], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov byte [esi + 0x1c], 1
test ebx, ebx
je 0x1007e42a
mov eax, dword [ebx + 4]
call fcn.10043ac0
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 0x14], eax
push 0
push esi
call fcn.100616f0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret