Function at 0x1401b9890
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, 0x58
mov rbx, qword [rcx + 8]
cmp byte [rcx + 0x11], 0
mov r14, qword [rbx]
mov rsi, rcx
mov r12d, edx
mov r13, r8
je 0x1401b98c4
add dword [rcx + 0x14], 1
cmp byte [rcx + 0x12], 0
je 0x1401b99d0
movzx eax, byte [rsi + 0x10]
cmp al, 2
je 0x1401b99e1
cmp al, 1
jne 0x1401b98dd
test r12d, r12d
je 0x1401b9ded
mov rdx, qword [rsi]
movzx eax, word [rbx + 0x28]
test byte [rdx + 0x33], 2
je 0x1401b9940
cmp byte [r14 + 0x12], 0
jne 0x1401b9940
and eax, 0xfffffffe
mov word [rbx + 0x28], ax
test r12d, r12d
je 0x1401b994f
cmp byte [rbx + 0x24], 2
je 0x1401b9953
test al, 0x80
jne 0x1401b9953
cmp r12d, 1
jle 0x1401b996b
mov rax, qword [rbx + 0x78]
test rax, rax
jne 0x1401b9929
jmp 0x1401b996b
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1401b996b
mov rdx, qword [rax]
cmp rdx, rsi
je 0x1401b9920
mov rax, qword [rdx]
jmp 0x1401b995d
mov edx, eax
and edx, 1
test dx, dx
je 0x1401b98f8
test r12d, r12d
jne 0x1401b99c6
test al, 0x80
je 0x1401b996b
mov rax, qword [rbx + 0x80]
mov rax, qword [rax]
mov edi, 0x106
test rax, rax
jne 0x1401b9b7d
mov r8d, 1
mov edx, 1
mov rcx, rsi
call dbg.querySharedCacheTableLock
mov edi, eax
test eax, eax
jne 0x1401b9b7d
movzx eax, word [rbx + 0x28]
mov r9d, dword [rbx + 0x40]
and eax, 0xffffffef
mov word [rbx + 0x28], ax
test r9d, r9d
je 0x1401b9d18
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1401b9a10
test r12d, r12d
je 0x1401b9db0
test byte [rbx + 0x28], 1
je 0x1401b9bd0
cmp byte [rbx + 0x24], 0
je 0x1401b9bc0
mov edi, 8
jmp 0x1401b9b7d
call dbg.btreeLockCarefully
movzx eax, byte [rsi + 0x10]
cmp al, 2
jne 0x1401b98d0
test r13, r13
je 0x1401b99f7
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
test r12d, r12d
jne 0x1401b9d80
xor edi, edi
jmp 0x1401b9b7d
mov rcx, qword [rbx]
call dbg.sqlite3PagerSharedLock
mov edi, eax
movzx r15d, al
test eax, eax
jne 0x1401b9b06
xor r9d, r9d
lea r8, [rsp + 0x48]
mov edx, 1
mov rcx, rbx
call sym.btreeGetPage
mov edi, eax
test eax, eax
jne 0x1401b9b02
mov rbp, qword [rsp + 0x48]
mov rcx, qword [rbx]
mov r9, qword [rbp + 0x50]
mov r10d, dword [rcx + 0x20]
mov eax, dword [r9 + 0x1c]
mov r15d, r10d
test eax, eax
je 0x1401b9a6e
mov edi, dword [r9 + 0x18]
cmp dword [r9 + 0x5c], edi
je 0x1401b9e30
mov rax, qword [rbx + 8]
test byte [rax + 0x33], 2
jne 0x1401b9a81
test r15d, r15d
jne 0x1401b9ee0
mov r8d, dword [rbx + 0x38]
xor r15d, r15d
lea ecx, [r8 - 0xc]
mov r9d, 0x80808081
sub r8d, 0x23
mov qword [rbx + 0x18], rbp
mov eax, ecx
shl ecx, 5
mov word [rbx + 0x2e], r8w
mov edx, ecx
shl eax, 6
mov dword [rbx + 0x40], r15d
imul rdx, r9
imul rax, r9
shr rdx, 0x27
sub edx, 0x17
shr rax, 0x27
sub eax, 0x17
mov word [rbx + 0x2c], dx
mov word [rbx + 0x30], dx
mov edx, 0x7f
cmp ax, dx
mov word [rbx + 0x2a], ax
cmova eax, edx
mov byte [rbx + 0x25], al
jmp 0x1401b99a4
add dword [rbp + 0x288], 1
cmp qword [rbx + 0x18], 0
je 0x1401b9a10
test edi, edi
je 0x1401b9db0
movzx r15d, dil
cmp byte [rbx + 0x24], 0
jne 0x1401b9b3c
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1401b9b3c
mov rcx, qword [rbp + 0x70]
mov qword [rbx + 0x18], 0
mov rbp, qword [rcx + 0x28]
call dbg.sqlite3PcacheRelease
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x18], 0
je 0x1401b9d08
cmp r15d, 5
jne 0x1401b9b7d
cmp byte [rbx + 0x24], 0
jne 0x1401b9b7d
mov rbp, qword [rbx + 8]
mov rax, qword [rbp + 0x278]
test rax, rax
je 0x1401b9b7d
mov edx, dword [rbp + 0x288]
test edx, edx
js 0x1401b9b7d
mov rcx, qword [rbp + 0x280]
call rax
test eax, eax
jne 0x1401b9ae8
mov dword [rbp + 0x288], 0xffffffff
cmp byte [rsi + 0x11], 0
je 0x1401b9b8d
sub dword [rsi + 0x14], 1
je 0x1401b9e10
mov eax, edi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [rbx + 0x24], 0
jne 0x1401b99c6
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1401b99c6
nop word [rax + rax]
mov r15d, 8
mov edi, 8
jmp 0x1401b9b15
mov rax, qword [rsi]
mov edi, dword [r14 + 0x30]
movzx eax, byte [rax + 0x66]
test edi, edi
jne 0x1401b9ca8
cmp al, 2
sete byte [r14 + 0x1a]
cmp byte [r14 + 0x15], 1
je 0x1401b9c00
mov rcx, rbx
call dbg.newDatabase
mov edi, eax
jmp 0x1401b9afa
mov rbp, qword [r14 + 0x128]
test rbp, rbp
je 0x1401b9f3b
cmp byte [r14 + 8], 0
je 0x1401b9c6c
cmp byte [rbp + 0x3f], 0
jne 0x1401b9e40
mov edx, 4
mov rcx, r14
call sym.pagerLockDb
mov edi, eax
test eax, eax
jne 0x1401b9ca8
mov rdi, qword [r14 + 0x128]
cmp byte [rdi + 0x3f], 0
mov rbp, rdi
jne 0x1401b9c68
mov rcx, qword [rdi + 8]
movsx edx, word [rdi + 0x3c]
mov r9d, 5
mov r8d, 1
mov rax, qword [rcx]
add edx, 3
call qword [rax + 0x70]
mov rbp, qword [r14 + 0x128]
mov byte [rdi + 0x3f], 1
cmp byte [rbp + 0x42], 0
jne 0x1401b9ba0
cmp byte [rbp + 0x3f], 0
jne 0x1401b9e4a
mov rcx, qword [rbp + 8]
mov r9d, 0xa
mov r8d, 1
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x70]
mov edi, eax
test eax, eax
je 0x1401b9e4a
nop word [rax + rax]
cmp edi, 0x205
jne 0x1401b9b02
cmp byte [rbx + 0x24], 0
jne 0x1401b9e20
mov rax, qword [rbx + 0x18]
mov edi, 5
test rax, rax
je 0x1401b9b48
mov rcx, qword [rax + 0x70]
mov qword [rbx + 0x18], 0
mov rdi, qword [rcx + 0x28]
call dbg.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
je 0x1401ba0cc
mov edi, 5
jmp 0x1401b9b42
mov rcx, rbp
call dbg.pagerUnlockAndRollback
jmp 0x1401b9b3c
or eax, 0x10
mov word [rbx + 0x28], ax
jmp 0x1401b99a0
mov byte [rsi + 0x10], 2
cmp al, 1
ja 0x1401b9d34
mov byte [rbx + 0x24], 2
movzx eax, word [rbx + 0x28]
mov rbp, qword [rbx + 0x18]
mov qword [rbx + 0x80], rsi
mov edx, eax
or eax, 0x40
and edx, 0xffffffbf
cmp r12d, 1
cmovg edx, eax
mov word [rbx + 0x28], dx
mov rdx, qword [rbp + 0x50]
mov eax, dword [rdx + 0x1c]
bswap eax
cmp dword [rbx + 0x40], eax
jne 0x1401b9e98
test r13, r13
je 0x1401b9d80
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [r13], eax
nop word cs:[rax + rax]
mov rax, qword [rsi]
mov edx, dword [rax + 0x2e0]
cmp edx, dword [r14 + 0x80]
jle 0x1401b9a00
cmp byte [r14 + 0xa], 0
je 0x1401b9a00
mov rcx, r14
call dbg.pagerOpenSavepoint
mov edi, eax
jmp 0x1401b9b7d
cmp byte [rsi + 0x10], 0
jne 0x1401b9dd4
add dword [rbx + 0x3c], 1
cmp byte [rsi + 0x11], 0
je 0x1401b9dd4
mov byte [rsi + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [rsi + 0x40], rax
lea rax, [rsi + 0x30]
mov qword [rbx + 0x78], rax
movzx eax, byte [rbx + 0x24]
test r12d, r12d
jne 0x1401b9d28
mov byte [rsi + 0x10], 1
test al, al
jne 0x1401b9ded
mov byte [rbx + 0x24], 1
test r13, r13
je 0x1401b9a00
mov rax, qword [rbx + 0x18]
xor edi, edi
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1401b9b7d
mov rcx, rsi
call dbg.unlockBtreeMutex
jmp 0x1401b9b8d
mov edi, 0x205
jmp 0x1401b9b7d
bswap eax
mov r15d, eax
jmp 0x1401b9a6e
cmp byte [rbp + 0x42], 0
jne 0x1401b9ba0
mov rax, qword [rbp + 0x30]
mov rdx, qword [rbp + 0x50]
mov byte [rbp + 0x40], 1
mov rcx, qword [rax]
mov rax, qword [rbp + 0x48]
xor rdx, qword [rcx + 8]
xor rax, qword [rcx]
or rax, rdx
je 0x1401b9f98
cmp byte [rbp + 0x3f], 0
jne 0x1401b9e8b
mov rcx, qword [rbp + 8]
mov r9d, 9
mov r8d, 1
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x70]
mov byte [rbp + 0x40], 0
jmp 0x1401b9cb4
mov rcx, qword [rbp + 0x70]
call dbg.sqlite3PagerWrite
mov edi, eax
test eax, eax
jne 0x1401b9b7d
mov eax, dword [rbx + 0x40]
mov rdx, qword [rbp + 0x50]
bswap eax
mov dword [rdx + 0x1c], eax
test r13, r13
je 0x1401b9d80
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1401b9d80
movabs rax, 0x66206574694c5153
xor rax, qword [r9]
movabs rdx, 0x332074616d726f
xor rdx, qword [r9 + 8]
or rax, rdx
je 0x1401b9fcc
mov r15d, 0x1a
mov edi, 0x1a
mov rcx, qword [rbp + 0x70]
mov rbp, qword [rcx + 0x28]
call dbg.sqlite3PcacheRelease
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x18], 0
je 0x1401ba0bf
mov qword [rbx + 0x18], 0
jmp 0x1401b9b3c
mov edx, 2
mov rcx, r14
call sym.pagerLockDb
mov edi, eax
cmp r12d, 1
jle 0x1401b9f67
test eax, eax
jne 0x1401b9ca8
mov edx, 4
mov rcx, r14
call dbg.pager_wait_on_lock
mov edi, eax
test edi, edi
jne 0x1401b9ca8
movd xmm0, dword [r14 + 0x20]
mov byte [r14 + 0x15], 2
mov qword [r14 + 0x60], 0
movd dword [r14 + 0x2c], xmm0
pshufd xmm0, xmm0, 0xe0
movq qword [r14 + 0x24], xmm0
jmp 0x1401b9bf1
mov rax, qword [rbp + 0x58]
mov rdx, qword [rbp + 0x60]
xor rax, qword [rcx + 0x10]
xor rdx, qword [rcx + 0x18]
or rax, rdx
jne 0x1401b9e6d
mov rax, qword [rbp + 0x68]
mov rdx, qword [rbp + 0x70]
xor rax, qword [rcx + 0x20]
xor rdx, qword [rcx + 0x28]
or rax, rdx
jne 0x1401b9e6d
jmp 0x1401b9f6f
cmp byte [r9 + 0x12], 2
jbe 0x1401b9fd8
or word [rbx + 0x28], 1
cmp byte [r9 + 0x13], 2
ja 0x1401b9f04
jne 0x1401b9fef
test byte [rbx + 0x28], 0x20
je 0x1401ba0d9
mov edx, 3
mov rcx, rbx
mov dword [rsp + 0x3c], r10d
mov qword [rsp + 0x30], r9
call dbg.setDefaultSyncFlag
mov r10d, dword [rsp + 0x3c]
mov r9, qword [rsp + 0x30]
cmp word [r9 + 0x15], 0x2040
jne 0x1401b9f04
cmp byte [r9 + 0x17], 0x20
jne 0x1401b9f04
movzx eax, byte [r9 + 0x10]
movzx edx, byte [r9 + 0x11]
shl eax, 8
shl edx, 0x10
or eax, edx
lea edx, [rax - 1]
mov edi, eax
test edx, eax
jne 0x1401b9f04
lea edx, [rax - 0x101]
cmp edx, 0xfeff
ja 0x1401b9f04
movzx eax, byte [r9 + 0x14]
mov r8d, edi
mov dword [rsp + 0x30], eax
sub r8d, eax
cmp edi, dword [rbx + 0x34]
jne 0x1401ba112
cmp r10d, r15d
jae 0x1401ba090
mov rax, qword [rbx + 8]
mov r15d, r10d
mov rax, qword [rax + 0x30]
and eax, 0x10000001
cmp rax, 1
jne 0x1401ba1f9
cmp r8d, 0x1df
jbe 0x1401b9f04
or word [rbx + 0x28], 2
mov dword [rbx + 0x38], r8d
mov eax, dword [r9 + 0x34]
test eax, eax
setne byte [rbx + 0x21]
mov edx, dword [r9 + 0x40]
test edx, edx
setne byte [rbx + 0x22]
jmp 0x1401b9a88
mov rcx, rbp
call dbg.pagerUnlockAndRollback
jmp 0x1401b9f2e
mov rcx, rdi
call dbg.pagerUnlockAndRollback
jmp 0x1401b9cf7
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x3c], r10d
mov qword [rsp + 0x30], r9
mov dword [rsp + 0x44], 0
call dbg.sqlite3PagerOpenWal
mov r9, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x3c]
test eax, eax
mov edi, eax
je 0x1401ba18c
movzx r15d, al
jmp 0x1401b9f0f
mov rcx, qword [rbp + 0x70]
mov dword [rsp + 0x3c], r8d
mov rbp, qword [rcx + 0x28]
call dbg.sqlite3PcacheRelease
mov r8d, dword [rsp + 0x3c]
mov rdx, qword [rbp + 0x120]
cmp qword [rdx + 0x18], 0
je 0x1401ba1e7
mov rcx, qword [rbx + 0x88]
or word [rbx + 0x28], 2
mov dword [rbx + 0x38], r8d
mov dword [rbx + 0x34], edi
test rcx, rcx
je 0x1401ba16c
sub rcx, 4
mov qword [rbx + 0x88], rcx
call dbg.pcache1Free
xor ecx, ecx
mov qword [rbx + 0x88], rcx
mov rcx, qword [rbx]
mov r8d, dword [rsp + 0x30]
lea rdx, [rbx + 0x34]
call dbg.sqlite3PagerSetPagesize
mov edi, eax
test eax, eax
je 0x1401b99a0
jmp 0x1401b9b02
mov edx, 2
mov rcx, rbx
mov dword [rsp + 0x3c], r10d
mov qword [rsp + 0x30], r9
call dbg.setDefaultSyncFlag
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x3c]
test r8d, r8d
jne 0x1401ba010
mov rcx, qword [rbp + 0x70]
mov rdi, qword [rcx + 0x28]
call dbg.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
jne 0x1401b99a0
mov rcx, rdi
call dbg.pagerUnlockAndRollback
jmp 0x1401b99a0
mov rcx, rbp
call dbg.pagerUnlockAndRollback
mov r8d, dword [rsp + 0x3c]
jmp 0x1401ba13b
mov r9d, 0x11f05
lea rax, [0x14038c8ac]
lea r8, [0x14038e3f0]
mov ecx, 0xb
mov qword [rsp + 0x20], rax
mov r15d, 0xb
mov edi, 0xb
lea rdx, str._s_at_line__d_of___.10s_
call dbg.sqlite3_log
jmp 0x1401b9f0f