Function at 0x14018b830
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 + 0x148]
test rcx, rcx
je 0x14018b910
mov dword [rsp + 0x40], 0
xor esi, esi
call dbg.sqlite3WalEndReadTransaction
mov r12, qword [rdi + 0x148]
nop dword [rax + rax]
add esi, 1
xor r8d, r8d
mov rdx, rbp
mov r9d, esi
mov rcx, r12
call dbg.walTryBeginRead
cmp eax, 0xffffffff
mov ebx, eax
je 0x14018b870
or eax, dword [rsp + 0x40]
je 0x14018b916
mov rax, qword [rdi + 0x70]
add dword [rdi + 0x84], 1
test rax, rax
je 0x14018b8b8
nop dword [rax]
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x14018b8a8
mov rcx, qword [rdi + 0x140]
xor edx, edx
call dbg.sqlite3PcacheTruncate
cmp byte [rdi + 0x1b], 0
je 0x14018b8de
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 0x14018b940
test ebx, ebx
je 0x14018b926
mov rcx, rdi
call dbg.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 0x14018b960
movabs rax, 0xff00000000ff
and rax, qword [rdi + 0x10]
je 0x14018b948
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
test ebx, ebx
jne 0x14018b8f2
nop dword [rax]
lea rdx, [rdi + 0x20]
mov rcx, rdi
call dbg.pagerPagecount
mov ebx, eax
jmp 0x14018b8ee
mov edx, 1
mov rcx, rdi
call dbg.pager_wait_on_lock
test eax, eax
mov ebx, eax
jne 0x14018b8f2
cmp byte [rdi + 0x16], 1
jbe 0x14018ba09
cmp byte [rdi + 0x12], 0
mov ebx, 0x308
jne 0x14018b8f2
mov edx, 4
mov rcx, rdi
call sym.pagerLockDb
test eax, eax
mov ebx, eax
jne 0x14018b8f2
mov rax, qword [rdi + 0x50]
cmp qword [rax], 0
je 0x14018bbb0
mov rcx, rdi
call dbg.pagerSyncHotJournal
test eax, eax
mov ebx, eax
jne 0x14018b9de
xor edx, edx
cmp byte [rdi + 0x10], 0
mov rcx, rdi
sete dl
call dbg.pager_playback
mov byte [rdi + 0x15], 0
mov ebx, eax
test ebx, ebx
je 0x14018ba51
cmp bl, 0xd
movzx eax, bl
je 0x14018b9ef
cmp eax, 0xa
jne 0x14018b8f2
lea rax, [dbg.getPageError]
mov dword [rdi + 0x30], ebx
mov byte [rdi + 0x15], 6
mov qword [rdi + 0x110], rax
jmp 0x14018b8f2
mov rax, qword [rdi + 0x50]
mov dword [rsp + 0x34], 1
mov rsi, qword [rdi]
mov rbp, qword [rax]
test rbp, rbp
je 0x14018bb7d
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 0x14018b8f2
mov ebx, dword [rsp + 0x38]
test ebx, ebx
je 0x14018bca0
cmp byte [rdi + 0x10], 0
jne 0x14018bb52
cmp byte [rdi + 0x1c], 0
je 0x14018bb04
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 0x14018baa6
cmp eax, 0x20a
jne 0x14018b8f2
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov rdx, qword [rsp + 0x40]
cmp qword [rdi + 0x88], rdx
je 0x14018bc30
mov rax, qword [rdi + 0x70]
add dword [rdi + 0x84], 1
test rax, rax
je 0x14018bad8
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x14018bac8
mov rcx, qword [rdi + 0x140]
xor edx, edx
call dbg.sqlite3PcacheTruncate
cmp byte [rdi + 0x1b], 0
je 0x14018bafe
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 0x14018bb52
mov rax, qword [rdi]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rdx, qword [rdi + 0x150]
mov rcx, rax
call qword [rax + 0x38]
test eax, eax
mov ebx, eax
jne 0x14018bb6c
mov edx, dword [rsp + 0x3c]
test edx, edx
jne 0x14018bc47
cmp byte [rdi + 9], 5
mov rcx, qword [rdi + 0x148]
je 0x14018bd10
test rcx, rcx
je 0x14018b916
lea rbp, [rsp + 0x40]
jmp 0x14018b852
mov rcx, qword [rdi + 0x148]
lea rbp, [rsp + 0x40]
test rcx, rcx
jne 0x14018b852
jmp 0x14018b916
mov rcx, qword [rdi + 0x148]
test rcx, rcx
jne 0x14018bb48
jmp 0x14018b8f2
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 0x14018b8f2
mov r12d, dword [rsp + 0x34]
test r12d, r12d
je 0x14018ba51
jmp 0x14018ba24
cmp byte [rdi + 9], 2
je 0x14018bbf2
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 0x14018bd27
mov ebx, dword [rsp + 0x3c]
mov r8, qword [rdi + 0x50]
test ebx, ebx
jne 0x14018bd5b
cmp qword [r8], 0
jne 0x14018b9b5
cmp byte [rdi + 8], 0
jne 0x14018ba51
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x14018be81
cmp byte [rdi + 0x11], 0
jne 0x14018bc1a
mov edx, 1
call qword [rax + 0x40]
cmp byte [rdi + 0x16], 5
je 0x14018bc24
mov byte [rdi + 0x16], 1
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14018b9da
mov rdx, qword [rsp + 0x48]
cmp qword [rdi + 0x90], rdx
jne 0x14018bab8
jmp 0x14018bafe
lea rbp, [rsp + 0x40]
mov rcx, rdi
mov rdx, rbp
call dbg.pagerPagecount
test eax, eax
mov ebx, eax
jne 0x14018bdb7
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x14018bda6
mov rcx, qword [rdi]
mov rdx, qword [rdi + 0x150]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x14018bdcc
xor r8d, r8d
call rax
mov ebx, eax
mov rcx, qword [rdi + 0x148]
test rcx, rcx
jne 0x14018b852
jmp 0x14018b8de
lea rdx, [rsp + 0x3c]
mov rcx, rdi
call dbg.pagerPagecount
test eax, eax
mov ebx, eax
jne 0x14018b8f2
cmp dword [rsp + 0x3c], 0
jne 0x14018bde1
test rbp, rbp
je 0x14018beec
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
jne 0x14018be67
xor eax, eax
cmp byte [rsp + 0x40], 0
setne al
test eax, eax
jne 0x14018b981
jmp 0x14018ba51
mov byte [rdi + 9], 0
lea rbp, [rsp + 0x40]
test rcx, rcx
jne 0x14018b852
jmp 0x14018b916
mov rax, qword [rdi + 0x50]
cmp qword [rax], 0
jne 0x14018b9b5
cmp byte [rdi + 8], 0
jne 0x14018b9de
mov rcx, qword [rdi + 0x48]
mov rax, qword [rcx]
test rax, rax
jne 0x14018bc0c
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14018b9de
xor r9d, r9d
mov rdx, qword [rdi + 0xe0]
mov rcx, rsi
lea rbp, [rsp + 0x40]
mov dword [rsp + 0x40], r9d
mov r9d, 0x802
mov qword [rsp + 0x20], rbp
call qword [rsi + 0x28]
test eax, eax
mov ebx, eax
jne 0x14018bd27
mov ebx, dword [rsp + 0x40]
and ebx, 1
jne 0x14018be8d
mov rax, qword [rdi + 0x50]
cmp qword [rax], 0
jne 0x14018b9b5
jmp 0x14018bbf2
xor edx, edx
mov rcx, rdi
call dbg.sqlite3PagerOpenWal
mov ebx, eax
jmp 0x14018bc8b
mov rcx, qword [rdi + 0x148]
test rcx, rcx
jne 0x14018b852
jmp 0x14018b8f2
mov rcx, qword [rdi + 0x148]
test rcx, rcx
jne 0x14018b852
jmp 0x14018b916
test rbp, rbp
jne 0x14018bccb
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 0x14018be27
cmp eax, 0xe
jne 0x14018b8f2
jmp 0x14018b981
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]
cmp eax, 0x20a
mov ebx, eax
je 0x14018bf70
mov rsi, qword [rdi + 0x50]
mov rax, qword [rsi]
test rax, rax
je 0x14018be67
mov rcx, rsi
call qword [rax + 8]
xor r10d, r10d
mov qword [rsi], r10
test ebx, ebx
movzx eax, byte [rsp + 0x40]
jne 0x14018b8f2
test al, al
jne 0x14018b981
jmp 0x14018ba51
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14018ba51
lea rax, [0x1403373dc]
mov r9d, 0xef3a
mov ecx, 0xe
mov qword [rsp + 0x20], rax
lea r8, str.cannot_open_file
lea rdx, str._s_at_line__d_of___.10s_
call dbg.sqlite3_log
mov rbx, qword [rdi + 0x50]
mov rax, qword [rbx]
test rax, rax
je 0x14018bedc
mov rcx, rbx
call qword [rax + 8]
mov rax, qword [rdi + 0x50]
xor ecx, ecx
mov qword [rbx], rcx
cmp qword [rax], 0
jne 0x14018b9b5
cmp byte [rdi + 8], 0
je 0x14018bf4f
mov ebx, 0xe
jmp 0x14018b8f2
mov rax, qword [0x1403b4c70]
test rax, rax
je 0x14018befa
call rax
mov edx, 2
mov rcx, rdi
call sym.pagerLockDb
test eax, eax
jne 0x14018bf29
mov rax, qword [rsi + 0x30]
test rax, rax
je 0x14018bf23
mov rdx, qword [rdi + 0xe0]
xor r8d, r8d
mov rcx, rsi
call rax
cmp byte [rdi + 8], 0
je 0x14018bf40
mov rax, qword [0x1403b4c78]
test rax, rax
je 0x14018ba51
call rax
jmp 0x14018ba51
mov edx, 1
mov rcx, rdi
call sym.pagerUnlockDb
jmp 0x14018bf29
mov rcx, qword [rdi + 0x48]
mov ebx, 0xe
mov rax, qword [rcx]
test rax, rax
jne 0x14018bc0c
movzx eax, byte [rdi + 0x10]
mov byte [rdi + 0x17], al
jmp 0x14018bee2
mov rbx, qword [rdi + 0x50]
mov rax, qword [rbx]
test rax, rax
je 0x14018bcf8
mov rcx, rbx
call qword [rax + 8]
xor r11d, r11d
mov qword [rbx], r11
movzx eax, byte [rsp + 0x40]
jmp 0x14018be74