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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
mov rbx, rcx
mov rcx, qword [rcx + 0x120]
test rcx, rcx
je 0x804e80
mov dword [rsp + 0x40], 0
lea rbp, [rsp + 0x40]
xor edi, edi
call dbg.sqlite3WalEndReadTransaction
mov r12, qword [rbx + 0x120]
nop dword [rax + rax]
add edi, 1
xor r8d, r8d
mov rdx, rbp
mov r9d, edi
mov rcx, r12
call dbg.walTryBeginRead
cmp eax, 0xffffffff
mov esi, eax
je 0x804de0
or eax, dword [rsp + 0x40]
jne 0x804e30
movabs rax, 0xff000000ff
test qword [rbx + 0x10], rax
jne 0x804e60
test esi, esi
je 0x804e96
mov rcx, rbx
call dbg.pager_unlock
mov eax, esi
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov rcx, rbx
call dbg.pager_reset
cmp byte [rbx + 0x1a], 0
je 0x804e01
mov rcx, qword [rbx + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
movabs rax, 0xff000000ff
test qword [rbx + 0x10], rax
je 0x804e11
test esi, esi
jne 0x804e19
xor esi, esi
mov byte [rbx + 0x14], 1
mov eax, esi
mov byte [rbx + 0x1b], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp byte [rbx + 0x14], 0
je 0x804eb0
movabs rax, 0xff000000ff
test qword [rbx + 0x10], rax
jne 0x804e64
lea rdx, [rbx + 0x1c]
mov rcx, rbx
call dbg.pagerPagecount
mov esi, eax
jmp 0x804e60
mov edx, 1
mov rcx, rbx
call sym.pager_wait_on_lock.part.54
test eax, eax
mov esi, eax
jne 0x804e19
cmp byte [rbx + 0x15], 1
jbe 0x804f40
cmp byte [rbx + 0x12], 0
jne 0x80507a
movzx eax, byte [rbx + 0x15]
cmp al, 5
je 0x804ee3
cmp al, 3
ja 0x804efa
mov edx, 4
mov rcx, rbx
call sym.pagerLockDb.part.38
test eax, eax
mov esi, eax
jne 0x804e19
mov rax, qword [rbx + 0x50]
cmp qword [rax], 0
je 0x8050c0
mov rcx, rbx
call dbg.pagerSyncHotJournal
test eax, eax
mov esi, eax
je 0x8051b6
movzx eax, sil
cmp eax, 0xd
je 0x804f2c
cmp eax, 0xa
jne 0x804e19
mov edx, esi
mov rcx, rbx
call sym.pager_error.part.42
jmp 0x804e19
mov rax, qword [rbx + 0x50]
mov dword [rsp + 0x34], 1
mov r12, qword [rbx]
mov rdi, qword [rax]
test rdi, rdi
je 0x805084
mov rcx, qword [rbx + 0x48]
mov dword [rsp + 0x38], 0
lea rdx, [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x48]
test eax, eax
mov esi, eax
jne 0x804e19
mov ecx, dword [rsp + 0x38]
test ecx, ecx
je 0x8051d2
nop dword [rax + rax]
cmp byte [rbx + 0x10], 0
jne 0x805065
cmp byte [rbx + 0x1b], 0
je 0x805017
mov rcx, qword [rbx + 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 esi, eax
je 0x804fdf
cmp eax, 0x20a
jne 0x804e19
mov qword [rbp], 0
mov qword [rbp + 8], 0
mov rdx, qword [rsp + 0x40]
cmp qword [rbx + 0x88], rdx
je 0x805140
mov rcx, rbx
call dbg.pager_reset
cmp byte [rbx + 0x1a], 0
je 0x805011
mov rcx, qword [rbx + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
cmp byte [rbx + 0x10], 0
jne 0x805065
mov rax, qword [rbx]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rdx, qword [rbx + 0x128]
mov rcx, rax
call qword [rax + 0x38]
test eax, eax
mov esi, eax
jne 0x805050
mov esi, dword [rsp + 0x3c]
test esi, esi
jne 0x805157
cmp byte [rbx + 9], 5
jne 0x805050
mov byte [rbx + 9], 0
nop dword [rax + rax]
mov rcx, qword [rbx + 0x120]
test rcx, rcx
jne 0x804dbd
jmp 0x804e01
mov rcx, qword [rbx + 0x120]
test rcx, rcx
jne 0x804dbd
jmp 0x804e86
mov esi, 0x308
jmp 0x804e19
xor r8d, r8d
mov rdx, qword [rbx + 0xd8]
mov rcx, r12
lea r9, [rsp + 0x34]
call qword [r12 + 0x38]
test eax, eax
mov esi, eax
jne 0x804e19
mov r8d, dword [rsp + 0x34]
test r8d, r8d
je 0x804f90
jmp 0x804f5b
mov rdi, qword [rbx]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rdx, qword [rbx + 0xd8]
mov rcx, rdi
call qword [rdi + 0x38]
test eax, eax
mov esi, eax
jne 0x805199
mov edx, dword [rsp + 0x3c]
mov r8, qword [rbx + 0x50]
test edx, edx
jne 0x80524c
cmp qword [r8], 0
jne 0x804f08
cmp byte [rbx + 8], 0
jne 0x804f90
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x80512a
cmp byte [rbx + 0x11], 0
jne 0x805120
mov edx, 1
call qword [rax + 0x40]
cmp byte [rbx + 0x15], 5
je 0x80512a
mov byte [rbx + 0x15], 1
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x16], al
test esi, esi
je 0x804f90
jmp 0x804f1a
mov rdx, qword [rsp + 0x48]
cmp qword [rbx + 0x90], rdx
jne 0x804ff1
jmp 0x805011
lea rbp, [rsp + 0x40]
mov rcx, rbx
mov rdx, rbp
call dbg.pagerPagecount
test eax, eax
mov esi, eax
jne 0x805050
mov eax, dword [rsp + 0x40]
test eax, eax
jne 0x805297
mov rax, qword [rbx]
xor r8d, r8d
mov rdx, qword [rbx + 0x128]
mov rcx, rax
call qword [rax + 0x30]
mov esi, eax
jmp 0x805050
mov esi, eax
mov rax, qword [rbx + 0x50]
cmp qword [rax], 0
jne 0x804f08
cmp byte [rbx + 8], 0
jne 0x804f1a
jmp 0x805106
xor edx, edx
cmp byte [rbx + 0x10], 0
mov rcx, rbx
sete dl
call dbg.pager_playback
mov byte [rbx + 0x14], 0
mov esi, eax
jmp 0x805131
lea rdx, [rsp + 0x3c]
mov rcx, rbx
call dbg.pagerPagecount
test eax, eax
mov esi, eax
jne 0x804e19
cmp dword [rsp + 0x3c], 0
jne 0x8052a8
test rdi, rdi
je 0x8052f7
mov rcx, qword [rbx + 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 esi, eax
je 0x80537e
test esi, esi
movzx eax, byte [rsp + 0x40]
jne 0x804e19
test al, al
setne al
movzx eax, al
test eax, eax
je 0x804f90
jmp 0x804ecd
lea rbp, [rsp + 0x40]
mov rdx, qword [rbx + 0xd8]
mov r9d, 0x802
mov rcx, rdi
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x20], rbp
call qword [rdi + 0x28]
test eax, eax
jne 0x805197
test byte [rsp + 0x40], 1
jne 0x80538d
mov rax, qword [rbx + 0x50]
cmp qword [rax], 0
jne 0x804f08
jmp 0x8050fc
xor edx, edx
mov rcx, rbx
call sym.sqlite3PagerOpenWal
mov esi, eax
jmp 0x805050
test rdi, rdi
jne 0x8051fd
lea rbp, [rsp + 0x40]
mov rcx, r12
mov dword [rsp + 0x40], 0x801
mov rdx, qword [rbx + 0xd8]
mov qword [rsp + 0x20], rbp
mov r9d, 0x801
mov r8, qword [rbx + 0x50]
call qword [r12 + 0x28]
test eax, eax
mov r12d, eax
je 0x8053f2
cmp eax, 0xe
mov esi, eax
jne 0x804e19
jmp 0x804ecd
mov rax, qword [0x00ccc030]
test rax, rax
je 0x805305
call rax
movzx eax, byte [rbx + 0x15]
cmp al, 1
jbe 0x80536b
cmp al, 5
je 0x80536b
xor r8d, r8d
mov rdx, qword [rbx + 0xd8]
mov rcx, r12
call qword [r12 + 0x30]
cmp byte [rbx + 8], 0
jne 0x805354
mov rcx, qword [rbx + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x80534d
cmp byte [rbx + 0x11], 0
jne 0x805343
mov edx, 1
call qword [rax + 0x40]
cmp byte [rbx + 0x15], 5
je 0x80534d
mov byte [rbx + 0x15], 1
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x16], al
mov rax, qword [0x00ccc038]
test rax, rax
je 0x804f90
call rax
jmp 0x804f90
mov edx, 2
mov rcx, rbx
call sym.pagerLockDb.part.38
test eax, eax
je 0x805311
jmp 0x805354
xor eax, eax
cmp byte [rsp + 0x40], 0
setne al
jmp 0x80523f
lea rax, [0x00c4d9dc]
mov r9d, 0xdf60
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 rsi, qword [rbx + 0x50]
mov rax, qword [rsi]
test rax, rax
je 0x8053de
mov rcx, rsi
call qword [rax + 8]
mov rax, qword [rbx + 0x50]
mov qword [rsi], 0
cmp qword [rax], 0
jne 0x804f08
cmp byte [rbx + 8], 0
mov esi, 0xe
je 0x805106
jmp 0x804e19
mov rcx, qword [rbx + 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 esi, eax
je 0x80543e
mov rdi, qword [rbx + 0x50]
mov r12d, esi
mov rax, qword [rdi]
test rax, rax
je 0x80522a
mov rcx, rdi
mov esi, r12d
call qword [rax + 8]
mov qword [rdi], 0
jmp 0x80522a
mov rdi, qword [rbx + 0x50]
mov rax, qword [rdi]
test rax, rax
jne 0x805429
movzx eax, byte [rsp + 0x40]
jmp 0x805237