Function at 0x1401f0f40
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 0x1401f0f74
add dword [rcx + 0x14], 1
cmp byte [rcx + 0x12], 0
je 0x1401f1090
movzx eax, byte [rsi + 0x10]
cmp al, 2
je 0x1401f10a1
cmp al, 1
jne 0x1401f0f8d
test r12d, r12d
je 0x1401f14c1
mov rax, qword [rsi]
movzx edx, word [rbx + 0x28]
test byte [rax + 0x33], 2
je 0x1401f0ff0
cmp byte [r14 + 0x12], 0
jne 0x1401f0ff0
and edx, 0xfffffffe
mov word [rbx + 0x28], dx
test r12d, r12d
je 0x1401f1003
cmp byte [rbx + 0x24], 2
je 0x1401f1008
test dl, 0x80
jne 0x1401f1008
cmp r12d, 1
jle 0x1401f101b
mov rax, qword [rbx + 0x78]
test rax, rax
jne 0x1401f0fd9
jmp 0x1401f101b
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1401f101b
mov rcx, qword [rax]
cmp rcx, rsi
je 0x1401f0fd0
mov rax, qword [rcx]
jmp 0x1401f1012
mov eax, edx
and eax, 1
test ax, ax
je 0x1401f0fa8
test r12d, r12d
jne 0x1401f111a
test dl, 0x80
je 0x1401f101b
mov rax, qword [rbx + 0x80]
mov rax, qword [rax]
test rax, rax
jne 0x1401f14e8
cmp byte [rsi + 0x11], 0
mov rax, qword [rsi + 8]
je 0x1401f10e0
cmp rsi, qword [rax + 0x80]
je 0x1401f1038
test byte [rax + 0x28], 0x40
jne 0x1401f106e
mov rax, qword [rax + 0x78]
test rax, rax
jne 0x1401f105d
jmp 0x1401f10e0
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1401f10e0
cmp rsi, qword [rax]
je 0x1401f1050
cmp dword [rax + 8], 1
jne 0x1401f1050
cmp byte [rax + 0xc], 1
je 0x1401f1050
mov ebp, 0x106
sub dword [rsi + 0x14], 1
jne 0x1401f12bf
mov rcx, rsi
call sym.unlockBtreeMutex
jmp 0x1401f12bf
call sym.btreeLockCarefully
movzx eax, byte [rsi + 0x10]
cmp al, 2
jne 0x1401f0f80
test r13, r13
je 0x1401f10b7
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
test r12d, r12d
je 0x1401f10d9
mov rax, qword [rsi]
mov edx, dword [rax + 0x2f0]
cmp edx, dword [r14 + 0x80]
jle 0x1401f10d9
cmp byte [r14 + 0xa], 0
jne 0x1401f1560
xor ebp, ebp
jmp 0x1401f12b5
mov r11d, dword [rbx + 0x40]
and edx, 0xffffffef
mov word [rbx + 0x28], dx
test r11d, r11d
je 0x1401f1478
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1401f1128
test r12d, r12d
je 0x1401f1488
test byte [rbx + 0x28], 1
je 0x1401f1300
cmp byte [rbx + 0x24], 0
je 0x1401f12f0
mov ebp, 8
jmp 0x1401f12b5
mov rcx, qword [rbx]
call sym.sqlite3PagerSharedLock
test eax, eax
mov ebp, eax
movzx r15d, al
jne 0x1401f123e
xor r9d, r9d
mov edx, 1
mov rcx, rbx
lea r8, [rsp + 0x48]
call sym.btreeGetPage
test eax, eax
mov ebp, eax
jne 0x1401f123a
mov rdi, qword [rsp + 0x48]
mov rcx, qword [rbx]
mov r8, qword [rdi + 0x50]
mov r9d, dword [rcx + 0x20]
mov eax, dword [r8 + 0x1c]
mov r15d, r9d
test eax, eax
je 0x1401f1186
mov edx, dword [r8 + 0x18]
cmp dword [r8 + 0x5c], edx
je 0x1401f1570
mov rax, qword [rbx + 8]
test byte [rax + 0x33], 2
jne 0x1401f1199
test r15d, r15d
jne 0x1401f1618
mov eax, dword [rbx + 0x38]
xor r15d, r15d
lea ecx, [rax - 0xc]
mov r8d, 0x80808081
mov qword [rbx + 0x18], rdi
movq xmm0, qword [0x140336260]
mov edx, ecx
shl ecx, 6
mov dword [rbx + 0x40], r15d
imul rcx, r8
shl edx, 5
imul rdx, r8
movzx r8d, ax
shr rcx, 0x27
shr rdx, 0x27
movzx ecx, cx
movzx edx, dx
mov rax, rdx
shl rax, 0x10
or rax, r8
shl rax, 0x10
or rax, rdx
mov edx, 0x7f
shl rax, 0x10
or rax, rcx
movq xmm1, rax
paddw xmm0, xmm1
pextrw eax, xmm0, 0
cmp ax, dx
movq qword [rbx + 0x2a], xmm0
cmova eax, edx
mov byte [rbx + 0x25], al
jmp 0x1401f10f8
add dword [rdi + 0x298], 1
cmp qword [rbx + 0x18], 0
je 0x1401f1128
test ebp, ebp
je 0x1401f1488
movzx r15d, bpl
cmp byte [rbx + 0x24], 0
jne 0x1401f1274
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1401f1274
mov rcx, qword [rdi + 0x70]
mov qword [rbx + 0x18], 0
mov rdi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
je 0x1401f1430
cmp r15d, 5
jne 0x1401f12b5
cmp byte [rbx + 0x24], 0
jne 0x1401f12b5
mov rdi, qword [rbx + 8]
mov rax, qword [rdi + 0x288]
test rax, rax
je 0x1401f12b5
mov edx, dword [rdi + 0x298]
test edx, edx
js 0x1401f12b5
mov rcx, qword [rdi + 0x290]
call rax
test eax, eax
jne 0x1401f1220
mov dword [rdi + 0x298], 0xffffffff
cmp byte [rsi + 0x11], 0
jne 0x1401f1073
mov eax, ebp
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 0x1401f111a
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1401f111a
nop dword [rax]
mov r15d, 8
mov ebp, 8
jmp 0x1401f124d
mov ebp, dword [r14 + 0x30]
mov rax, qword [rsi]
test ebp, ebp
movzx eax, byte [rax + 0x66]
jne 0x1401f13c8
cmp al, 2
sete byte [r14 + 0x1a]
cmp byte [r14 + 0x15], 1
je 0x1401f1330
mov rcx, rbx
call sym.newDatabase
mov ebp, eax
jmp 0x1401f1232
mov rdi, qword [r14 + 0x128]
test rdi, rdi
je 0x1401f166c
cmp byte [r14 + 8], 0
je 0x1401f138f
cmp byte [rdi + 0x3f], 0
jne 0x1401f1580
mov edx, 4
mov rcx, r14
call sym.pagerLockDb
test eax, eax
mov ebp, eax
jne 0x1401f13c8
mov rbp, qword [r14 + 0x128]
cmp byte [rbp + 0x3f], 0
mov rdi, rbp
jne 0x1401f138b
movsx edx, word [rbp + 0x3c]
mov rcx, qword [rbp + 8]
add edx, 3
call sym.walUnlockShared.part.0.isra.0
mov rdi, qword [r14 + 0x128]
mov byte [rbp + 0x3f], 1
cmp byte [rdi + 0x42], 0
jne 0x1401f12d2
cmp byte [rdi + 0x3f], 0
jne 0x1401f158a
mov rcx, qword [rdi + 8]
xor edx, edx
mov r9d, 0xa
mov r8d, 1
mov rax, qword [rcx]
call qword [rax + 0x70]
test eax, eax
mov ebp, eax
je 0x1401f158a
nop dword [rax]
cmp ebp, 0x205
jne 0x1401f123a
cmp byte [rbx + 0x24], 0
jne 0x1401f1550
mov rax, qword [rbx + 0x18]
mov ebp, 5
test rax, rax
je 0x1401f1280
mov rcx, qword [rax + 0x70]
mov qword [rbx + 0x18], 0
mov ebp, 5
mov rdi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
jne 0x1401f127a
mov r15d, 5
mov ebp, 5
nop word [rax + rax]
movzx eax, byte [rdi + 0x15]
cmp al, 6
je 0x1401f1468
test al, al
je 0x1401f1468
cmp al, 1
je 0x1401f1650
mov rax, qword [0x1402b2220]
test rax, rax
je 0x1401f1452
call rax
mov rcx, rdi
call sym.sqlite3PagerRollback
mov rax, qword [0x1402b2228]
test rax, rax
je 0x1401f1468
call rax
mov rcx, rdi
call sym.pager_unlock
jmp 0x1401f1274
or edx, 0x10
mov word [rbx + 0x28], dx
jmp 0x1401f10f4
cmp byte [rsi + 0x10], 0
jne 0x1401f14ac
add dword [rbx + 0x3c], 1
cmp byte [rsi + 0x11], 0
je 0x1401f14ac
mov byte [rsi + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [rsi + 0x40], rax
lea rax, [rsi + 0x30]
mov qword [rbx + 0x78], rax
test r12d, r12d
movzx eax, byte [rbx + 0x24]
jne 0x1401f14f8
test al, al
mov byte [rsi + 0x10], 1
jne 0x1401f14c1
mov byte [rbx + 0x24], 1
test r13, r13
je 0x1401f10d9
mov rax, qword [rbx + 0x18]
xor ebp, ebp
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1401f12b5
mov ebp, 0x106
jmp 0x1401f12b5
cmp al, 1
mov byte [rsi + 0x10], 2
ja 0x1401f1504
mov byte [rbx + 0x24], 2
movzx eax, word [rbx + 0x28]
mov qword [rbx + 0x80], rsi
mov rdi, qword [rbx + 0x18]
mov edx, eax
or eax, 0x40
and edx, 0xffffffbf
cmp r12d, 1
cmovg edx, eax
mov word [rbx + 0x28], dx
mov rdx, qword [rdi + 0x50]
mov eax, dword [rdx + 0x1c]
bswap eax
cmp dword [rbx + 0x40], eax
jne 0x1401f15d5
test r13, r13
je 0x1401f10bc
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1401f10bc
mov ebp, 0x205
jmp 0x1401f12b5
mov rcx, r14
call sym.pagerOpenSavepoint
mov ebp, eax
jmp 0x1401f12b5
bswap eax
mov r15d, eax
jmp 0x1401f1186
cmp byte [rdi + 0x42], 0
jne 0x1401f12d2
mov rax, qword [rdi + 0x30]
mov byte [rdi + 0x40], 1
lea rcx, [rdi + 0x48]
mov r8d, 0x30
mov rdx, qword [rax]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1401f16e5
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 0x1401f1321
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
mov ebp, eax
jne 0x1401f12b5
mov eax, dword [rbx + 0x40]
test r13, r13
mov rdx, qword [rdi + 0x50]
bswap eax
mov dword [rdx + 0x1c], eax
je 0x1401f10bc
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1401f10bc
movabs rax, 0x66206574694c5153
cmp qword [r8], rax
je 0x1401f170c
mov r15d, 0x1a
mov ebp, 0x1a
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov qword [rbx + 0x18], 0
jmp 0x1401f1274
cmp byte [rdi + 8], 0
jne 0x1401f1468
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call sym.pager_end_transaction
jmp 0x1401f1468
mov edx, 2
mov rcx, r14
call sym.pagerLockDb
cmp r12d, 1
mov ebp, eax
jle 0x1401f18ef
test eax, eax
jne 0x1401f13c8
jmp 0x1401f16c3
mov rcx, qword [r14 + 0x48]
mov edx, 4
mov rax, qword [rcx]
call qword [rax + 0x38]
test eax, eax
mov ebp, eax
je 0x1401f16db
cmp eax, 5
jne 0x1401f13c8
mov rcx, qword [r14 + 0xf0]
call qword [r14 + 0xe8]
test eax, eax
je 0x1401f123a
movzx eax, byte [r14 + 0x16]
cmp al, 5
je 0x1401f16d4
cmp al, 3
ja 0x1401f15ac
cmp byte [r14 + 0x11], 0
je 0x1401f168f
mov byte [r14 + 0x16], 4
jmp 0x1401f15ac
cmp byte [rdi + 0x3f], 0
jne 0x1401f1703
mov rcx, qword [rdi + 8]
mov r9d, 9
mov r8d, 1
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x70]
mov byte [rdi + 0x40], 0
jmp 0x1401f13d4
movabs rax, 0x332074616d726f
cmp qword [r8 + 8], rax
jne 0x1401f162b
cmp byte [r8 + 0x12], 2
jbe 0x1401f172c
or word [rbx + 0x28], 1
cmp byte [r8 + 0x13], 2
ja 0x1401f162b
je 0x1401f17e1
cmp word [r8 + 0x15], 0x2040
jne 0x1401f162b
cmp byte [r8 + 0x17], 0x20
jne 0x1401f162b
movzx edx, byte [r8 + 0x10]
movzx eax, byte [r8 + 0x11]
shl edx, 8
shl eax, 0x10
or edx, eax
lea eax, [rdx - 1]
test eax, edx
jne 0x1401f162b
lea eax, [rdx - 0x101]
cmp eax, 0xfeff
ja 0x1401f162b
or word [rbx + 0x28], 2
mov eax, edx
movzx ebp, byte [r8 + 0x14]
sub eax, ebp
cmp edx, dword [rbx + 0x34]
jne 0x1401f183b
cmp r9d, r15d
jae 0x1401f17ba
mov rdx, qword [rbx + 8]
mov r15d, r9d
mov rdx, qword [rdx + 0x30]
and edx, 0x10000001
cmp rdx, 1
jne 0x1401f18b5
cmp eax, 0x1df
jbe 0x1401f162b
mov dword [rbx + 0x38], eax
mov edx, dword [r8 + 0x34]
test edx, edx
setne byte [rbx + 0x21]
mov ecx, dword [r8 + 0x40]
test ecx, ecx
setne byte [rbx + 0x22]
jmp 0x1401f119f
test byte [rbx + 0x28], 0x20
jne 0x1401f173d
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x3c], r9d
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x44], 0
call sym.sqlite3PagerOpenWal
mov r8, qword [rsp + 0x30]
test eax, eax
mov r9d, dword [rsp + 0x3c]
mov ebp, eax
jne 0x1401f18ac
mov r10d, dword [rsp + 0x44]
test r10d, r10d
jne 0x1401f173d
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov rdi, qword [rbx + 0x18]
jmp 0x1401f10f8
mov rcx, qword [rdi + 0x70]
mov dword [rsp + 0x3c], eax
lea rdi, [rbx + 0x34]
mov dword [rsp + 0x30], edx
call sym.sqlite3PagerUnrefPageOne
mov edx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rbx + 0x88]
movd xmm0, edx
movd xmm2, eax
test rcx, rcx
punpckldq xmm0, xmm2
movq qword [rbx + 0x34], xmm0
je 0x1401f188f
sub rcx, 4
mov qword [rbx + 0x88], rcx
call sym.pcache1Free
xor r8d, r8d
mov qword [rbx + 0x88], r8
mov rcx, qword [rbx]
mov r8d, ebp
mov rdx, rdi
call sym.sqlite3PagerSetPagesize
test eax, eax
mov ebp, eax
je 0x1401f10f4
jmp 0x1401f123a
movzx r15d, al
jmp 0x1401f1636
mov r9d, 0x1182e
mov ecx, 0xb
mov r15d, 0xb
lea rax, [0x140329bdc]
mov ebp, 0xb
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
jmp 0x1401f1636
test eax, eax
je 0x1401f15ac
jmp 0x1401f13c8