Function at 0x57a170
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, 0x48
xor ebp, ebp
cmp edx, 1
mov rbx, rcx
mov r12d, edx
setne bpl
add ebp, r8d
cmp ebp, dword [rcx + 0x80]
jge 0x57a1cd
movsxd rax, ebp
mov edi, ebp
lea rsi, [rax*8]
sub rsi, rax
shl rsi, 3
nop
mov rax, qword [rbx + 0x78]
add edi, 1
mov rcx, qword [rax + rsi + 0x10]
add rsi, 0x38
call dbg.sqlite3BitvecDestroy
cmp edi, dword [rbx + 0x80]
jl 0x57a1b0
mov dword [rbx + 0x80], ebp
cmp r12d, 1
je 0x57a430
mov r13, qword [rbx + 0x128]
test r13, r13
je 0x57a480
test ebp, ebp
je 0x57a550
movsxd rbp, ebp
mov rdx, qword [rbx + 0x78]
lea rax, [rbp*8]
sub rax, rbp
lea r14, [rdx + rax*8 - 0x38]
test r14, r14
je 0x57a550
mov ecx, 0x200
mov esi, dword [r14 + 0x18]
mov r12d, 7
call dbg.sqlite3MallocZero
mov r13, rax
test rax, rax
je 0x57a41b
mov dword [rax], esi
mov eax, dword [r14 + 0x18]
cmp qword [rbx + 0x128], 0
mov rsi, qword [rbx + 0x60]
mov dword [rbx + 0x20], eax
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x17], al
je 0x57a4d0
mov qword [rbx + 0x60], 0
xor eax, eax
lea rbp, [rsp + 0x34]
lea rdi, [rbx + 0x60]
cmp rax, rsi
jge 0x57a377
lea rax, [rsp + 0x38]
mov r9, rbp
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov dword [rsp + 0x34], 0
call dbg.readJournalHdr
mov r12d, eax
mov eax, dword [rsp + 0x34]
test eax, eax
jne 0x57a32a
mov rax, qword [rbx + 0x60]
mov edx, dword [rbx + 0xb8]
add rdx, qword [rbx + 0x68]
cmp rdx, rax
je 0x57a310
test r12d, r12d
je 0x57a26a
nop dword [rax]
test r14, r14
je 0x57a300
mov rax, qword [rbx + 0xc8]
mov edx, dword [r14 + 0x1c]
mov rcx, qword [rbx + 0x128]
add rax, 4
mov rdi, rdx
imul rax, rdx
mov qword [rsp + 0x38], rax
test rcx, rcx
jne 0x57a3a7
test r12d, r12d
je 0x57a3d4
nop dword [rax]
mov rcx, r13
call dbg.sqlite3BitvecDestroy
jmp 0x57a41b
mov rax, rsi
sub rax, rdx
mov rdx, qword [rbx + 0xc8]
lea rcx, [rdx + 8]
cqo
idiv rcx
mov dword [rsp + 0x34], eax
test r12d, r12d
jne 0x57a2c0
xor r15d, r15d
jmp 0x57a363
mov r9d, 1
mov r8, r13
mov rdx, rdi
mov rcx, rbx
mov dword [rsp + 0x20], 1
add r15d, 1
call dbg.pager_playback_one_page
mov r12d, eax
test eax, eax
jne 0x57a2c0
mov rax, qword [rbx + 0x60]
cmp dword [rsp + 0x34], r15d
jbe 0x57a26a
cmp rax, rsi
jl 0x57a338
test r14, r14
je 0x57a40c
mov rax, qword [rbx + 0xc8]
mov edx, dword [r14 + 0x1c]
mov rcx, qword [rbx + 0x128]
add rax, 4
mov rdi, rdx
imul rax, rdx
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x57a3d4
mov eax, dword [rcx + 0x88]
cmp dword [r14 + 0x30], eax
je 0x57a5df
mov dword [r14 + 0x24], 0
mov eax, dword [rcx + 0x88]
mov dword [r14 + 0x30], eax
xor eax, eax
cmp dword [rcx + 0x58], eax
ja 0x57a5e8
lea rbp, [rsp + 0x38]
jmp 0x57a407
xor r9d, r9d
mov r8, r13
mov rdx, rbp
mov rcx, rbx
mov dword [rsp + 0x20], 1
add edi, 1
call dbg.pager_playback_one_page
mov r12d, eax
test eax, eax
jne 0x57a300
cmp dword [rbx + 0x3c], edi
ja 0x57a3e0
mov rcx, r13
call dbg.sqlite3BitvecDestroy
mov qword [rbx + 0x60], rsi
xor r12d, r12d
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movsxd rbp, ebp
mov rdx, qword [rbx + 0x78]
lea rax, [rbp*8]
sub rax, rbp
lea rsi, [rdx + rax*8]
mov r12d, dword [rsi + 0x20]
test r12d, r12d
je 0x57a41b
mov rcx, qword [rbx + 0x58]
xor r12d, r12d
mov rax, qword [rcx]
test rax, rax
je 0x57a41b
lea r8, [0x00746380]
mov edx, dword [rsi + 0x1c]
cmp rax, r8
je 0x57a69c
mov dword [rbx + 0x3c], edx
jmp 0x57a41b
mov rax, qword [rbx + 0x50]
cmp qword [rax], 0
je 0x57a418
test ebp, ebp
je 0x57a4ae
movsxd rbp, ebp
mov rdx, qword [rbx + 0x78]
lea rax, [rbp*8]
sub rax, rbp
lea r14, [rdx + rax*8 - 0x38]
test r14, r14
jne 0x57a215
mov eax, dword [rbx + 0x24]
mov rsi, qword [rbx + 0x60]
xor r14d, r14d
mov dword [rbx + 0x20], eax
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x17], al
jmp 0x57a257
mov rdi, qword [r14 + 8]
mov rax, qword [r14]
lea rbp, [rbx + 0x60]
test rdi, rdi
mov qword [rbx + 0x60], rax
cmove rdi, rsi
jmp 0x57a4f4
mov rax, qword [rbx + 0x60]
cmp rdi, rax
jle 0x57a261
mov r9d, 1
mov r8, r13
mov rdx, rbp
mov rcx, rbx
mov dword [rsp + 0x20], 1
call dbg.pager_playback_one_page
mov r12d, eax
test eax, eax
je 0x57a4f0
mov rax, qword [rbx + 0xc8]
mov edx, dword [r14 + 0x1c]
mov rcx, qword [rbx + 0x128]
add rax, 4
mov rdi, rdx
imul rax, rdx
mov qword [rsp + 0x38], rax
test rcx, rcx
jne 0x57a3a7
jmp 0x57a300
mov eax, dword [rbx + 0x24]
xor r12d, r12d
mov ebp, 1
mov dword [rbx + 0x20], eax
movzx eax, byte [rbx + 0x10]
mov byte [rbx + 0x17], al
cmp byte [r13 + 0x40], 0
jne 0x57a607
mov rax, qword [rbx + 0x120]
mov rcx, qword [rax]
mov rax, rcx
test rcx, rcx
je 0x57a598
nop word [rax + rax]
mov rdx, rax
mov rax, qword [rax + 0x40]
mov qword [rdx + 0x20], rax
test rax, rax
jne 0x57a588
call dbg.pcacheSortDirtyList
mov rsi, rax
test rax, rax
je 0x57a41b
test bpl, bpl
jne 0x57a5c0
jmp 0x57a41b
test eax, eax
jne 0x57a41b
mov rax, rsi
mov rcx, rbx
mov rsi, qword [rsi + 0x20]
mov edx, dword [rax + 0x30]
call dbg.pagerUndoCallback
mov r12d, eax
test rsi, rsi
jne 0x57a5b8
jmp 0x57a41b
mov eax, dword [r14 + 0x24]
jmp 0x57a3cb
mov dword [rcx + 0x58], eax
mov eax, dword [r14 + 0x28]
mov dword [rcx + 0x60], eax
mov eax, dword [r14 + 0x2c]
mov dword [rcx + 0x64], eax
call dbg.walCleanupHash
mov edi, dword [r14 + 0x1c]
jmp 0x57a3d4
mov rcx, qword [r13 + 0x30]
mov esi, dword [r13 + 0x58]
mov rax, qword [rcx]
movdqu xmm0, xmmword [rax]
movups xmmword [r13 + 0x48], xmm0
movdqu xmm1, xmmword [rax + 0x10]
movups xmmword [r13 + 0x58], xmm1
movdqu xmm2, xmmword [rax + 0x20]
mov eax, dword [r13 + 0x58]
lea edi, [rax + 1]
movups xmmword [r13 + 0x68], xmm2
cmp esi, edi
jae 0x57a677
jmp 0x57a6bf
cdqe
lea rdx, [rdi*4 + 0x84]
and edx, 0x3ffc
add rdx, qword [rcx + rax*8]
mov edx, dword [rdx]
mov rcx, rbx
add edi, 1
call dbg.pagerUndoCallback
test eax, eax
mov r12d, eax
sete al
mov ebp, eax
cmp esi, edi
jb 0x57a6bb
test al, al
je 0x57a6bb
mov rcx, qword [r13 + 0x30]
lea eax, [rdi + 0x1000]
sub rax, 0xfdf
shr rax, 0xc
test eax, eax
jne 0x57a640
mov rdx, qword [rcx]
mov eax, edi
lea rax, [rdx + rax*4 + 0x84]
mov edx, dword [rax]
jmp 0x57a656
mov rax, qword [rbx + 0xc8]
add rax, 4
imul rdx, rax
call sym.memjrnlTruncate
mov edx, dword [rsi + 0x1c]
mov r12d, eax
jmp 0x57a471
mov eax, dword [r13 + 0x58]
cmp esi, eax
je 0x57a570
mov rcx, r13
call dbg.walCleanupHash
jmp 0x57a570