Function at 0x180d86d4
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x1822b00c]
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.180d65dd
cmp dword [eax + 8], 0
je 0x180d870e
push 0
mov ecx, eax
call fcn.180d6761
cmp byte [ebp - 8], 0
je 0x180d871f
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
push str.PRAGMA_journal_modeWAL
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180d65dd
cmp dword [eax + 8], 0
je 0x180d873e
push 0
mov ecx, eax
call fcn.180d6761
cmp byte [ebp - 8], 0
je 0x180d874f
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
push str.PRAGMA_synchronousNORMAL
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180d65dd
cmp dword [eax + 8], 0
je 0x180d876e
push 0
mov ecx, eax
call fcn.180d6761
cmp byte [ebp - 8], 0
je 0x180d877f
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
push ecx
lea ecx, [ebp - 0xf0]
call fcn.180b4cad
mov edx, str.PRAGMA_temp_store_directory__
lea ecx, [ebp - 0xf0]
call fcn.18020d4f
lea ecx, [ebp - 0x34]
mov esi, eax
call fcn.180b059e
mov edx, eax
mov ecx, esi
call fcn.18025577
mov edx, 0x1820e2d8
mov ecx, eax
call fcn.18020d4f
lea ecx, [ebp - 0x34]
call fcn.18012edc
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xec]
call fcn.180ad9dc
cmp dword [ebp - 8], 0x10
lea eax, [ebp - 0x1c]
jb 0x180d87dd
mov eax, dword [ebp - 0x1c]
push eax
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180d65dd
cmp dword [eax + 8], 0
je 0x180d87f8
push 0
mov ecx, eax
call fcn.180d6761
cmp byte [ebp - 0x20], 0
je 0x180d8809
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180d63aa
lea ecx, [ebp - 0x1c]
call fcn.18012edc
lea ecx, [ebp - 0xf0]
call fcn.180b4c26
push 0x182158b4
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180d65dd
cmp dword [ebp - 0x14], 0
je 0x180d8c11
push 0
lea ecx, [ebp - 0x1c]
call fcn.180d6761
test al, al
je 0x180d8c11
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x1c]
call fcn.180d93be
test al, al
je 0x180d8c11
cmp byte [ebp - 8], 0
je 0x180d886d
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
mov eax, dword [ebp - 0x54]
cmp eax, 1
je 0x180d88ef
test eax, eax
je 0x180d8882
cmp eax, 1
jge 0x180d8c22
lea ecx, [ebp - 0x4c]
call fcn.180b06b1
push eax
mov edx, str.PRAGMA_user_version
lea ecx, [ebp - 0x1c]
call fcn.18079c83
pop ecx
cmp dword [eax + 0x14], 0x10
jb 0x180d88a1
mov eax, dword [eax]
push eax
push dword [ebx + 0x40]
lea ecx, [ebp - 0x34]
call fcn.180d65dd
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d88c1
push ecx
mov ecx, eax
call fcn.180d66dc
mov byte [ebp - 0x4d], al
jmp 0x180d88c4
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d88d5
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180d63aa
lea ecx, [ebp - 0x1c]
call fcn.18012edc
lea ecx, [ebp - 0x4c]
call fcn.18012edc
cmp byte [ebp - 0x4d], 0
je 0x180d8c22
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.180d65dd
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d8913
push ecx
mov ecx, eax
call fcn.180d66dc
mov byte [ebp - 0x4d], al
jmp 0x180d8916
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d8927
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180d63aa
cmp byte [ebp - 0x4d], 0
je 0x180d8c22
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.180d65dd
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d8955
push ecx
mov ecx, eax
call fcn.180d66dc
mov byte [ebp - 0x4d], al
jmp 0x180d8958
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d8969
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180d63aa
cmp byte [ebp - 0x4d], 0
je 0x180d8c22
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.180d65dd
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x180d8997
push ecx
mov ecx, eax
call fcn.180d66dc
mov byte [ebp - 0x4d], al
jmp 0x180d899a
mov byte [ebp - 0x4d], cl
cmp byte [ebp - 0x20], 0
je 0x180d89ab
push dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
call fcn.180d63aa
cmp byte [ebp - 0x4d], 0
je 0x180d8c22
push str.PRAGMA_page_size
push dword [ebx + 0x40]
lea ecx, [ebp - 0x1c]
call fcn.180d65dd
cmp dword [ebp - 0x14], 0
je 0x180d8c11
push 0
lea ecx, [ebp - 0x1c]
call fcn.180d6761
test al, al
je 0x180d8c11
lea eax, [ebx + 0x44]
push eax
lea ecx, [ebp - 0x1c]
call fcn.180d93be
test al, al
je 0x180d8c11
cmp byte [ebp - 8], 0
je 0x180d8a06
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
mov ecx, dword [ebx + 0x40]
push str.BEGIN_IMMEDIATE
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.COMMIT
mov dword [ebx + 0x80], eax
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.ROLLBACK
mov dword [ebx + 0x84], eax
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.PRAGMA_page_count
mov dword [ebx + 0x88], eax
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.SELECT_count___FROM_events
mov dword [ebx + 0x8c], eax
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.SELECT_count___FROM_events_WHERE_latency_
mov dword [ebx + 0x90], eax
call fcn.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
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.180d6297
mov ecx, dword [ebx + 0x40]
push str.SELECT_tenant_token_FROM_events_WHERE_retry_count__
mov dword [ebx + 0xbc], eax
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.DELETE_FROM_events_WHERE_retry_count__
mov dword [ebx + 0xc4], eax
call fcn.180d6297
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.180d6297
mov ecx, dword [ebx + 0x40]
push str.REPLACE_INTO_settings__name_value__VALUES______
mov dword [ebx + 0xc8], eax
call fcn.180d6297
mov dword [ebx + 0xcc], eax
push str.DELETE_FROM_settings_WHERE_name_
mov ecx, dword [ebx + 0x40]
call fcn.180d6297
mov ecx, dword [ebx + 0x40]
push str.SELECT_value_FROM_settings_WHERE_name_
mov dword [ebx + 0xd0], eax
call fcn.180d6297
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.18013091
mov esi, eax
add esp, 0xc
lea ecx, [esi + 1]
push ecx
call fcn.1800a2e0
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.18175220
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 0x180d8c24
cmp byte [ebp - 8], 0
je 0x180d8c22
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
call fcn.180d63aa
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.181605f4
leave
ret