Function at 0x1401b2220
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
cmp dword [rdx + 0x38], r8d
mov rbx, rdx
mov rdi, rcx
mov ebp, r8d
cmovle ebp, dword [rdx + 0x38]
movsxd rcx, dword [rbx + 0x28]
mov edx, dword [rdx + 0x18]
mov esi, r8d
mov r12, r9
lea eax, [rdx + rcx]
lea r8d, [r8 + rax + 2]
mov rax, qword [rdi]
cmp r8d, dword [rax + 0x88]
jl 0x1401b2280
cmp edx, 4
jg 0x1401b2338
movsxd r13, dword [rbx + 0x1c]
lea eax, [rdx + rsi + 0x14]
cmp eax, r13d
ja 0x1401b25b0
movsxd rcx, dword [rbx + 0x28]
sub edx, dword [rbx + 0xc]
add rcx, qword [rbx + 0x20]
movsxd rdx, edx
cmp rdx, 0x7f
jbe 0x1401b2540
cmp rdx, 0x3fff
jbe 0x1401b2368
call sym.putVarint64
add dword [rbx + 0x28], eax
mov eax, dword [rbx + 0x18]
cmp byte [rbx + 0x4a], 0
mov dword [rbx + 0xc], eax
je 0x1401b2392
cmp dword [rbx + 8], 1
je 0x1401b2620
mov r9d, dword [rbx + 0x38]
mov r13d, esi
test r9d, r9d
je 0x1401b2305
mov rdx, qword [rbx + 0x30]
test ebp, ebp
jle 0x1401b2671
lea ecx, [rbp + 1]
mov eax, 1
jmp 0x1401b22f5
add rax, 1
cmp rax, rcx
je 0x1401b2630
movzx r11d, byte [r12 + rax - 1]
mov r13d, eax
cmp byte [rdx + rax - 1], r11b
je 0x1401b22e8
mov r8d, dword [rbx + 0x70]
test r8d, r8d
je 0x1401b2319
mov rdx, rbx
mov rcx, rdi
call sym.fts5WriteFlushBtree.part.0
mov ecx, dword [rdi + 0x3c]
test ecx, ecx
je 0x1401b2568
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rbx
mov rcx, rdi
call sym.fts5WriteFlushLeaf
mov r10d, dword [rdi + 0x3c]
test r10d, r10d
jne 0x1401b2324
mov edx, dword [rbx + 0x18]
movsxd r13, dword [rbx + 0x1c]
lea eax, [rdx + rsi + 0x14]
cmp eax, r13d
jbe 0x1401b227c
jmp 0x1401b25b0
mov rax, rdx
and edx, 0x7f
shr rax, 7
mov byte [rcx + 1], dl
or eax, 0xffffff80
mov byte [rcx], al
mov eax, 2
add dword [rbx + 0x28], eax
mov eax, dword [rbx + 0x18]
cmp byte [rbx + 0x4a], 0
mov dword [rbx + 0xc], eax
jne 0x1401b22b9
mov rcx, qword [rbx + 0x30]
test ebp, ebp
jle 0x1401b2664
movsxd rdx, ebp
xor eax, eax
jmp 0x1401b23b9
lea r9d, [rax + 1]
add rax, 1
cmp rax, rdx
je 0x1401b2550
movzx r10d, byte [r12 + rax]
lea r13, [r12 + rax]
cmp byte [rcx + rax], r10b
je 0x1401b23a8
mov ebp, esi
movsxd r15, eax
sub ebp, eax
lea r14, [rdi + 0x3c]
lea rdx, [rbx + 0x10]
mov r8, r15
mov rcx, r14
mov qword [rsp + 0x28], rdx
call sym.sqlite3Fts5BufferAppendVarint
mov rdx, qword [rsp + 0x28]
movsxd r8, esi
mov rcx, r14
sub r8, r15
call sym.sqlite3Fts5BufferAppendVarint
test ebp, ebp
je 0x1401b248f
movsxd rcx, dword [rbx + 0x18]
movsxd r14, dword [rbx + 0x1c]
mov r15, qword [rbx + 0x10]
lea eax, [rcx + rbp]
cmp eax, r14d
jbe 0x1401b247e
test r14d, r14d
mov edx, 0x40
cmove r14, rdx
cmp rax, r14
jbe 0x1401b2438
nop word [rax + rax]
add r14, r14
cmp rax, r14
ja 0x1401b2430
call sym.sqlite3_initialize
test eax, eax
jne 0x1401b2639
test r15, r15
je 0x1401b267c
cmp r14, 0x7ffffeff
ja 0x1401b2639
mov rcx, r15
mov rdx, r14
call sym.sqlite3Realloc.part.0
mov r15, rax
test r15, r15
je 0x1401b2639
mov dword [rbx + 0x1c], r14d
movsxd rcx, dword [rbx + 0x18]
mov qword [rbx + 0x10], r15
add rcx, r15
mov r8d, ebp
mov rdx, r13
call sym.memcpy
add dword [rbx + 0x18], ebp
mov dword [rbx + 0x38], 0
test esi, esi
je 0x1401b251e
movsxd rbp, dword [rbx + 0x3c]
mov r14, qword [rbx + 0x30]
mov r13d, esi
cmp esi, ebp
jbe 0x1401b250d
test ebp, ebp
mov eax, 0x40
cmove rbp, rax
cmp rbp, r13
jae 0x1401b24c8
nop dword [rax]
add rbp, rbp
cmp rbp, r13
jb 0x1401b24c0
call sym.sqlite3_initialize
test eax, eax
jne 0x1401b2645
test r14, r14
je 0x1401b2699
cmp rbp, 0x7ffffeff
ja 0x1401b2645
mov rdx, rbp
mov rcx, r14
call sym.sqlite3Realloc.part.0
test rax, rax
je 0x1401b2645
movsxd r14, dword [rbx + 0x38]
mov dword [rbx + 0x3c], ebp
mov qword [rbx + 0x30], rax
add r14, rax
mov r8, r13
mov rdx, r12
mov rcx, r14
call sym.memcpy
add dword [rbx + 0x38], esi
mov eax, 1
mov edx, dword [rbx + 8]
mov byte [rbx + 0x4a], 0
mov word [rbx + 0x48], ax
mov rax, qword [rbx + 0x58]
mov dword [rax], edx
jmp 0x1401b2324
mov byte [rcx], dl
mov eax, 1
jmp 0x1401b22a6
movsxd r15, r9d
mov ebp, esi
lea r13, [r12 + r15]
sub ebp, r9d
jmp 0x1401b23cf
lea r14, [rdi + 0x3c]
lea rdx, [rbx + 0x60]
mov r9, r12
mov r8d, r13d
mov dword [rbx + 0x68], 0
mov rcx, r14
call sym.sqlite3Fts5BufferAppendBlob
mov eax, dword [rbx + 8]
mov edx, dword [rdi + 0x3c]
mov dword [rbx + 0x70], eax
test edx, edx
jne 0x1401b2324
lea rdx, [rbx + 0x10]
mov ebp, esi
mov r13, r12
xor r15d, r15d
jmp 0x1401b23ec
cmp r13d, eax
jae 0x1401b227c
test r13d, r13d
mov edx, 0x40
cmove r13, rdx
cmp rax, r13
jbe 0x1401b25d8
nop word [rax + rax]
add r13, r13
cmp rax, r13
ja 0x1401b25d0
mov r14, qword [rbx + 0x10]
call sym.sqlite3_initialize
test eax, eax
jne 0x1401b2651
test r14, r14
je 0x1401b268c
cmp r13, 0x7ffffeff
ja 0x1401b2651
mov rdx, r13
mov rcx, r14
call sym.sqlite3Realloc.part.0
test rax, rax
je 0x1401b2651
mov dword [rbx + 0x1c], r13d
mov edx, dword [rbx + 0x18]
mov qword [rbx + 0x10], rax
jmp 0x1401b227c
lea r14, [rdi + 0x3c]
jmp 0x1401b2596
add r13d, 1
jmp 0x1401b2305
mov dword [rdi + 0x3c], 7
jmp 0x1401b248f
mov dword [rdi + 0x3c], 7
jmp 0x1401b251e
mov dword [rdi + 0x3c], 7
mov edx, dword [rbx + 0x18]
movsxd rcx, dword [rbx + 0x28]
jmp 0x1401b2280
mov ebp, esi
mov r13, r12
xor r15d, r15d
jmp 0x1401b23cf
mov r13d, 1
jmp 0x1401b2305
mov rcx, r14
call sym.sqlite3Malloc
mov r15, rax
jmp 0x1401b2469
mov rcx, r13
call sym.sqlite3Malloc
jmp 0x1401b2602
mov rcx, rbp
call sym.sqlite3Malloc
jmp 0x1401b24f6