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

Disassembly:
push rbx
push rsi
push rdi
push r14
sub rsp, 0x88
mov rax, qword [0x1800bddb0]
xor rax, rsp
mov qword [rsp + 0x70], rax
movzx r14d, byte [rcx + 0x41]
xor edi, edi
mov edx, 8
inc r14d
xor esi, esi
mov rbx, rcx
sub edx, r14d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x3c], r14d
mov dword [rsp + 0x38], edx
cmp byte [rcx + 0x3f], sil
jne 0x180086c13
mov rcx, qword [rcx + 8]
mov r8d, edx
lea r9d, [rdi + 0xa]
mov rax, qword [rcx]
mov edx, r14d
call qword [rax + 0x70]
test eax, eax
jne 0x180086f4a
xor eax, eax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0xb8], rbp
mov qword [rbx + 0x48], rax
mov qword [rbx + 0x50], rax
mov qword [rbx + 0x58], rax
mov qword [rbx + 0x60], rax
mov qword [rbx + 0x68], rax
mov qword [rbx + 0x70], rax
mov rcx, qword [rbx + 0x10]
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ebp, eax
test eax, eax
jne 0x180086f22
cmp qword [rsp + 0x40], 0x20
mov qword [rsp + 0xc0], r12
mov qword [rsp + 0xc8], r13
mov qword [rsp + 0x80], r15
jle 0x180086e94
mov rcx, qword [rbx + 0x10]
mov r15d, 0x20
lea rdx, [rsp + 0x50]
mov rax, qword [rcx]
xor r9d, r9d
mov r8d, r15d
call qword [rax + 0x10]
mov ebp, eax
test eax, eax
jne 0x180086f0a
mov ecx, dword [rsp + 0x50]
mov r13d, dword [rsp + 0x58]
bswap ecx
mov eax, ecx
and eax, 0xfffffffe
bswap r13d
cmp eax, 0x377f0682
jne 0x180086e94
lea eax, [r13 - 1]
test r13d, eax
jne 0x180086e94
lea eax, [r13 - 0x200]
cmp eax, 0xfe00
ja 0x180086e94
mov eax, dword [rsp + 0x5c]
and cl, 1
lea r12, [rbx + 0x60]
bswap eax
mov byte [rbx + 0x55], cl
mov ecx, esi
mov dword [rbx + 0x88], eax
mov rax, qword [rsp + 0x60]
sete cl
lea r8d, [r15 - 8]
lea rdx, [rsp + 0x50]
xor r9d, r9d
mov qword [rbx + 0x68], rax
mov dword [rbx + 0x38], r13d
mov qword [rsp + 0x20], r12
call fcn.180086470
mov eax, dword [rsp + 0x68]
bswap eax
cmp dword [r12], eax
jne 0x180086e94
mov eax, dword [rsp + 0x6c]
bswap eax
cmp dword [rbx + 0x64], eax
jne 0x180086e94
mov eax, dword [rsp + 0x54]
bswap eax
cmp eax, 0x2de218
je 0x180086d4f
mov ecx, 0xd63c
call fcn.180042120
mov ebp, eax
jmp 0x180086e90
lea eax, [r13 + 0x18]
movsxd rdi, eax
mov rcx, rdi
call sym.sqlite3.dll_sqlite3_malloc64
mov rsi, rax
test rax, rax
jne 0x180086d6e
lea ebp, [rax + 7]
jmp 0x180086f0a
lea rax, [rdi + 0x20]
xor r14d, r14d
cmp rax, qword [rsp + 0x40]
jg 0x180086e7b
mov rcx, qword [rbx + 0x10]
lea r8d, [r13 + 0x18]
inc r14d
mov rax, qword [rcx]
mov r9, r15
mov rdx, rsi
mov dword [rsp + 0x48], r14d
call qword [rax + 0x10]
mov ebp, eax
test eax, eax
jne 0x180086e7b
mov rax, qword [rbx + 0x68]
cmp rax, qword [rsi + 8]
jne 0x180086e7b
mov r14d, dword [rsi]
bswap r14d
test r14d, r14d
je 0x180086e7b
xor edi, edi
lea r8d, [rbp + 8]
mov r9, r12
cmp byte [rbx + 0x55], dil
mov rdx, rsi
mov qword [rsp + 0x20], r12
sete dil
mov ecx, edi
call fcn.180086470
mov r8d, dword [rbx + 0x38]
lea rdx, [rsi + 0x18]
mov r9, r12
mov ecx, edi
mov qword [rsp + 0x20], r12
call fcn.180086470
mov eax, dword [rsi + 0x10]
bswap eax
cmp dword [r12], eax
jne 0x180086e7b
mov eax, dword [rsi + 0x14]
bswap eax
cmp dword [r12 + 4], eax
jne 0x180086e7b
mov edi, dword [rsi + 4]
mov r8d, r14d
mov r14d, dword [rsp + 0x48]
mov edx, r14d
mov rcx, rbx
bswap edi
call fcn.1800866e0
mov ebp, eax
test eax, eax
jne 0x180086e7b
test edi, edi
je 0x180086e62
movzx eax, r13w
mov dword [rbx + 0x58], r14d
mov dword [rbx + 0x5c], edi
mov ecx, r13d
mov edx, 0xff00
and ax, dx
sar ecx, 0x10
or cx, ax
mov word [rbx + 0x56], cx
mov eax, dword [r12]
mov dword [rsp + 0x30], eax
mov eax, dword [rbx + 0x64]
mov dword [rsp + 0x34], eax
lea eax, [r13 + 0x18]
movsxd rdi, eax
add r15, rdi
lea rax, [rdi + r15]
cmp rax, qword [rsp + 0x40]
jle 0x180086d80
mov rcx, rsi
call sym.sqlite3.dll_sqlite3_free
mov edi, dword [rsp + 0x30]
mov esi, dword [rsp + 0x34]
mov r14d, dword [rsp + 0x3c]
test ebp, ebp
jne 0x180086f0a
mov rcx, rbx
mov dword [rbx + 0x60], edi
mov dword [rbx + 0x64], esi
call fcn.180087100
mov rax, qword [rbx + 0x30]
xor edx, edx
mov rcx, qword [rax]
mov dword [rcx + 0x60], edx
mov eax, dword [rbx + 0x58]
mov dword [rcx + 0x80], eax
mov dword [rcx + 0x64], edx
lea rdx, [rcx + 0x68]
mov rax, rdx
mov ecx, 4
nop word [rax + rax]
mov dword [rax], 0xffffffff
lea rax, [rax + 4]
dec rcx
jne 0x180086ed0
mov eax, dword [rbx + 0x58]
test eax, eax
je 0x180086ee8
mov dword [rdx], eax
cmp dword [rbx + 0x5c], 0
je 0x180086f0a
mov r9, qword [rbx + 0x80]
mov r8d, dword [rbx + 0x58]
lea rdx, str.recovered__d_frames_from_WAL_file__s
mov ecx, 0x11b
call sym.sqlite3.dll_sqlite3_log
mov r13, qword [rsp + 0xc8]
mov r12, qword [rsp + 0xc0]
mov r15, qword [rsp + 0x80]
cmp byte [rbx + 0x3f], 0
jne 0x180086f40
mov rcx, qword [rbx + 8]
mov r8d, dword [rsp + 0x38]
mov r9d, 9
mov rax, qword [rcx]
mov edx, r14d
call qword [rax + 0x70]
mov eax, ebp
mov rbp, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.180092ad0
add rsp, 0x88
pop r14
pop rdi
pop rsi
pop rbx
ret