Function at 0x1800239f0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov r14, r9
mov rdi, rcx
xor r13d, r13d
lea rax, [0x1801491d8]
mov rcx, qword [0x1801491d8]
cmp rcx, rax
je 0x180023a51
test byte [rcx + 0x1c], 0x10
je 0x180023a51
cmp byte [rcx + 0x19], 5
jb 0x180023a51
mov edx, 0x10
xor r9d, r9d
lea r8, [0x1801231d8]
mov rcx, qword [rcx + 0x10]
call fcn.18001fa80
mov qword [rbp + 0x77], r13
lea rax, [rbp + 0x77]
mov qword [rbp + 0x67], rax
lea rdx, [rbp + 0x67]
lea rcx, [rbp - 9]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x77]
mov qword [rsp + 0x20], rdx
mov r9d, 0xffffffff
lea r8, str.SELECT_DbVersion__UsingAdditionalSemiUniqueID__LastMaintenanceTimestamp_FROM_CacheDbInfo_LIMIT_1_
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov esi, eax
test eax, eax
jne 0x180023abe
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x78]
call qword [case.0x18001b453.0]
mov esi, eax
cmp esi, 0x64
jne 0x180024324
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x88]
call qword [case.0x18001b453.0]
cmp eax, 3
jne 0x180024324
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
xor r8d, r8d
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x98]
call qword [case.0x18001b453.0]
cmp eax, 1
jne 0x180024324
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r8d, 1
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x98]
call qword [case.0x18001b453.0]
cmp eax, 1
jne 0x180024324
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x98]
call qword [case.0x18001b453.0]
cmp eax, 1
jne 0x180024324
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
xor r8d, r8d
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0xb8]
call qword [case.0x18001b453.0]
mov esi, eax
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0xb8]
mov r8d, 1
mov rdx, qword [rbp + 0x77]
call qword [case.0x18001b453.0]
mov r15d, eax
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0xc0]
mov r8d, 2
mov rdx, qword [rbp + 0x77]
call qword [case.0x18001b453.0]
mov r12, rax
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x80]
mov rdx, qword [rbp + 0x77]
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x77], r13
test eax, eax
jne 0x18002432e
cmp esi, 2
jne 0x18002431d
mov ecx, r13d
cmp r15d, 1
sete cl
movzx eax, byte [rdi + 0x10]
cmp eax, ecx
jne 0x18002431d
mov qword [rbp + 7], r13
mov qword [rbp + 0xf], r13
mov qword [rbp + 0x17], r13
lea r8, [rbp + 7]
lea rdx, str.CacheDbInfo
mov rcx, rdi
call fcn.1800243b0
mov ebx, eax
lea r8, [rbp + 0xf]
lea rdx, str.MsgPrefix
mov rcx, rdi
call fcn.1800243b0
test eax, eax
cmovne ebx, eax
lea r8, [rbp + 0x17]
lea rdx, str.MsgCache
mov rcx, rdi
call fcn.1800243b0
test eax, eax
cmovne ebx, eax
test ebx, ebx
jne 0x18002432e
mov rcx, r14
sub rcx, r12
mov rax, rcx
neg rax
cmovs rax, rcx
cmp rax, 0x93a80
jge 0x180023ca5
lea rdx, str.PRAGMA_quick_check_
mov rcx, rdi
call fcn.180025d00
mov ebx, eax
test eax, eax
je 0x18002430d
jmp 0x18002432e
mov qword [rbp + 0x67], r13
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 0x25
lea r8, str.ATTACH_DATABASE_:memory:_AS_TempDb_
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x180023d49
mov rax, qword [rbp - 0x11]
mov rdx, qword [rax]
test rdx, rdx
je 0x180023d49
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
test ebx, ebx
jne 0x18002432e
mov qword [rbp + 0x67], rdi
lea rdx, [rbp + 0x67]
lea rcx, [rbp + 7]
call fcn.180024380
nop
lea rdx, str.CREATE_TABLE_TempDb.MsgCacheRowsToDelete_MsgRowid_INTEGER_PRIMARY_KEY__
mov rcx, rdi
call fcn.180025d00
mov ebx, eax
test eax, eax
jne 0x180024312
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x77]
mov qword [rsp + 0x20], rdx
mov r9d, 0xffffffff
lea r8, str.INSERT_INTO_TempDb.MsgCacheRowsToDelete_SELECT_MsgRowid_FROM_MsgCache_WHERE_LastUsedTimestamp_____OR_LastUsedTimestamp_____OR_MsgPrefixID_NOT_IN__SELECT_MsgPrefixID_FROM_MsgPrefix__
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov r8d, eax
test eax, eax
jne 0x180023e18
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
lea rdx, [r14 - 0x278d00]
mov r9, r13
cmp r14, 0x278d00
cmovge r9, rdx
mov r8d, 1
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x68]
call qword [case.0x18001b453.0]
mov r8d, eax
test eax, eax
jne 0x180023e18
lea r9, [r14 + 0x278d00]
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r8d, 2
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x68]
call qword [case.0x18001b453.0]
mov r8d, eax
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x1b8]
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x77], r13
test eax, eax
jne 0x180024312
mov qword [rbp + 0x67], r13
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 0x5a
lea r8, str.DELETE_FROM_MsgCache_WHERE_MsgRowid_IN__SELECT_MsgRowid_FROM_TempDb.MsgCacheRowsToDelete__
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x180023ee5
mov rax, qword [rbp - 0x11]
mov rdx, qword [rax]
test rdx, rdx
je 0x180023ee5
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
mov qword [rbp + 0x77], r13
test ebx, ebx
jne 0x180024312
xor ecx, ecx
call fcn.1800e7c08
lea rcx, [rax - 0x3c]
mov rsi, r13
cmp rax, 0x3c
cmovge rsi, rcx
lea r15, [rax + 0x3c]
mov qword [rbp + 0x67], r13
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 0x4b
lea r8, str.CREATE_TABLE_TempDb.MsgPrefixRowsToDelete_MsgPrefixID_INTEGER_PRIMARY_KEY__
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x180023faf
mov rax, qword [rbp - 0x11]
mov rdx, qword [rax]
test rdx, rdx
je 0x180023faf
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
test ebx, ebx
jne 0x180024312
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x77]
mov qword [rsp + 0x20], rdx
mov r9d, 0xffffffff
lea r8, str.INSERT_INTO_TempDb.MsgPrefixRowsToDelete_SELECT_MsgPrefixID_FROM_MsgPrefix_WHERE_MsgPrefixID_NOT_IN__SELECT_DISTINCT_MsgPrefixID_FROM_MsgCache__AND__JustCreatedFlag__0_OR_JustCreatedFlag_____OR_JustCreatedFlag______
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov r8d, eax
test eax, eax
jne 0x18002403d
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r9, rsi
mov r8d, 1
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x68]
call qword [case.0x18001b453.0]
mov r8d, eax
test eax, eax
jne 0x18002403d
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r9, r15
mov r8d, 2
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x68]
call qword [case.0x18001b453.0]
mov r8d, eax
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x1b8]
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x77], r13
test eax, eax
jne 0x180024312
mov qword [rbp + 0x67], r13
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 0x62
lea r8, str.DELETE_FROM_MsgPrefix_WHERE_MsgPrefixID_IN__SELECT_MsgPrefixID_FROM_TempDb.MsgPrefixRowsToDelete__
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x18002410a
mov rax, qword [rbp - 0x11]
mov rdx, qword [rax]
test rdx, rdx
je 0x18002410a
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
test ebx, ebx
jne 0x180024312
lea rcx, [rbp + 7]
call fcn.1800264f0
mov ebx, r13d
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
nop word [rax + rax]
mov qword [rbp + 0x67], r13
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 7
lea r8, str.VACUUM_
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov esi, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x1800241cc
mov rcx, qword [rbp - 0x11]
mov rdx, qword [rcx]
test rdx, rdx
je 0x1800241cc
mov rcx, qword [0x18014fe80]
mov r8, qword [rcx]
mov rax, qword [r8 + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
test esi, esi
je 0x1800241de
inc ebx
cmp ebx, 0x3e8
jl 0x180024130
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x77]
mov qword [rsp + 0x20], rdx
mov r9d, 0xffffffff
lea r8, str.UPDATE_CacheDbInfo_SET_LastMaintenanceTimestamp____
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov r8d, eax
test eax, eax
jne 0x18002423c
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov r9, r14
mov r8d, 1
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x68]
call qword [case.0x18001b453.0]
mov r8d, eax
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x77]
mov rax, qword [rax + 0x1b8]
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x77], r13
test eax, eax
jne 0x18002432e
mov qword [rbp + 0x67], r13
lea rax, [rbp + 0x67]
mov qword [rbp - 0x21], rax
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x19]
call fcn.1800239c0
nop
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r13
lea rdx, [rbp + 0x67]
mov qword [rsp + 0x20], rdx
mov r9d, 0x17
lea r8, str.PRAGMA_integrity_check_
mov rdx, qword [rdi + 8]
mov rax, qword [rax + 0x40]
call qword [case.0x18001b453.0]
mov rcx, qword [0x18014fe80]
mov rdx, qword [rcx]
mov r9, qword [rdx + 0x1b8]
mov r8d, eax
mov rdx, qword [rbp + 0x67]
mov rax, r9
call qword [case.0x18001b453.0]
mov ebx, eax
mov qword [rbp + 0x67], r13
cmp byte [rbp - 0x19], 0
jne 0x180024309
mov rax, qword [rbp - 0x11]
mov rdx, qword [rax]
test rdx, rdx
je 0x180024309
mov rcx, qword [0x18014fe80]
mov rax, qword [rcx]
mov rax, qword [rax + 0x80]
call qword [case.0x18001b453.0]
mov rax, qword [rbp - 0x11]
mov qword [rax], r13
test ebx, ebx
jne 0x18002432e
mov ebx, r13d
jmp 0x18002432e
lea rcx, [rbp + 7]
call fcn.1800264f0
jmp 0x18002432e
mov ebx, 0xc9
jmp 0x18002432e
mov ebx, 0xc9
test esi, esi
cmovne ebx, esi
cmp byte [rbp - 9], 0
jne 0x18002435e
mov rcx, qword [rbp - 1]
mov rdx, qword [rcx]
test rdx, rdx
je 0x18002435e
mov rcx, qword [0x18014fe80]
mov r8, qword [rcx]
mov rax, qword [r8 + 0x80]
call qword [case.0x18001b453.0]
mov rcx, qword [rbp - 1]
mov qword [rcx], r13
mov eax, ebx
mov rbx, qword [rsp + 0xd8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret