Function at 0x1401773ec
Capabilities:
Reference sql statements

Disassembly:
mov rax, rsp
push rbp
push rdi
push r13
lea rbp, [rax - 0xc8]
sub rsp, 0x1b0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14031fcd0]
xor rax, rsp
mov qword [rbp + 0xa8], rax
mov rbx, rcx
lea r8, str.PRAGMA_auto_vacuumFULL
mov rdx, qword [rcx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
xor esi, esi
cmp qword [rax + 0x10], rsi
je 0x14017744e
xor edx, edx
mov rcx, rax
call fcn.14017854c
nop
cmp byte [rbp + 0x80], sil
je 0x140177465
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
lea r8, str.PRAGMA_journal_modeWAL
mov rdx, qword [rbx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x14017748b
xor edx, edx
mov rcx, rax
call fcn.14017854c
nop
cmp byte [rbp + 0x80], sil
je 0x1401774a2
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
lea r8, str.PRAGMA_synchronousNORMAL
mov rdx, qword [rbx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x1401774c8
xor edx, edx
mov rcx, rax
call fcn.14017854c
nop
cmp byte [rbp + 0x80], sil
je 0x1401774df
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
mov edx, 2
lea r8d, [rdx - 1]
lea rcx, [rsp + 0x70]
call fcn.14010fffc
nop
lea rcx, [rbp + 0x88]
call fcn.14010e6b0
mov rdi, rax
lea rdx, str.PRAGMA_temp_store_directory__
lea rcx, [rsp + 0x70]
call fcn.14002206c
mov r8, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0x10
jb 0x140177521
mov rdi, qword [rdi]
mov rdx, rdi
mov rcx, rax
call fcn.14003d08c
mov rcx, rax
lea rdx, [0x14029c924]
call fcn.14002206c
nop
mov r13d, 0x1000
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x14017757f
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, r13
jb 0x14017757a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140177cb4
call fcn.1400b19ec
lea rdx, [rbp + 0x88]
lea rcx, [rsp + 0x78]
call fcn.14010da28
nop
lea r8, [rbp + 0x88]
cmp qword [rbp + 0xa0], 0x10
cmovae r8, qword [rbp + 0x88]
mov rdx, qword [rbx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x1401775c7
xor edx, edx
mov rcx, rax
call fcn.14017854c
nop
cmp byte [rbp + 0x80], sil
je 0x1401775de
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x14017761b
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, r13
jb 0x140177616
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140177cba
call fcn.1400b19ec
cmp dword [reloc.WS2_32.dll_accept], 3
jl 0x140177644
mov r9, qword [0x14033b4d8]
lea r8, str.Set_sqlite3_temp_store_directory_to__s
lea rdx, str.EventsSDK.Storage
mov ecx, 3
call fcn.14010b1f4
nop
lea rcx, [rbp - 8]
call fcn.14006ecf4
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp - 8], rax
lea rcx, [rbp - 8]
call fcn.14008d53c
nop
lea r8, [0x1402ab1d8]
mov rdx, qword [rbx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
mov rax, qword [rbp + 0x70]
test rax, rax
je 0x140177694
xor edx, edx
lea rcx, [rbp + 0x60]
call fcn.14017854c
mov cl, al
mov rax, qword [rbp + 0x70]
jmp 0x140177697
mov cl, sil
test cl, cl
je 0x140177c6e
test rax, rax
je 0x140177c6e
lea rcx, [rbp + 0x60]
call fcn.140176f84
test al, al
je 0x140177c6e
mov rcx, qword [0x140320bb8]
mov rax, qword [rcx]
xor r8d, r8d
mov rdx, qword [rbp + 0x70]
mov rax, qword [rax + 0x58]
call qword [str.PS_]
mov edi, eax
cmp byte [rbp + 0x80], sil
je 0x1401776ed
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
cmp edi, 1
je 0x140177854
test edi, edi
jne 0x14017771a
lea ecx, [rdi + 4]
cmp dword [reloc.WS2_32.dll_accept], ecx
jl 0x14017774f
lea r8, str.No_stored_version_found__assuming_fresh_database
lea rdx, str.EventsSDK.Storage
call fcn.14010b1f4
jmp 0x14017774f
cmp edi, 1
jge 0x14017787f
cmp dword [reloc.WS2_32.dll_accept], 3
jl 0x14017774f
mov dword [rsp + 0x20], 1
mov r9d, edi
lea r8, str.Database_has_older_version__d__upgrading_to__d
lea rdx, str.EventsSDK.Storage
mov ecx, 3
call fcn.14010b1f4
mov edx, 1
lea rcx, [rbp + 0x60]
call fcn.14010e864
nop
mov r8, rax
lea rdx, str.PRAGMA_user_version
lea rcx, [rbp + 0x88]
call fcn.140111f44
nop
cmp qword [rax + 0x18], 0x10
jb 0x14017777f
mov rax, qword [rax]
mov r8, rax
mov rdx, qword [rbx + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x1401777a6
xor edx, edx
mov rcx, rax
call fcn.140176e10
mov dil, al
jmp 0x1401777a9
mov dil, sil
cmp byte [rsp + 0x50], sil
je 0x1401777c0
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
call fcn.14017836c
nop
mov rdx, qword [rbp + 0xa0]
cmp rdx, 0x10
jb 0x1401777fd
inc rdx
mov rcx, qword [rbp + 0x88]
mov rax, rcx
cmp rdx, r13
jb 0x1401777f8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140177cc0
call fcn.1400b19ec
movdqa xmm0, xmmword [0x1402d2f30]
movdqu xmmword [rbp + 0x98], xmm0
mov byte [rbp + 0x88], sil
mov rdx, qword [rbp + 0x78]
cmp rdx, 0x10
jb 0x14017784b
inc rdx
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, r13
jb 0x140177846
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140177cae
call fcn.1400b19ec
test dil, dil
je 0x140177c85
lea r8, 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_
mov rdx, qword [rbx + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x1401778b4
xor edx, edx
mov rcx, rax
call fcn.140176e10
mov dil, al
jmp 0x1401778b7
cmp dword [reloc.WS2_32.dll_accept], 2
jl 0x140177c85
mov dword [rsp + 0x20], 1
mov r9d, edi
lea r8, str.Database_version__d_is_newer_than_current__d__erasing_and_replacing_with_new
lea rdx, str.EventsSDK.Storage
mov ecx, 2
call fcn.14010b1f4
jmp 0x140177c85
mov dil, sil
cmp byte [rsp + 0x50], sil
je 0x1401778ce
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
call fcn.14017836c
nop
test dil, dil
je 0x140177c85
lea r8, str.CREATE_INDEX_IF_NOT_EXISTS_k_latency_timestamp_ON_events__latency_DESC__persistence_DESC__timestamp_ASC_
mov rdx, qword [rbx + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x140177902
xor edx, edx
mov rcx, rax
call fcn.140176e10
mov dil, al
jmp 0x140177905
mov dil, sil
cmp byte [rsp + 0x50], sil
je 0x14017791c
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
call fcn.14017836c
nop
test dil, dil
je 0x140177c85
lea r8, str.CREATE_TABLE_IF_NOT_EXISTS_settings__name_TEXT_value_TEXT__PRIMARY_KEY__name__
mov rdx, qword [rbx + 0x70]
lea rcx, [rsp + 0x30]
call fcn.140172bb4
nop
cmp qword [rax + 0x10], rsi
je 0x140177950
xor edx, edx
mov rcx, rax
call fcn.140176e10
mov dil, al
jmp 0x140177953
mov dil, sil
cmp byte [rsp + 0x50], sil
je 0x14017796a
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
call fcn.14017836c
nop
test dil, dil
je 0x140177c85
lea r8, str.PRAGMA_page_size
mov rdx, qword [rbx + 0x70]
lea rcx, [rbp + 0x60]
call fcn.140172bb4
nop
mov rax, qword [rbp + 0x70]
test rax, rax
je 0x1401779a4
xor edx, edx
lea rcx, [rbp + 0x60]
call fcn.14017854c
mov cl, al
mov rax, qword [rbp + 0x70]
jmp 0x1401779a7
mov cl, sil
test cl, cl
je 0x140177c55
test rax, rax
je 0x140177c55
lea rcx, [rbp + 0x60]
call fcn.140176f84
test al, al
je 0x140177c55
mov rcx, qword [0x140320bb8]
mov rax, qword [rcx]
xor r8d, r8d
mov rdx, qword [rbp + 0x70]
mov rax, qword [rax + 0x58]
call qword [str.PS_]
mov dword [rbx + 0x78], eax
cmp byte [rbp + 0x80], sil
je 0x1401779fe
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
lea rdx, str.BEGIN_IMMEDIATE
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0xd8], rax
lea rdx, [0x1402ab488]
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0xe0], rax
lea rdx, [0x1402ab490]
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0xe8], rax
lea rdx, str.PRAGMA_page_count
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0xf0], rax
lea rdx, str.SELECT_count___FROM_events
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0xf8], rax
lea rdx, str.SELECT_count___FROM_events_WHERE_latency_
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x100], rax
lea rdx, str.SELECT_tenant_token_FROM_events_ORDER_BY_persistence_ASC__timestamp_ASC_LIMIT_MAX_1__SELECT_COUNT_record_id__FROM_events______100_
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x108], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x110], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x128], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x118], rax
lea rdx, str.UPDATE_events_SET_reserved_until0__retry_countretry_count1_WHERE_reserved_until__0_AND_reserved_until__
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x120], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x130], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x138], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x140], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x148], rax
lea rdx, 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 rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x150], rax
lea rdx, str.SELECT_tenant_token_FROM_events_WHERE_retry_count__
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x160], rax
lea rdx, str.DELETE_FROM_events_WHERE_retry_count__
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x158], rax
lea rdx, str.REPLACE_INTO_events__record_id_tenant_token_latency_persistence_timestamp_payload__VALUES______________
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x168], rax
lea rdx, str.REPLACE_INTO_settings__name_value__VALUES______
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x170], rax
lea rdx, str.DELETE_FROM_settings_WHERE_name_
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x178], rax
lea rdx, str.SELECT_value_FROM_settings_WHERE_name_
mov rcx, qword [rbx + 0x70]
call fcn.140177e88
mov qword [rbx + 0x180], rax
mov qword [rbp + 0x98], rsi
mov qword [rbp + 0xa0], SafeArrayGetElement
mov byte [rbp + 0x88], sil
lea rdx, str.DELETE_FROM_packages
lea rcx, [rbp + 0x88]
call fcn.14004a450
mov rdx, qword [rbx]
mov rax, qword [rdx + 0xa8]
lea rdx, [rbp + 0x88]
mov rcx, rbx
call qword [str.PS_]
mov rdx, qword [rbx]
mov rcx, rbx
mov rax, qword [rdx + 0x98]
call qword [str.PS_]
mov al, 1
jmp 0x140177c87
cmp byte [rbp + 0x80], sil
je 0x140177c6c
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
jmp 0x140177c85
cmp byte [rbp + 0x80], sil
je 0x140177c85
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x60]
call fcn.14017836c
nop
xor al, al
mov rcx, qword [rbp + 0xa8]
xor rcx, rsp
call fcn.1400b1670
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop rdi
pop rbp
ret
call fcn.1400c6548
nop
call fcn.1400c6548
nop
call fcn.1400c6548
nop
call fcn.1400c6548
int3