Function at 0x59d8f0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0xc], eax
cmp byte [edi + 0x3f], al
jne 0x59d983
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx]
test ecx, ecx
je 0x59d952
cmp dword [edi + 0x208], eax
je 0x59d923
push ecx
push edi
call fcn.005726e0
add esp, 8
jmp 0x59d952
cmp ecx, dword [edi + 0x114]
jb 0x59d949
cmp ecx, dword [edi + 0x118]
jae 0x59d949
mov eax, dword [edi + 0x110]
mov dword [ecx], eax
dec dword [edi + 0xfc]
mov dword [edi + 0x110], ecx
jmp 0x59d952
push ecx
call fcn.00556350
add esp, 4
push 0
push 0x28
push edi
call fcn.00586d90
mov esi, eax
add esp, 0xc
test esi, esi
je 0x59d975
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call fcn.006072a0
add esp, 0xc
pop edi
mov dword [ebx], esi
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x94], 1
jle 0x59d9a9
push str.cannot_VACUUM___SQL_statements_in_progress
push edi
push dword [ebp + 8]
call fcn.005a1400
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x50]
mov dword [ebp - 0x18], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edi + 0x54]
cmp byte [edi + 0x40], 2
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi + 0xb0]
mov dword [edi + 0xb0], 0
mov eax, dword [eax + 4]
mov esi, dword [edi + 0x14]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], ecx
mov ecx, str.ATTACH_:memory:_AS_vacuum_db_
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov al, byte [eax + 0xf]
mov byte [ebp + 0xf], al
mov eax, str.ATTACH__AS_vacuum_db_
cmove eax, ecx
push eax
push dword [ebp + 8]
push edi
call fcn.0056a080
mov ecx, dword [edi + 0x14]
add esp, 0xc
mov ebx, eax
cmp ecx, esi
jle 0x59da29
mov eax, dword [edi + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x59dde3
mov eax, dword [edi + 0x10]
shl ecx, 4
mov eax, dword [ecx + eax - 0xc]
push eax
mov dword [ebp - 4], eax
call fcn.00581d80
mov esi, dword [ebp - 8]
add esp, 4
mov cl, byte [esi + 9]
test cl, cl
je 0x59da65
inc dword [esi + 0xc]
cmp byte [esi + 0xa], bl
jne 0x59da65
push esi
call fcn.00563e10
mov cl, byte [esi + 9]
add esp, 4
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 8], edx
test cl, cl
je 0x59da84
add dword [esi + 0xc], 0xffffffff
jne 0x59da84
push esi
call fcn.005b7900
add esp, 4
push str.PRAGMA_vacuum_db.synchronousOFF
push dword [ebp + 8]
push edi
call fcn.0056a080
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
push str.BEGIN_
push dword [ebp + 8]
push edi
call fcn.0056a080
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
push 2
push esi
call fcn.00581760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x59dde6
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x59dae0
mov dword [edi + 0x48], ebx
mov ecx, dword [esi + 4]
mov ebx, dword [ebp - 4]
push 0
push dword [ebp - 8]
push dword [ecx + 0x20]
push ebx
call fcn.00583ed0
add esp, 0x10
test eax, eax
jne 0x59dddc
cmp byte [ebp + 0xf], al
jne 0x59db19
push eax
push dword [ebp - 8]
push dword [edi + 0x48]
push ebx
call fcn.00583ed0
add esp, 0x10
test eax, eax
jne 0x59dddc
cmp byte [edi + 0x41], 0
jne 0x59dddc
mov al, byte [edi + 0x43]
test al, al
js 0x59db2f
movsx eax, al
jmp 0x59db38
push esi
call fcn.00582590
add esp, 4
push eax
push ebx
call fcn.00583dc0
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
push dword [ebp + 8]
push edi
call fcn.00569fd0
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x59dde6
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push dword [ebp + 8]
push edi
call fcn.00569fd0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push dword [ebp + 8]
push edi
call fcn.00569fd0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
or dword [edi + 0x18], 0x8000000
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
push dword [ebp + 8]
push edi
call fcn.00569fd0
and dword [edi + 0x18], 0xf7ffffff
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push dword [ebp + 8]
push edi
call fcn.00569fd0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push dword [ebp + 8]
push edi
call fcn.00569fd0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
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_
push dword [ebp + 8]
push edi
call fcn.0056a080
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dde6
mov dword [ebp + 0xc], ebx
nop dword [eax]
lea eax, [ebp - 0x10]
push eax
movzx eax, byte [ebx + 0x683d6c]
push eax
push esi
call fcn.00582600
movzx eax, byte [ebx + 0x683d6d]
add eax, dword [ebp - 0x10]
push eax
movzx eax, byte [ebx + 0x683d6c]
push eax
push dword [ebp - 4]
call fcn.005842e0
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x59dde6
mov ebx, dword [ebp + 0xc]
add ebx, 2
mov dword [ebp + 0xc], ebx
cmp ebx, 0xa
jl 0x59dc10
cmp byte [esi + 9], al
je 0x59dc6e
inc dword [esi + 0xc]
cmp byte [esi + 0xa], al
jne 0x59dc6e
push esi
call fcn.00563e10
add esp, 4
mov ecx, dword [ebp - 4]
cmp byte [ecx + 9], 0
je 0x59dc8c
inc dword [ecx + 0xc]
cmp byte [ecx + 0xa], 0
jne 0x59dc8c
push ecx
call fcn.00563e10
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov ebx, dword [eax + 0x3c]
cmp dword [ebx], 0
je 0x59dcd3
mov eax, dword [ecx + 4]
mov ecx, dword [eax + 0x2c]
mov eax, dword [eax + 0x20]
cdq
push edx
push eax
push 0
push ecx
call fcn.005ea7b0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebx]
mov dword [ebp - 0x10], edx
push 0xb
push ebx
mov eax, dword [eax + 0x28]
call eax
mov ebx, eax
add esp, 0xc
cmp ebx, 0xc
je 0x59dcd3
test ebx, ebx
jne 0x59dd72
mov ecx, dword [ebp - 4]
xorps xmm0, xmm0
push SysReAllocString
mov dword [ebp - 0x54], 0
movlpd qword [ebp - 0x4c], xmm0
mov eax, dword [ecx]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
movlpd qword [ebp - 0x38], xmm0
movlpd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x44], 1
call fcn.0055b610
lea eax, [ebp - 0x54]
push eax
call fcn.0055bc20
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x59dd36
mov eax, dword [esi + 4]
mov ecx, 0xfffd
and word [eax + 0x16], cx
jmp 0x59dd72
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xf], 0
jne 0x59dd72
cmp byte [ecx + 0xc], 0
jne 0x59dd72
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x59dd62
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x59dd54
push 0
push dword [ecx + 0xcc]
call fcn.00598060
add esp, 8
mov eax, dword [ebp - 4]
cmp byte [eax + 9], 0
je 0x59dd8a
add dword [eax + 0xc], 0xffffffff
jne 0x59dd8a
push eax
call fcn.005b7900
add esp, 4
cmp byte [esi + 9], 0
je 0x59dd9f
add dword [esi + 0xc], 0xffffffff
jne 0x59dd9f
push esi
call fcn.005b7900
add esp, 4
test ebx, ebx
jne 0x59dde6
push dword [ebp - 4]
call fcn.00581d80
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x59dde6
mov ebx, dword [ebp - 4]
push ebx
call fcn.00582590
push eax
push esi
call fcn.00583dc0
mov eax, dword [ebx + 4]
push 1
push dword [ebp - 8]
push dword [eax + 0x20]
push esi
call fcn.00583ed0
add esp, 0x1c
mov ebx, eax
jmp 0x59dde6
mov ebx, 7
jmp 0x59dde6
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x1c]
push 1
mov dword [edi + 0x50], eax
mov eax, dword [ebp - 0x20]
push 0xffffffffffffffff
mov dword [edi + 0x54], eax
mov eax, dword [ebp - 0x24]
push 0xffffffffffffffff
push esi
mov dword [edi + 0xb0], eax
call fcn.00583ed0
mov esi, dword [ebp - 0xc]
add esp, 0x10
mov byte [edi + 0x3f], 1
test esi, esi
je 0x59de34
push dword [esi + 4]
call fcn.00581ab0
add esp, 4
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
push edi
call fcn.0059c9d0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret