Function at 0x1400b9ab0
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 rdi, rcx
mov r12d, edx
mov r13, r8
je 0x1400b9ae4
add dword [rcx + 0x14], 1
cmp byte [rcx + 0x12], 0
je 0x1400b9c18
movzx eax, byte [rdi + 0x10]
cmp al, 2
je 0x1400b9c29
cmp al, 1
jne 0x1400b9afd
test r12d, r12d
je 0x1400b9f81
mov rdx, qword [rdi]
movzx eax, word [rbx + 0x28]
test byte [rdx + 0x33], 2
je 0x1400b9b60
cmp byte [r14 + 0x12], 0
jne 0x1400b9b60
and eax, 0xfffffffe
mov word [rbx + 0x28], ax
test r12d, r12d
je 0x1400b9b6f
cmp byte [rbx + 0x24], 2
je 0x1400b9b73
test al, 0x80
jne 0x1400b9b73
cmp r12d, 1
jle 0x1400b9b87
mov rax, qword [rbx + 0x78]
test rax, rax
jne 0x1400b9b49
jmp 0x1400b9b87
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1400b9b87
mov rdx, qword [rax]
cmp rdx, rdi
je 0x1400b9b40
mov rax, qword [rdx]
jmp 0x1400b9b7d
mov edx, eax
and edx, 1
test dx, dx
je 0x1400b9b18
test r12d, r12d
jne 0x1400b9be6
test al, 0x80
je 0x1400b9b87
mov rax, qword [rbx + 0x80]
mov rax, qword [rax]
mov esi, 0x106
test rax, rax
jne 0x1400b9bf0
mov r8d, 1
mov edx, 1
mov rcx, rdi
call sym.querySharedCacheTableLock
mov esi, eax
test eax, eax
jne 0x1400b9bf0
movzx eax, word [rbx + 0x28]
mov r9d, dword [rbx + 0x40]
and eax, 0xffffffef
mov word [rbx + 0x28], ax
test r9d, r9d
je 0x1400b9fa8
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1400b9d34
test esi, esi
jne 0x1400b9c88
test r12d, r12d
je 0x1400b9c80
test byte [rbx + 0x28], 1
je 0x1400b9c50
cmp byte [rbx + 0x24], 0
je 0x1400b9e20
mov esi, 8
nop dword [rax + rax]
cmp byte [rdi + 0x11], 0
je 0x1400b9c00
sub dword [rdi + 0x14], 1
je 0x1400ba040
mov eax, esi
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sym.btreeLockCarefully
movzx eax, byte [rdi + 0x10]
cmp al, 2
jne 0x1400b9af0
test r13, r13
je 0x1400b9c3f
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 0x1400ba010
xor esi, esi
jmp 0x1400b9bf0
mov rax, qword [rdi]
mov esi, dword [r14 + 0x30]
movzx eax, byte [rax + 0x66]
test esi, esi
jne 0x1400b9ee8
cmp al, 2
sete byte [r14 + 0x1a]
cmp byte [r14 + 0x15], 1
je 0x1400b9e40
mov rcx, rbx
call sym.newDatabase
mov esi, eax
nop
test esi, esi
je 0x1400b9f58
movzx r15d, sil
cmp byte [rbx + 0x24], 0
jne 0x1400b9cc6
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1400b9e30
mov rcx, qword [rbp + 0x70]
mov qword [rbx + 0x18], 0
mov rbp, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x18], 0
je 0x1400b9f48
cmp r15d, 5
jne 0x1400b9bf0
cmp byte [rbx + 0x24], 0
jne 0x1400b9bf0
mov rbp, qword [rbx + 8]
mov rax, qword [rbp + 0x288]
test rax, rax
je 0x1400b9bf0
mov edx, dword [rbp + 0x298]
test edx, edx
js 0x1400b9bf0
mov rcx, qword [rbp + 0x290]
call rax
test eax, eax
jne 0x1400b9d20
mov dword [rbp + 0x298], 0xffffffff
jmp 0x1400b9bf0
add dword [rbp + 0x298], 1
mov rbp, qword [rbx + 0x18]
test rbp, rbp
jne 0x1400b9bc5
mov rcx, qword [rbx]
call sym.sqlite3PagerSharedLock
mov esi, eax
movzx r15d, al
test eax, eax
jne 0x1400b9c8c
xor r9d, r9d
lea r8, [rsp + 0x48]
mov edx, 1
mov rcx, rbx
call sym.btreeGetPage
mov esi, eax
test eax, eax
jne 0x1400b9c88
mov rbp, qword [rsp + 0x48]
mov rcx, qword [rbx]
mov r10, qword [rbp + 0x50]
mov r11d, dword [rcx + 0x20]
mov eax, dword [r10 + 0x1c]
mov r15d, r11d
test eax, eax
je 0x1400b9d92
mov edx, dword [r10 + 0x18]
cmp dword [r10 + 0x5c], edx
je 0x1400ba060
mov rax, qword [rbx + 8]
test byte [rax + 0x33], 2
jne 0x1400b9da5
test r15d, r15d
jne 0x1400ba1d0
mov r9d, dword [rbx + 0x38]
xor r15d, r15d
lea ecx, [r9 - 0xc]
mov r10d, 0x80808081
sub r9d, 0x23
mov qword [rbx + 0x18], rbp
mov eax, ecx
shl ecx, 5
mov word [rbx + 0x2e], r9w
mov edx, ecx
shl eax, 6
mov dword [rbx + 0x40], r15d
imul rdx, r10
imul rax, r10
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 0x1400b9bc5
cmp byte [rbx + 0x24], 0
jne 0x1400b9be6
mov rbp, qword [rbx + 0x18]
test rbp, rbp
je 0x1400b9be6
nop dword [rax]
mov r15d, 8
mov esi, 8
jmp 0x1400b9c9f
cmp r15d, 5
je 0x1400b9cda
jmp 0x1400b9bf0
mov rbp, qword [r14 + 0x128]
test rbp, rbp
je 0x1400ba16e
cmp byte [r14 + 8], 0
je 0x1400b9eac
cmp byte [rbp + 0x3f], 0
jne 0x1400ba070
mov edx, 4
mov rcx, r14
call sym.pagerLockDb
mov esi, eax
test eax, eax
jne 0x1400b9ee8
mov rsi, qword [r14 + 0x128]
cmp byte [rsi + 0x3f], 0
mov rbp, rsi
jne 0x1400b9ea8
mov rcx, qword [rsi + 8]
movsx edx, word [rsi + 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 [rsi + 0x3f], 1
cmp byte [rbp + 0x42], 0
jne 0x1400b9e06
cmp byte [rbp + 0x3f], 0
jne 0x1400ba07a
mov rcx, qword [rbp + 8]
mov r9d, 0xa
mov r8d, 1
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x70]
mov esi, eax
test eax, eax
je 0x1400ba07a
nop word [rax + rax]
cmp esi, 0x205
jne 0x1400b9c88
cmp byte [rbx + 0x24], 0
jne 0x1400ba050
mov rax, qword [rbx + 0x18]
mov esi, 5
test rax, rax
je 0x1400b9cda
mov rcx, qword [rax + 0x70]
mov qword [rbx + 0x18], 0
mov rsi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rsi + 0x120]
cmp qword [rax + 0x18], 0
je 0x1400ba300
mov esi, 5
jmp 0x1400b9cd0
mov rcx, rbp
call sym.pagerUnlockAndRollback
jmp 0x1400b9cc6
cmp byte [rdi + 0x10], 0
jne 0x1400b9f6c
add dword [rbx + 0x3c], 1
cmp byte [rdi + 0x11], 0
jne 0x1400ba100
movzx eax, byte [rbx + 0x24]
test r12d, r12d
jne 0x1400b9fb8
mov byte [rdi + 0x10], 1
test al, al
je 0x1400ba120
test r13, r13
je 0x1400b9c48
mov rax, qword [rbx + 0x18]
xor esi, esi
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1400b9bf0
or eax, 0x10
mov word [rbx + 0x28], ax
jmp 0x1400b9bb8
mov byte [rdi + 0x10], 2
cmp al, 1
ja 0x1400b9fc4
mov byte [rbx + 0x24], 2
movzx eax, word [rbx + 0x28]
mov rbp, qword [rbx + 0x18]
mov qword [rbx + 0x80], rdi
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 0x1400ba130
test r13, r13
je 0x1400ba010
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [r13], eax
nop word cs:[rax + rax]
mov rax, qword [rdi]
mov edx, dword [rax + 0x2f0]
cmp edx, dword [r14 + 0x80]
jle 0x1400b9c48
cmp byte [r14 + 0xa], 0
je 0x1400b9c48
mov rcx, r14
call sym.pagerOpenSavepoint
mov esi, eax
jmp 0x1400b9bf0
mov rcx, rdi
call sym.unlockBtreeMutex
jmp 0x1400b9c00
mov esi, 0x205
jmp 0x1400b9bf0
bswap eax
mov r15d, eax
jmp 0x1400b9d92
cmp byte [rbp + 0x42], 0
jne 0x1400b9e06
mov rax, qword [rbp + 0x30]
mov rcx, qword [rbp + 0x48]
mov byte [rbp + 0x40], 1
mov rdx, qword [rax]
mov rax, qword [rbp + 0x50]
xor rcx, qword [rdx]
xor rax, qword [rdx + 8]
or rax, rcx
jne 0x1400ba0d0
mov rcx, qword [rbp + 0x58]
mov rax, qword [rbp + 0x60]
xor rcx, qword [rdx + 0x10]
xor rax, qword [rdx + 0x18]
or rax, rcx
jne 0x1400ba0d0
mov rcx, qword [rbp + 0x68]
mov rax, qword [rbp + 0x70]
xor rcx, qword [rdx + 0x20]
xor rax, qword [rdx + 0x28]
or rax, rcx
je 0x1400ba1a2
nop word [rax + rax]
cmp byte [rbp + 0x3f], 0
jne 0x1400ba0ee
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 0x1400b9ef4
mov byte [rdi + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [rdi + 0x40], rax
lea rax, [rdi + 0x30]
mov qword [rbx + 0x78], rax
jmp 0x1400b9f6c
mov byte [rbx + 0x24], 1
jmp 0x1400b9f81
mov rcx, qword [rbp + 0x70]
call sym.sqlite3PagerWrite
mov esi, eax
test eax, eax
jne 0x1400b9bf0
mov eax, dword [rbx + 0x40]
mov rdx, qword [rbp + 0x50]
bswap eax
mov dword [rdx + 0x1c], eax
test r13, r13
je 0x1400ba010
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1400ba010
mov edx, 2
mov rcx, r14
call sym.pagerLockDb
mov esi, eax
cmp r12d, 1
jle 0x1400ba19a
test eax, eax
jne 0x1400b9ee8
mov edx, 4
mov rcx, r14
call sym.pager_wait_on_lock
mov esi, eax
test esi, esi
jne 0x1400b9ee8
mov eax, dword [r14 + 0x20]
mov byte [r14 + 0x15], 2
mov qword [r14 + 0x60], 0
movd xmm1, eax
mov dword [r14 + 0x2c], eax
pshufd xmm0, xmm1, 0xe0
movq qword [r14 + 0x24], xmm0
jmp 0x1400b9c75
movabs rax, 0x332074616d726f
xor rax, qword [r10 + 8]
movabs rdx, 0x66206574694c5153
xor rdx, qword [r10]
or rax, rdx
jne 0x1400ba22f
cmp byte [r10 + 0x12], 2
jbe 0x1400ba1fc
or word [rbx + 0x28], 1
cmp byte [r10 + 0x13], 2
ja 0x1400ba22f
jne 0x1400ba20f
test byte [rbx + 0x28], 0x20
je 0x1400ba30d
mov edx, 3
mov rcx, rbx
mov qword [rsp + 0x30], r10
call sym.setDefaultSyncFlag
mov r10, qword [rsp + 0x30]
cmp word [r10 + 0x15], 0x2040
je 0x1400ba26c
mov r15d, 0x1a
mov esi, 0x1a
mov rcx, qword [rbp + 0x70]
mov rbp, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rbp + 0x120]
cmp qword [rax + 0x18], 0
je 0x1400ba262
mov qword [rbx + 0x18], 0
jmp 0x1400b9c8c
mov rcx, rbp
call sym.pagerUnlockAndRollback
jmp 0x1400ba255
cmp byte [r10 + 0x17], 0x20
jne 0x1400ba22f
movzx eax, byte [r10 + 0x10]
movzx edx, byte [r10 + 0x11]
shl eax, 8
shl edx, 0x10
or eax, edx
lea edx, [rax - 1]
test edx, eax
jne 0x1400ba22f
lea edx, [rax - 0x101]
cmp edx, 0xfeff
ja 0x1400ba22f
movzx ecx, byte [r10 + 0x14]
mov r9d, eax
mov dword [rsp + 0x30], ecx
sub r9d, ecx
cmp eax, dword [rbx + 0x34]
jne 0x1400ba346
cmp r11d, r15d
jae 0x1400ba2d1
mov rax, qword [rbx + 8]
mov r15d, r11d
mov rax, qword [rax + 0x30]
and eax, 0x10000001
cmp rax, 1
jne 0x1400ba429
cmp r9d, 0x1df
jbe 0x1400ba22f
or word [rbx + 0x28], 2
mov dword [rbx + 0x38], r9d
mov eax, dword [r10 + 0x34]
test eax, eax
setne byte [rbx + 0x21]
mov edx, dword [r10 + 0x40]
test edx, edx
setne byte [rbx + 0x22]
jmp 0x1400b9dac
mov rcx, rsi
call sym.pagerUnlockAndRollback
jmp 0x1400b9f37
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x38], r11d
mov qword [rsp + 0x30], r10
mov dword [rsp + 0x44], 0
call sym.sqlite3PagerOpenWal
mov r10, qword [rsp + 0x30]
mov r11d, dword [rsp + 0x38]
test eax, eax
je 0x1400ba3c8
movzx r15d, al
mov esi, eax
jmp 0x1400ba23a
mov rcx, qword [rbp + 0x70]
mov dword [rsp + 0x3c], r9d
mov dword [rsp + 0x38], eax
mov rsi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov eax, dword [rsp + 0x38]
mov r9d, dword [rsp + 0x3c]
mov rdx, qword [rsi + 0x120]
cmp qword [rdx + 0x18], 0
je 0x1400ba413
mov rcx, qword [rbx + 0x88]
or word [rbx + 0x28], 2
mov dword [rbx + 0x38], r9d
mov dword [rbx + 0x34], eax
test rcx, rcx
je 0x1400ba3a8
sub rcx, 4
mov qword [rbx + 0x88], rcx
call sym.pcache1Free
xor ecx, ecx
mov qword [rbx + 0x88], rcx
mov rcx, qword [rbx]
mov r8d, dword [rsp + 0x30]
lea rdx, [rbx + 0x34]
call sym.sqlite3PagerSetPagesize
mov esi, eax
test eax, eax
je 0x1400b9bb8
jmp 0x1400b9c88
mov edx, 2
mov rcx, rbx
mov qword [rsp + 0x30], r10
call sym.setDefaultSyncFlag
mov r8d, dword [rsp + 0x44]
mov r10, qword [rsp + 0x30]
test r8d, r8d
jne 0x1400ba226
mov rcx, qword [rbp + 0x70]
mov rsi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rsi + 0x120]
cmp qword [rax + 0x18], 0
je 0x1400ba463
mov rbp, qword [rbx + 0x18]
xor esi, esi
jmp 0x1400b9bbc
mov rcx, rsi
call sym.pagerUnlockAndRollback
mov r9d, dword [rsp + 0x3c]
mov eax, dword [rsp + 0x38]
jmp 0x1400ba377
mov r9d, 0x11f15
lea rax, [0x14015efa4]
lea r8, str.database_corruption
mov ecx, 0xb
mov qword [rsp + 0x20], rax
mov r15d, 0xb
mov esi, 0xb
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
jmp 0x1400ba23a
mov rcx, rsi
call sym.pagerUnlockAndRollback
jmp 0x1400ba408