Function at 0x510c50
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
push edi
lea edi, [ebp - 0x7c]
mov ecx, 0x1f
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [eax + 0x3f]
test ecx, ecx
jne 0x510ca8
push str.cannot_VACUUM_from_within_a_transaction
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004e79d0
add esp, 0xc
mov eax, 1
jmp 0x51114e
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x94], 1
jle 0x510cd3
push str.cannot_VACUUM___SQL_statements_in_progress
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004e79d0
add esp, 0xc
mov eax, 1
jmp 0x51114e
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x50]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x54]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xac]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
or ecx, 0x202800
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
and ecx, 0xfff5ffff
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax + 0xac], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 4]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.004d4260
add esp, 4
push eax
call fcn.004e33b0
add esp, 4
mov dword [ebp - 0x28], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005513d0
add esp, 4
test eax, eax
je 0x510d71
mov dword [ebp - 0x10], str.ATTACH_:memory:_AS_vacuum_db_
jmp 0x510d78
mov dword [ebp - 0x10], str.ATTACH__AS_vacuum_db_
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005114b0
add esp, 0xc
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
cmp eax, dword [ebp - 0x30]
jle 0x510db1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
sub edx, 1
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
add ecx, edx
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 4], 0
je 0x510dbc
jmp 0x5110d6
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
sub eax, 1
shl eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + eax + 4]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0050efc0
add esp, 4
mov edx, dword [ebp - 8]
push edx
call fcn.00511160
add esp, 4
mov dword [ebp - 0x2c], eax
push str.PRAGMA_vacuum_db.synchronousOFF
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005114b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510e13
jmp 0x5110d6
push str.BEGIN_
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.005114b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510e36
jmp 0x5110d6
push 2
mov ecx, dword [ebp - 8]
push ecx
call fcn.004ddd80
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510e52
jmp 0x5110d6
mov edx, dword [ebp - 8]
push edx
call fcn.004d4260
add esp, 4
push eax
call fcn.004db2d0
add esp, 4
cmp eax, 5
jne 0x510e76
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x48], 0
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004d51f0
add esp, 4
push eax
mov eax, dword [ebp - 0xc]
push eax
call fcn.004d47a0
add esp, 0x10
test eax, eax
jne 0x510ec8
cmp dword [ebp - 0x28], 0
jne 0x510ebc
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x48]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004d47a0
add esp, 0x10
test eax, eax
jne 0x510ec8
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx + 0x41]
test eax, eax
je 0x510ed4
mov dword [ebp - 4], 7
jmp 0x5110d6
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx + 0x43]
test edx, edx
jl 0x510eeb
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax + 0x43]
mov dword [ebp - 0x3c], ecx
jmp 0x510efa
mov edx, dword [ebp - 8]
push edx
call fcn.00511280
add esp, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.005111c0
add esp, 8
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510f2d
jmp 0x5110d6
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510f50
jmp 0x5110d6
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510f73
jmp 0x5110d6
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510f96
jmp 0x5110d6
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510fb9
jmp 0x5110d6
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.005115b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510fdc
jmp 0x5110d6
push str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.005114b0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x510fff
jmp 0x5110d6
mov dword [ebp - 0x38], 0
jmp 0x511011
mov ecx, dword [ebp - 0x38]
add ecx, 2
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 0xa
jge 0x511069
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov cl, byte [eax + 0x5793f8]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004e2ed0
add esp, 0xc
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov cl, byte [eax + 0x5793f9]
mov edx, dword [ebp - 0x34]
add edx, ecx
push edx
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov cl, byte [eax + 0x5793f8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004e2f90
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x511067
jmp 0x5110d6
jmp 0x511008
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00511300
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x511084
jmp 0x5110d6
mov edx, dword [ebp - 0xc]
push edx
call fcn.0050efc0
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x51109b
jmp 0x5110d6
mov eax, dword [ebp - 0xc]
push eax
call fcn.00511280
add esp, 4
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.005111c0
add esp, 8
push 1
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.004d51f0
add esp, 4
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.004d47a0
add esp, 0x10
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 0x50], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x54], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x20]
mov dword [edx + 0xac], eax
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov ecx, dword [ebp - 8]
push ecx
call fcn.004d47a0
add esp, 0x10
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x3f], 1
cmp dword [ebp - 0x24], 0
je 0x51113f
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 4]
push ecx
call fcn.004e5930
add esp, 4
mov edx, dword [ebp - 0x24]
mov dword [edx + 4], 0
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xc], 0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00509bb0
add esp, 4
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
add esp, 0x7c
cmp ebp, esp
call sub.MSVCRT.dll__chkesp
mov esp, ebp
pop ebp
ret