Function at 0x180d1f8b
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x1820f00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
lea ecx, [ebp - 0x1c]
push edi
push str.PRAGMA_auto_vacuumFULL
mov dword [ebp - 0x58], ebx
push dword [ebx + 0x40]
call fcn.180cfe94
cmp dword [eax + 8], 0
je 0x180d1fc5
push 0
mov ecx, eax
call fcn.180d0018
cmp byte [ebp - 8], 0
je 0x180d1fd6
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
push str.PRAGMA_journal_modeWAL
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180cfe94
cmp dword [eax + 8], 0
je 0x180d1ff5
push 0
mov ecx, eax
call fcn.180d0018
cmp byte [ebp - 8], 0
je 0x180d2006
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
push str.PRAGMA_synchronousNORMAL
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180cfe94
cmp dword [eax + 8], 0
je 0x180d2025
push 0
mov ecx, eax
call fcn.180d0018
cmp byte [ebp - 8], 0
je 0x180d2036
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
push ecx
lea ecx, [ebp - 0xf0]
call fcn.180ae564
mov edx, str.PRAGMA_temp_store_directory__
lea ecx, [ebp - 0xf0]
call fcn.1801eadc
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.180a9e55
mov edx, eax
mov ecx, esi
call fcn.18024dd4
mov edx, 0x181f397c
mov ecx, eax
call fcn.1801eadc
lea ecx, [ebp - 0x34]
call fcn.1801238a
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xec]
call fcn.180a7293
cmp dword [ebp - 8], 0x10
lea eax, [ebp - 0x1c]
jb 0x180d2094
mov eax, dword [ebp - 0x1c]
push eax
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180cfe94
cmp dword [eax + 8], 0
je 0x180d20af
push 0
mov ecx, eax
call fcn.180d0018
cmp byte [ebp - 0x20], 0
je 0x180d20c0
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180cfc61
lea ecx, [ebp - 0x1c]
call fcn.1801238a
lea ecx, [ebp - 0xf0]
call fcn.180ae4dd
push 0x181fa0c8
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180cfe94
cmp dword [ebp - 0x14], 0
je 0x180d24c8
push 0
lea ecx, [ebp - 0x1c]
call fcn.180d0018
test al, al
je 0x180d24c8
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x1c]
call fcn.180d2c75
test al, al
je 0x180d24c8
cmp byte [ebp - 8], 0
je 0x180d2124
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
mov eax, dword [ebp - 0x54]
cmp eax, 1
je 0x180d21a6
test eax, eax
je 0x180d2139
cmp eax, 1
jge 0x180d24d9
lea ecx, [ebp - 0x4c]
call fcn.180a9f68
push eax
mov edx, str.PRAGMA_user_version
lea ecx, [ebp - 0x1c]
call fcn.180757d9
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x180d2158
mov eax, dword [eax]
push eax
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180cfe94
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d2178
push ecx
mov ecx, eax
call fcn.180cff93
mov byte [ebp - 0x4d], al
jmp 0x180d217b
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d218c
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180cfc61
lea ecx, [ebp - 0x1c]
call fcn.1801238a
lea ecx, [ebp - 0x4c]
call fcn.1801238a
cmp byte [ebp - 0x4d], 0
je 0x180d24d9
push str.CREATE_TABLE_IF_NOT_EXISTS_events__record_id_TEXT_tenant_token_TEXT_NOT_NULL_latency_INTEGER_persistence_INTEGER_timestamp_INTEGER_retry_count_INTEGER_DEFAULT_0_reserved_until_INTEGER_DEFAULT_0_payload_BLOB_
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180cfe94
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d21ca
push ecx
mov ecx, eax
call fcn.180cff93
mov byte [ebp - 0x4d], al
jmp 0x180d21cd
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d21de
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180cfc61
cmp byte [ebp - 0x4d], 0
je 0x180d24d9
push str.CREATE_INDEX_IF_NOT_EXISTS_k_latency_timestamp_ON_events__latency_DESC__persistence_DESC__timestamp_ASC_
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180cfe94
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d220c
push ecx
mov ecx, eax
call fcn.180cff93
mov byte [ebp - 0x4d], al
jmp 0x180d220f
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d2220
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180cfc61
cmp byte [ebp - 0x4d], 0
je 0x180d24d9
push str.CREATE_TABLE_IF_NOT_EXISTS_settings__name_TEXT_value_TEXT__PRIMARY_KEY__name__
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180cfe94
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d224e
push ecx
mov ecx, eax
call fcn.180cff93
mov byte [ebp - 0x4d], al
jmp 0x180d2251
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d2262
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180cfc61
cmp byte [ebp - 0x4d], 0
je 0x180d24d9
push str.PRAGMA_page_size
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180cfe94
cmp dword [ebp - 0x14], 0
je 0x180d24c8
push 0
lea ecx, [ebp - 0x1c]
call fcn.180d0018
test al, al
je 0x180d24c8
lea eax, [ebx + 0x44]
push eax
lea ecx, [ebp - 0x1c]
call fcn.180d2c75
test al, al
je 0x180d24c8
cmp byte [ebp - 8], 0
je 0x180d22bd
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
mov ecx, dword [ebx + 0x40]
push str.BEGIN_IMMEDIATE
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.COMMIT
mov dword [ebx + 0x80], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.ROLLBACK
mov dword [ebx + 0x84], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.PRAGMA_page_count
mov dword [ebx + 0x88], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_count___FROM_events
mov dword [ebx + 0x8c], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_count___FROM_events_WHERE_latency_
mov dword [ebx + 0x90], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_tenant_token_FROM_events_ORDER_BY_persistence_ASC__timestamp_ASC_LIMIT_MAX_1__SELECT_COUNT_record_id__FROM_events______100_
mov dword [ebx + 0x94], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.DELETE_FROM_events_WHERE_record_id_IN__SELECT_record_id_FROM_events_ORDER_BY_persistence_ASC__timestamp_ASC_LIMIT_MAX_1__SELECT_COUNT_record_id__FROM_events______100__
mov dword [ebx + 0x98], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.WITH_RECURSIVE_ids_id__AS__SELECT_0_UNION_ALL_SELECT_tokenize____FROM_ids_WHERE_id_IS_NOT_NULL_LIMIT_10000_OFFSET_1__DELETE_FROM_events_WHERE_tenant_token_IN_ids
mov dword [ebx + 0x9c], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.WITH_RECURSIVE_ids_id__AS__SELECT_0_UNION_ALL_SELECT_tokenize____FROM_ids_WHERE_id_IS_NOT_NULL_LIMIT_10000_OFFSET_1__DELETE_FROM_events_WHERE_record_id_IN_ids
mov dword [ebx + 0xa8], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.UPDATE_events_SET_reserved_until0__retry_countretry_count1_WHERE_reserved_until__0_AND_reserved_until__
mov dword [ebx + 0xa0], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_record_id_tenant_token_latency_timestamp_retry_count_reserved_until_payload_FROM_events_WHERE_latency___AND_reserved_until0_ORDER_BY_latency_DESC_persistence_DESC__timestamp_ASC_LIMIT__
mov dword [ebx + 0xa4], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_record_id_tenant_token_latency_timestamp_retry_count_reserved_until_payload_FROM_events_WHERE_latency___ORDER_BY_latency_DESC_persistence_DESC__timestamp_ASC_LIMIT__
mov dword [ebx + 0xac], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_record_id_tenant_token_latency_timestamp_retry_count_reserved_until_payload_FROM_events_WHERE_latency_SELECT_MIN_latency__FROM_events_WHERE_reserved_until0_AND_latency____AND_reserved_until0_ORDER_BY_timestamp_ASC_LIMIT__
mov dword [ebx + 0xb0], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.WITH_RECURSIVE_ids_id__AS__SELECT_0_UNION_ALL_SELECT_tokenize____FROM_ids_WHERE_id_IS_NOT_NULL_LIMIT_10000_OFFSET_1__UPDATE_events_SET_reserved_until__WHERE_record_id_IN_ids
mov dword [ebx + 0xb4], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.WITH_RECURSIVE_ids_id__AS__SELECT_0_UNION_ALL_SELECT_tokenize____FROM_ids_WHERE_id_IS_NOT_NULL_LIMIT_10000_OFFSET_1__UPDATE_events_SET_reserved_until0__retry_countretry_count__WHERE_record_id_IN_ids_AND_reserved_until_0
mov dword [ebx + 0xb8], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_tenant_token_FROM_events_WHERE_retry_count__
mov dword [ebx + 0xbc], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.DELETE_FROM_events_WHERE_retry_count__
mov dword [ebx + 0xc4], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.REPLACE_INTO_events__record_id_tenant_token_latency_persistence_timestamp_payload__VALUES______________
mov dword [ebx + 0xc0], eax
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.REPLACE_INTO_settings__name_value__VALUES______
mov dword [ebx + 0xc8], eax
call fcn.180cfb4e
mov dword [ebx + 0xcc], eax
push str.DELETE_FROM_settings_WHERE_name_
mov ecx, dword [ebx + 0x40]
call fcn.180cfb4e
mov ecx, dword [ebx + 0x40]
push str.SELECT_value_FROM_settings_WHERE_name_
mov dword [ebx + 0xd0], eax
call fcn.180cfb4e
mov dword [ebx + 0xd4], eax
sub esp, 0x18
mov eax, dword [ebx]
mov ebx, esp
push 0xf
mov eax, dword [eax + 0x4c]
and dword [ebx + 0x10], 0
mov dword [ebp - 0x54], eax
pop eax
push 0x7fffffff
push eax
push 0x14
mov dword [ebx + 0x14], eax
mov byte [ebx], 0
call fcn.1801253f
mov esi, eax
add esp, 0xc
lea ecx, [esi + 1]
push ecx
call fcn.1800a1df
pop ecx
push 0x14
mov edi, eax
mov dword [ebx + 0x14], esi
pop eax
push eax
push str.DELETE_FROM_packages
push edi
mov dword [ebx + 0x10], eax
call fcn.18161b60
mov esi, dword [ebp - 0x58]
add esp, 0xc
mov byte [edi + 0x14], 0
mov ecx, esi
mov dword [ebx], edi
call dword [ebp - 0x54]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x44]
mov al, 1
jmp 0x180d24db
cmp byte [ebp - 8], 0
je 0x180d24d9
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180cfc61
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1814cf3d
leave
ret