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

Disassembly:
lea r12, [rsp - 0x48]
cmp r12, qword [r14 + 0x10]
jbe 0x570ca2
push rbp
mov rbp, rsp
sub rsp, 0xc0
movq qword [rsp + 0xb8], xmm15
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xd8], rbx
mov byte [rsp + 0xe0], cl
mov byte [rsp + 0x3b], 0
mov dword [rsp + 0x3c], 0
mov ebx, 0x20
call sym.modernc.org_libc._TLS_.Alloc
mov qword [rsp + 0x80], rax
lea rcx, [sym.modernc.org_sqlite_lib._sqlite3BtreeDelete.deferwrap1]
mov qword [rsp + 0xa8], rcx
mov rcx, qword [rsp + 0xd0]
mov qword [rsp + 0xb0], rcx
lea rdx, [rsp + 0xa8]
mov qword [rsp + 0xb8], rdx
mov byte [rsp + 0x3b], 1
mov rbx, qword [rsp + 0xd8]
mov rdi, rbx
mov rdx, qword [rbx + 8]
mov qword [rsp + 0x78], rdx
mov rsi, rdx
movzx r8d, byte [rbx]
mov rbx, qword [rdx + 8]
mov qword [rsp + 0x68], rbx
test r8d, r8d
je 0x57017d
nop word [rax + rax]
cmp r8d, 3
jl 0x570604
mov rax, rcx
mov rbx, rdi
call sym.modernc.org_sqlite_lib._btreeRestoreCursorPosition
mov rcx, qword [rsp + 0x80]
mov rdx, rcx
mov dword [rcx], eax
mov rcx, rdx
mov edx, dword [rdx]
test edx, edx
jne 0x5705e1
mov rbx, qword [rsp + 0xd8]
mov rdi, rbx
movzx esi, byte [rbx]
nop dword [rax]
test esi, esi
jne 0x5705e1
mov rax, rcx
mov rcx, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
mov r8, rdi
movzx r9d, word [r8 + 0x56]
mov r10, qword [r8 + 0x88]
mov r11, r10
movzx r12d, word [r10 + 0x18]
movsx r8, byte [r8 + 0x54]
nop dword [rax]
cmp r12d, r9d
jle 0x57059d
mov qword [rsp + 0xa0], r11
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r8d
movzx r12d, word [r10 + 0x1a]
mov r13d, r9d
shl r9d, 1
movsxd r9, r9d
add r9, qword [r10 + 0x60]
movzx r9d, word [r9]
rol r9w, 8
movzx r9d, r9w
and r12d, r9d
movsxd r9, r12d
add r9, qword [r10 + 0x50]
mov qword [rsp + 0x60], r9
cmp dword [r10 + 0x14], 0
jl 0x5701f4
xor edx, edx
jmp 0x570240
mov rax, rcx
mov rbx, r11
call sym.modernc.org_sqlite_lib._btreeComputeFreeSpace
test eax, eax
setne cl
mov rax, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
mov r11, qword [rsp + 0xa0]
mov r13d, dword [rsp + 0x4c]
mov edx, ecx
mov rcx, qword [rsp + 0xd0]
nop
test dl, dl
jne 0x57055a
mov r10, r11
movzx r12d, word [r11 + 0x18]
add r12, qword [r11 + 0x60]
cmp r12, r9
ja 0x570517
movzx r12d, byte [rsp + 0xe0]
movzx r12d, r12b
bt r12d, 1
setb r12b
jae 0x5703b3
mov byte [rsp + 0x3a], r12b
cmp byte [r11 + 8], 0
jne 0x57028f
mov edx, 1
jmp 0x570316
mov rbx, r10
mov rdx, qword [r10 + 0x78]
mov rsi, qword [rdx]
mov rax, rcx
mov rcx, r9
nop
call rsi
mov rsi, qword [rsp + 0xa0]
movzx r8d, ax
add r8d, dword [rsi + 0x14]
lea esi, [r8 + 2]
mov rbx, qword [rsp + 0x68]
mov r8, rbx
mov r8d, dword [r8 + 0x38]
shl r8d, 1
mov r9d, 0xaaaaaaab
imul r9, r8
shr r9, 0x21
cmp r9d, esi
setl sil
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0xd0]
mov rdi, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
mov r10, qword [rsp + 0xa0]
movzx r12d, byte [rsp + 0x3a]
mov r13d, dword [rsp + 0x4c]
mov edx, esi
mov rsi, qword [rsp + 0x78]
test dl, dl
jne 0x570333
mov rdx, r10
movzx r10d, word [r10 + 0x18]
cmp r10d, 1
je 0x570333
mov r10d, 2
jmp 0x5703b9
mov rax, rcx
mov rbx, rdi
call sym.modernc.org_sqlite_lib._saveCursorKey
mov rcx, qword [rsp + 0x80]
mov rdx, rcx
mov dword [rcx], eax
mov rcx, rdx
mov edx, dword [rdx]
test edx, edx
jne 0x570390
mov rax, rcx
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
mov r13d, dword [rsp + 0x4c]
movzx r10d, byte [rsp + 0x3a]
jmp 0x5703b9
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdx, r10
mov r10d, r12d
mov byte [rsp + 0x39], r10b
mov r11, rdx
cmp byte [rdx + 8], 0
jne 0x570428
mov rax, rcx
mov rbx, rdi
xor ecx, ecx
call sym.modernc.org_sqlite_lib._sqlite3BtreePrevious
mov rdx, qword [rsp + 0x80]
mov rsi, rdx
mov dword [rdx], eax
mov rdx, rsi
mov esi, dword [rsi]
test esi, esi
jne 0x5704f4
mov rax, rdx
mov rcx, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
movzx r10d, byte [rsp + 0x39]
mov r11, qword [rsp + 0xa0]
mov r13d, dword [rsp + 0x4c]
mov rdx, rdi
movzx r12d, byte [rdx + 1]
bt r12d, 5
jae 0x570495
mov edx, dword [rdx + 0x50]
mov rax, rcx
mov ecx, edx
nop
call sym.modernc.org_sqlite_lib._saveAllCursors
mov rdx, qword [rsp + 0x80]
mov rsi, rdx
mov dword [rdx], eax
mov rdx, rsi
mov esi, dword [rsi]
test esi, esi
jne 0x5704d1
mov rax, rdx
mov rcx, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x78]
mov rdi, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x60]
movzx r10d, byte [rsp + 0x39]
mov r11, qword [rsp + 0xa0]
mov r13d, dword [rsp + 0x4c]
mov rdx, rdi
cmp qword [rdi + 0x80], 0
jne 0x570648
mov r12, rsi
cmp byte [rsi + 0x13], 0
je 0x570648
mov r15d, dword [rdi + 0x50]
mov rdi, qword [rdi + 0x30]
mov byte [rsi + 0x13], 0
mov rsi, r12
mov r12, qword [r12 + 8]
mov r12, qword [r12 + 0x10]
jmp 0x570c4f
mov dword [rsp + 0x3c], esi
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], esi
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, rcx
mov ebx, 0xb
mov ecx, 0x139b6
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, rcx
mov ebx, 0xb
mov ecx, 0x139b3
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, rcx
mov ebx, 0xb
mov ecx, 0x139af
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
nop
ret
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, rcx
mov ebx, 0xb
mov ecx, 0x139a6
nop
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rbx, qword [r11 + 0x70]
mov rax, rcx
call sym.modernc.org_sqlite_lib._sqlite3PagerWrite
mov rdi, qword [rsp + 0x80]
mov rcx, rdi
mov dword [rcx], eax
mov rcx, rdi
mov ecx, dword [rcx]
test ecx, ecx
jne 0x570a96
mov rbx, qword [rsp + 0xa0]
mov rsi, rbx
mov rdx, qword [rsi + 0x80]
mov rsi, qword [rdx]
lea r8, [rdi + 8]
mov qword [rsp + 0x98], r8
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x60]
mov rdi, r8
nop
call rsi
mov rdi, qword [rsp + 0x98]
mov rsi, rdi
movzx r8d, word [rsi + 0x14]
cmp dword [rsi + 0x10], r8d
jne 0x5706cb
mov rsi, qword [rsp + 0x80]
mov rdx, rsi
mov dword [rdx], 0
jmp 0x5706fa
mov rax, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x60]
call sym.modernc.org_sqlite_lib._clearCellOverflow
mov rsi, qword [rsp + 0x80]
mov rdx, rsi
mov dword [rdx], eax
mov rdi, qword [rsp + 0x98]
movzx edi, word [rdi + 0x16]
mov rax, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xa0]
mov ecx, dword [rsp + 0x4c]
call sym.modernc.org_sqlite_lib._dropCell
mov rdx, qword [rsp + 0x80]
mov r8, rdx
mov edx, dword [rdx]
test edx, edx
jne 0x570a73
mov rsi, qword [rsp + 0xa0]
mov r9, rsi
cmp byte [rsi + 8], 0
nop dword [rax + rax]
jne 0x570927
mov rsi, qword [rsp + 0xd8]
mov r10, rsi
mov rbx, qword [rsi + 0x88]
mov qword [rsp + 0x58], rbx
mov rsi, rbx
cmp dword [rsi + 0x14], 0
jge 0x5707a5
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._btreeComputeFreeSpace
mov rcx, qword [rsp + 0x80]
mov rdx, rcx
mov dword [rcx], eax
mov rcx, rdx
mov edx, dword [rdx]
test edx, edx
jne 0x570a50
mov rbx, qword [rsp + 0x58]
mov r8, rcx
mov r9, qword [rsp + 0xa0]
mov r10, qword [rsp + 0xd8]
mov rsi, r10
movsx r11, byte [r10 + 0x54]
dec r11d
mov r12d, dword [rsp + 0x48]
cmp r12d, r11d
jge 0x5707d6
lea r10d, [r12 + 1]
movsxd r10, r10d
lea r10, [rsi + r10*8]
lea r10, [r10 + 0x90]
mov r10, qword [r10]
mov r10d, dword [r10 + 4]
jmp 0x5707e1
mov r11, qword [r10 + 0x88]
mov r10d, dword [r11 + 4]
mov r11, rbx
mov r13, qword [r11 + 0x50]
movzx r15d, word [r11 + 0x1a]
movzx eax, word [r11 + 0x18]
dec eax
shl eax, 1
movsxd rax, eax
add rax, qword [r11 + 0x60]
movzx r11d, word [rax]
lea rax, [r13 + 4]
rol r11w, 8
movzx r11d, r11w
and r15d, r11d
movsxd r11, r15d
lea rcx, [r13 + r11]
nop dword [rax]
cmp rax, rcx
ja 0x570a08
mov qword [rsp + 0x98], r13
mov qword [rsp + 0x90], r11
mov dword [rsp + 0x44], r10d
mov rsi, rbx
mov rdx, qword [rsi + 0x78]
mov rsi, qword [rdx]
mov rax, qword [rsp + 0xd0]
call rsi
mov rsi, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rdi + 0x70]
movzx edi, ax
mov dword [rsp + 0x40], edi
mov rsi, qword [rsi + 0x88]
mov qword [rsp + 0x50], rsi
mov rax, qword [rsp + 0xd0]
nop dword [rax + rax]
call sym.modernc.org_sqlite_lib._sqlite3PagerWrite
mov rsi, qword [rsp + 0x80]
mov rdi, rsi
mov dword [rdi], eax
mov rdi, rsi
cmp dword [rdi], 0
jne 0x5708eb
mov rdx, qword [rsp + 0x90]
mov r10, qword [rsp + 0x98]
lea rdi, [r10 + rdx]
lea rdi, [rdi - 4]
mov esi, dword [rsp + 0x40]
lea edx, [rsi + 4]
mov rax, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xa0]
mov ecx, dword [rsp + 0x4c]
mov r8, qword [rsp + 0x50]
mov r9d, dword [rsp + 0x44]
mov esi, edx
call sym.modernc.org_sqlite_lib._insertCell
mov rsi, qword [rsp + 0x80]
mov rdx, rsi
mov dword [rdx], eax
mov rbx, qword [rsp + 0x58]
mov rdx, rbx
movzx ecx, word [rdx + 0x18]
dec ecx
mov rax, qword [rsp + 0xd0]
mov edi, dword [rsp + 0x40]
call sym.modernc.org_sqlite_lib._dropCell
mov rdx, qword [rsp + 0x80]
mov r8, rdx
mov edx, dword [rdx]
test edx, edx
jne 0x5709e5
mov r9, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xd8]
mov rcx, rbx
mov rsi, qword [rcx + 0x88]
mov esi, dword [rsi + 0x14]
lea esi, [rsi + rsi*2]
mov rcx, qword [rcx + 0x20]
mov ecx, dword [rcx + 0x38]
shl ecx, 1
cmp esi, ecx
jg 0x570958
mov rcx, r8
mov dword [r8], 0
jmp 0x570985
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._balance
mov rcx, qword [rsp + 0x80]
mov rdx, rcx
mov dword [rcx], eax
mov rcx, rdx
mov rbx, qword [rsp + 0xd8]
mov r9, qword [rsp + 0xa0]
mov rsi, rcx
cmp dword [rcx], 0
jne 0x570ab9
mov rcx, rbx
movsx rdi, byte [rcx + 0x54]
mov r8d, dword [rsp + 0x48]
nop
cmp edi, r8d
jle 0x570ab9
mov rcx, qword [rcx + 0x88]
mov rbx, qword [rcx + 0x70]
mov rax, qword [rsp + 0xd0]
nop dword [rax]
call sym.modernc.org_sqlite_lib._sqlite3PagerUnrefNotNull
mov rbx, qword [rsp + 0xd8]
mov rcx, rbx
movzx edx, byte [rcx + 0x54]
dec edx
mov byte [rcx + 0x54], dl
mov ecx, dword [rsp + 0x48]
nop dword [rax]
jmp 0x570b90
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, qword [rsp + 0xd0]
mov ebx, 0xb
mov ecx, 0x13a11
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], ecx
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rcx, rsi
cmp dword [rsi], 0
nop
jne 0x570b6b
movzx esi, byte [rsp + 0x39]
movzx edi, sil
cmp edi, 1
jle 0x570b0b
mov rax, rbx
mov byte [rbx], 2
mov rbx, r9
movzx esi, word [r9 + 0x18]
mov edi, dword [rsp + 0x4c]
cmp esi, edi
jg 0x570b02
mov rsi, rax
mov dword [rax + 4], 0xffffffff
movzx eax, word [rbx + 0x18]
dec eax
mov word [rsi + 0x56], ax
nop
jmp 0x570b6b
mov dword [rax + 4], 1
jmp 0x570b6b
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._moveToRoot
mov rcx, qword [rsp + 0x80]
mov rdx, rcx
mov dword [rcx], eax
movzx ecx, byte [rsp + 0x39]
test cl, cl
je 0x570b58
mov rax, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xd8]
nop
call sym.modernc.org_sqlite_lib._btreeReleaseAllCursorPages
mov rcx, qword [rsp + 0xd8]
mov byte [rcx], 3
mov rdx, qword [rsp + 0x80]
mov rax, rdx
cmp dword [rdx], 0x10
nop
jne 0x570b68
mov dword [rdx], 0
mov rcx, rax
mov eax, dword [rcx]
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x3b], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdx, rbx
movzx esi, byte [rdx + 0x54]
movsx rdi, sil
cmp ecx, edi
jge 0x570be5
lea rdx, [rbx + 0x54]
movzx esi, byte [rdx]
lea edi, [rsi - 1]
mov byte [rdx], dil
movsx rdx, sil
lea rdx, [rbx + rdx*8]
lea rdx, [rdx + 0x90]
mov rdx, qword [rdx]
nop
test rdx, rdx
je 0x570b90
mov rbx, qword [rdx + 0x70]
nop
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._sqlite3PagerUnrefNotNull
mov ecx, dword [rsp + 0x48]
mov rbx, qword [rsp + 0xd8]
jmp 0x570b90
movsx rcx, sil
lea rcx, [rbx + rcx*8]
lea rcx, [rcx + 0x90]
mov rcx, qword [rcx]
mov qword [rdx + 0x88], rcx
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._balance
mov rsi, qword [rsp + 0x80]
mov rcx, rsi
mov dword [rcx], eax
mov rbx, qword [rsp + 0xd8]
mov r9, qword [rsp + 0xa0]
jmp 0x570ab9
mov rsi, qword [rsp + 0x70]
mov rsi, qword [rsi + 0x28]
mov qword [rsp + 0x88], rax
mov rax, rsi
mov rsi, r12
mov r12, rax
mov rax, qword [rsp + 0x88]
test r12, r12
je 0x570648
mov qword [rsp + 0x70], r12
movzx r12d, byte [r12 + 1]
bt r12d, 4
jae 0x570c8b
mov r12, rsi
mov byte [rsi + 0x13], 1
mov rsi, qword [rsp + 0x70]
cmp dword [rsi + 0x50], r15d
jne 0x570c2d
nop dword [rax]
cmp qword [rsi + 0x30], rdi
jne 0x570c2d
mov byte [rsi], 1
jmp 0x570c2d
mov r12, rsi
jmp 0x570c2d
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov byte [rsp + 0x18], cl
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
movzx ecx, byte [rsp + 0x18]
jmp sym.modernc.org_sqlite_lib._sqlite3BtreeDelete