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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
lea rbp, [rsp + 0x40]
mov rdi, rcx
mov rcx, qword [rcx + 0x128]
test rcx, rcx
je 0x14022fc30
mov dword [rsp + 0x40], 0
xor esi, esi
call sym.sqlite3WalEndReadTransaction
mov r12, qword [rdi + 0x128]
nop dword [rax + rax]
add esi, 1
xor r8d, r8d
mov rdx, rbp
mov r9d, esi
mov rcx, r12
call sym.walTryBeginRead
cmp eax, 0xffffffff
mov ebx, eax
je 0x14022faf0
or eax, dword [rsp + 0x40]
jne 0x14022fba8
movabs rax, 0xff00000000ff
and rax, qword [rdi + 0x10]
jne 0x14022fb8c
mov rax, qword [rdi + 0x128]
test rax, rax
je 0x14022fb3c
cmp word [rax + 0x3c], 0
jns 0x14022fef0
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x14022fb89
mov qword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
call qword [rax + 0x30]
test eax, eax
mov ebx, eax
jne 0x14022fc12
mov rcx, qword [rdi + 0xc8]
mov rax, qword [rsp + 0x40]
add rax, rcx
sub rax, 1
cqo
idiv rcx
cmp dword [rdi + 0xbc], eax
jae 0x14022fb89
mov dword [rdi + 0xbc], eax
mov dword [rdi + 0x20], eax
xor ebx, ebx
mov byte [rdi + 0x15], 1
mov eax, ebx
mov byte [rdi + 0x1c], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rax, qword [rdi + 0x70]
add dword [rdi + 0x84], 1
test rax, rax
je 0x14022fbd0
nop dword [rax + rax]
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x14022fbc0
mov rcx, qword [rdi + 0x120]
xor edx, edx
call sym.sqlite3PcacheTruncate
cmp byte [rdi + 0x1b], 0
je 0x14022fbf6
mov rcx, qword [rdi + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
movabs rax, 0xff00000000ff
and rax, qword [rdi + 0x10]
je 0x14022fea8
test ebx, ebx
je 0x14022fb8c
mov rcx, rdi
call sym.pager_unlock
mov eax, ebx
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp byte [rdi + 0x15], 0
je 0x14022fc89
movabs rax, 0xff00000000ff
and rax, qword [rdi + 0x10]
je 0x14022fb3c
jmp 0x14022fb8c
cmp byte [rdi + 0x11], 0
jne 0x14022fd44
mov rcx, qword [rdi + 0x48]
mov edx, 1
mov rax, qword [rcx]
call qword [rax + 0x38]
test eax, eax
mov ebx, eax
je 0x14022fd40
cmp eax, 5
jne 0x14022fc12
mov rcx, qword [rdi + 0xf0]
call qword [rdi + 0xe8]
test eax, eax
je 0x14022fc12
movzx eax, byte [rdi + 0x16]
cmp al, 5
je 0x14022fc50
test al, al
je 0x14022fc50
cmp byte [rdi + 0x16], 1
jbe 0x14022fd50
cmp byte [rdi + 0x12], 0
mov ebx, 0x308
jne 0x14022fc12
mov edx, 4
mov rcx, rdi
call sym.pagerLockDb
test eax, eax
mov ebx, eax
jne 0x14022fc12
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
test rax, rax
je 0x14022ff2f
cmp byte [rdi + 0xb], 0
je 0x1402300ea
lea rdx, [rdi + 0x68]
call qword [rax + 0x30]
test eax, eax
mov ebx, eax
jne 0x14022fd0b
xor edx, edx
cmp byte [rdi + 0x10], 0
mov rcx, rdi
sete dl
call sym.pager_playback
mov byte [rdi + 0x15], 0
mov ebx, eax
test ebx, ebx
je 0x14022fd9a
cmp bl, 0xd
movzx eax, bl
je 0x14022fd1c
cmp eax, 0xa
jne 0x14022fc12
lea rax, [sym.getPageError]
mov dword [rdi + 0x30], ebx
mov byte [rdi + 0x15], 6
mov qword [rdi + 0x110], rax
jmp 0x14022fc12
movzx eax, byte [rdi + 0x16]
cmp al, 5
je 0x14022fc9f
mov byte [rdi + 0x16], 1
mov rax, qword [rdi + 0x50]
mov dword [rsp + 0x34], 1
mov rsi, qword [rdi]
mov rbp, qword [rax]
test rbp, rbp
je 0x14022feb5
mov rcx, qword [rdi + 0x48]
mov dword [rsp + 0x38], 0
lea rdx, [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x48]
test eax, eax
mov ebx, eax
jne 0x14022fc12
mov r10d, dword [rsp + 0x38]
test r10d, r10d
je 0x14023005c
cmp byte [rdi + 0x10], 0
jne 0x14022ff00
cmp byte [rdi + 0x1c], 0
je 0x14022fe51
mov rcx, qword [rdi + 0x48]
lea rbp, [rsp + 0x40]
mov r9d, 0x18
mov r8d, 0x10
mov rdx, rbp
mov rax, qword [rcx]
call qword [rax + 0x10]
test eax, eax
mov ebx, eax
je 0x14022fdef
cmp eax, 0x20a
jne 0x14022fc12
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov rdx, qword [rsp + 0x40]
cmp qword [rdi + 0x88], rdx
je 0x14022fff0
mov rax, qword [rdi + 0x70]
add dword [rdi + 0x84], 1
test rax, rax
je 0x14022fe21
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x14022fe11
mov rcx, qword [rdi + 0x120]
xor edx, edx
call sym.sqlite3PcacheTruncate
cmp byte [rdi + 0x1b], 0
je 0x14022fe47
mov rcx, qword [rdi + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
cmp byte [rdi + 0x10], 0
jne 0x14022ff00
mov rax, qword [rdi]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rdx, qword [rdi + 0x130]
mov rcx, rax
call qword [rax + 0x38]
test eax, eax
mov ebx, eax
jne 0x14022ff1a
mov edx, dword [rsp + 0x3c]
test edx, edx
jne 0x140230007
cmp byte [rdi + 9], 5
mov rcx, qword [rdi + 0x128]
je 0x1402300d3
test rcx, rcx
je 0x14022fc36
lea rbp, [rsp + 0x40]
jmp 0x14022fad2
test ebx, ebx
jne 0x14022fc12
jmp 0x14022fb25
xor r8d, r8d
mov rdx, qword [rdi + 0xe0]
mov rcx, rsi
lea r9, [rsp + 0x34]
call qword [rsi + 0x38]
test eax, eax
mov ebx, eax
jne 0x14022fc12
mov r11d, dword [rsp + 0x34]
test r11d, r11d
je 0x14022fd9a
jmp 0x14022fd6b
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x14022fb3c
jmp 0x14022fb7b
mov rcx, qword [rdi + 0x128]
lea rbp, [rsp + 0x40]
test rcx, rcx
jne 0x14022fad2
jmp 0x14022fc36
mov rcx, qword [rdi + 0x128]
test rcx, rcx
jne 0x14022fe99
jmp 0x14022fc12
cmp byte [rdi + 9], 2
je 0x14022ffb2
mov rsi, qword [rdi]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rdx, qword [rdi + 0xe0]
mov rcx, rsi
call qword [rsi + 0x38]
test eax, eax
mov ebx, eax
jne 0x140230108
mov ebx, dword [rsp + 0x3c]
mov rcx, qword [rdi + 0x50]
test ebx, ebx
je 0x14022ffa6
xor r8d, r8d
mov rdx, qword [rdi + 0xe0]
mov r9d, 0x802
lea rbp, [rsp + 0x40]
mov dword [rsp + 0x40], r8d
mov r8, rcx
mov rcx, rsi
mov qword [rsp + 0x20], rbp
call qword [rsi + 0x28]
test eax, eax
mov ebx, eax
jne 0x140230108
mov ebx, dword [rsp + 0x40]
and ebx, 1
jne 0x1402301bd
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
test rax, rax
jne 0x14022fcd5
cmp byte [rdi + 8], 0
jne 0x14022fd9a
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x140230235
cmp byte [rdi + 0x11], 0
jne 0x14022ffda
mov edx, 1
call qword [rax + 0x40]
cmp byte [rdi + 0x16], 5
je 0x14022ffe4
mov byte [rdi + 0x16], 1
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14022fd03
mov rdx, qword [rsp + 0x48]
cmp qword [rdi + 0x90], rdx
jne 0x14022fe01
jmp 0x14022fe47
lea rbp, [rsp + 0x40]
mov rcx, rdi
mov rdx, rbp
call sym.pagerPagecount
test eax, eax
mov ebx, eax
jne 0x14023013e
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x140230153
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x140230047
mov rdx, qword [rdi + 0x130]
xor r8d, r8d
call rax
mov ebx, eax
mov rcx, qword [rdi + 0x128]
test rcx, rcx
jne 0x14022fad2
jmp 0x14022fbf6
lea rdx, [rsp + 0x3c]
mov rcx, rdi
call sym.pagerPagecount
test eax, eax
mov ebx, eax
jne 0x14022fc12
cmp dword [rsp + 0x3c], 0
jne 0x140230164
test rbp, rbp
je 0x14023024b
mov rcx, qword [rdi + 0x50]
mov byte [rsp + 0x40], 0
lea rbp, [rsp + 0x40]
xor r9d, r9d
mov r8d, 1
mov rdx, rbp
mov rax, qword [rcx]
call qword [rax + 0x10]
cmp eax, 0x20a
mov ebx, eax
je 0x1402301ae
xor eax, eax
cmp byte [rsp + 0x40], 0
setne al
test ebx, ebx
jne 0x14022fc12
test eax, eax
je 0x14022fd9a
jmp 0x14022fc9f
mov byte [rdi + 9], 0
lea rbp, [rsp + 0x40]
test rcx, rcx
jne 0x14022fad2
jmp 0x14022fc36
mov edx, 2
call qword [rax + 0x28]
test eax, eax
mov ebx, eax
jne 0x14022fd0b
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
jmp 0x14022fcdf
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
test rax, rax
jne 0x14022fcd5
cmp byte [rdi + 8], 0
jne 0x14022fd0b
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
jne 0x14022ffcc
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14022fd0b
mov rcx, qword [rdi + 0x128]
test rcx, rcx
jne 0x14022fad2
jmp 0x14022fc12
xor edx, edx
mov rcx, rdi
call sym.sqlite3PagerOpenWal
mov ebx, eax
jmp 0x140230047
test rbp, rbp
jne 0x140230087
lea rbp, [rsp + 0x40]
mov rdx, qword [rdi + 0xe0]
mov r9d, 0x801
mov rcx, rsi
mov qword [rsp + 0x20], rbp
mov r8, qword [rdi + 0x50]
mov dword [rsp + 0x40], 0x801
call qword [rsi + 0x28]
test eax, eax
mov ebx, eax
je 0x1402302ca
cmp eax, 0xe
jne 0x14022fc12
jmp 0x14022fc9f
xor eax, eax
cmp byte [rsp + 0x40], 0
setne al
jmp 0x1402300c6
lea rax, [0x140329bdc]
mov r9d, 0xed56
mov ecx, 0xe
mov qword [rsp + 0x20], rax
lea r8, str.cannot_open_file
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
mov rbx, qword [rdi + 0x50]
mov rax, qword [rbx]
test rax, rax
je 0x14023020e
mov rcx, rbx
call qword [rax + 8]
xor ecx, ecx
mov qword [rbx], rcx
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
test rax, rax
jne 0x14022fcd5
cmp byte [rdi + 8], 0
jne 0x140230241
mov rcx, qword [rdi + 0x48]
mov ebx, 0xe
mov rax, qword [rcx]
test rax, rax
jne 0x14022ffcc
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14022fc12
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14022fd9a
mov ebx, 0xe
jmp 0x14022fc12
mov rax, qword [0x1402b2220]
test rax, rax
je 0x140230259
call rax
mov edx, 2
mov rcx, rdi
call sym.pagerLockDb
test eax, eax
jne 0x1402302b3
mov rax, qword [rsi + 0x30]
test rax, rax
je 0x140230282
mov rdx, qword [rdi + 0xe0]
xor r8d, r8d
mov rcx, rsi
call rax
cmp byte [rdi + 8], 0
jne 0x1402302b3
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x1402302ac
cmp byte [rdi + 0x11], 0
jne 0x1402302a2
mov edx, 1
call qword [rax + 0x40]
cmp byte [rdi + 0x16], 5
je 0x1402302ac
mov byte [rdi + 0x16], 1
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
mov rax, qword [0x1402b2228]
test rax, rax
je 0x14022fd9a
call rax
jmp 0x14022fd9a
mov rcx, qword [rdi + 0x50]
mov byte [rsp + 0x40], 0
xor r9d, r9d
mov rdx, rbp
mov r8d, 1
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rsi, qword [rdi + 0x50]
cmp eax, 0x20a
cmovne ebx, eax
mov rax, qword [rsi]
test rax, rax
je 0x1402300b4
mov rcx, rsi
call qword [rax + 8]
xor r9d, r9d
mov qword [rsi], r9
jmp 0x1402300b4