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

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rbx, rcx
mov rcx, qword [rcx]
call fcn.18005c240
test eax, eax
jne 0x1800646c6
mov rax, qword [rbx]
lea r8, [rsp + 0x38]
xor r9d, r9d
mov rcx, rax
lea edx, [r9 + 1]
call qword [rax + 0x108]
test eax, eax
jne 0x1800646c6
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x98], rdi
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r14
mov r14, qword [rax + 0x10]
cmp dword [r14 + 4], 1
je 0x180064381
mov rdi, qword [rax + 8]
mov qword [r14 + 0x50], rdi
mov qword [r14 + 0x70], rax
mov qword [r14 + 0x48], rbx
mov dword [r14 + 4], 1
mov byte [r14 + 9], 0x64
jmp 0x180064385
mov rdi, qword [r14 + 0x50]
mov rbp, qword [rbx]
mov edx, dword [rdi + 0x1c]
bswap edx
mov r8d, dword [rbp + 0x1c]
mov dword [rsp + 0x30], r8d
test edx, edx
je 0x1800643a2
mov eax, dword [rdi + 0x18]
cmp eax, dword [rdi + 0x5c]
je 0x1800643a5
mov edx, r8d
mov rax, qword [rbx + 8]
mov r13d, 0
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x50], r15
mov ecx, dword [rax + 0x30]
bt rcx, 0x19
cmovae r13d, edx
test r13d, r13d
je 0x180064629
mov rax, qword [rdi]
mov esi, 0x1a
cmp rax, qword [str.SQLite_format_3]
jne 0x180064494
mov rax, qword [rdi + 8]
cmp rax, qword [0x180153cf8]
jne 0x180064494
cmp byte [rdi + 0x12], 2
jbe 0x180064407
or word [rbx + 0x26], 1
movzx eax, byte [rdi + 0x13]
cmp al, 2
ja 0x180064494
jne 0x1800644ff
test byte [rbx + 0x26], 0x20
jne 0x1800644ff
xor r15d, r15d
xor esi, esi
cmp byte [rbp + 0x10], sil
jne 0x1800644c5
cmp qword [rbp + 0x120], rsi
jne 0x1800644c5
cmp byte [rbp + 0x11], sil
jne 0x18006448f
cmp byte [rbp + 8], sil
jne 0x18006445d
mov rax, qword [rbp + 0x48]
mov rcx, qword [rax]
cmp dword [rcx], 2
jl 0x18006448f
cmp qword [rcx + 0x68], rsi
je 0x18006448f
mov rsi, qword [rbp + 0x50]
mov rax, qword [rsi]
test rax, rax
je 0x180064472
mov rcx, rsi
call qword [rax + 8]
mov qword [rsi], r15
mov rcx, rbp
call fcn.18005e0f0
mov r8d, dword [rsp + 0x30]
mov esi, eax
test eax, eax
jne 0x1800644cb
mov byte [rbp + 9], 5
mov byte [rbp + 0x14], r15b
jmp 0x1800644cb
mov esi, 0xe
mov rcx, qword [r14 + 0x70]
mov rdi, qword [rcx + 0x28]
call fcn.180056f90
mov rdx, qword [rdi + 0x118]
cmp dword [rdx + 0x18], 0
jne 0x1800644b6
mov rcx, rdi
call fcn.180059bc0
mov qword [rbx + 0x18], 0
mov eax, esi
jmp 0x18006469a
mov r15d, 1
test esi, esi
jne 0x180064494
test r15d, r15d
jne 0x1800644ff
mov rcx, qword [r14 + 0x70]
mov rbx, qword [rcx + 0x28]
call fcn.180056f90
mov rax, qword [rbx + 0x118]
cmp dword [rax + 0x18], r15d
jne 0x180064698
mov rcx, rbx
call fcn.180059bc0
jmp 0x180064698
movzx eax, word [rdi + 0x15]
mov esi, 0x1a
cmp ax, word [0x18015b614]
jne 0x180064494
movzx eax, byte [rdi + 0x17]
cmp al, byte [0x18015b616]
jne 0x180064494
movzx eax, byte [rdi + 0x10]
movzx ebp, byte [rdi + 0x11]
shl ebp, 8
or ebp, eax
shl ebp, 8
lea eax, [rbp - 1]
test ebp, eax
jne 0x180064494
cmp ebp, 0x10000
ja 0x180064494
cmp ebp, 0x100
jbe 0x180064494
or word [rbx + 0x26], 2
mov r15d, ebp
movzx esi, byte [rdi + 0x14]
sub r15d, esi
cmp ebp, dword [rbx + 0x30]
je 0x1800645ad
mov rcx, qword [r14 + 0x70]
mov rdi, qword [rcx + 0x28]
call fcn.180056f90
mov rax, qword [rdi + 0x118]
cmp dword [rax + 0x18], 0
jne 0x18006458a
mov rcx, rdi
call fcn.180059bc0
mov rcx, rbx
mov dword [rbx + 0x34], r15d
mov dword [rbx + 0x30], ebp
call fcn.180063b80
mov rcx, qword [rbx]
lea rdx, [rbx + 0x30]
mov r8d, esi
call fcn.18005aef0
jmp 0x18006469a
mov rax, qword [rbx + 8]
mov ecx, dword [rax + 0x30]
and ecx, 0x10000001
cmp rcx, 1
je 0x1800645f6
cmp r13d, r8d
jbe 0x1800645f6
lea rax, [0x180160304]
mov esi, 0xb
mov ecx, esi
mov qword [rsp + 0x20], rax
mov r9d, 0x1033d
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.18004f880
jmp 0x180064494
mov esi, 0x1a
cmp r15d, 0x1e0
jb 0x180064494
mov dword [rbx + 0x30], ebp
mov dword [rbx + 0x34], r15d
mov eax, dword [rdi + 0x34]
bswap eax
test eax, eax
setne al
mov byte [rbx + 0x21], al
mov eax, dword [rdi + 0x40]
bswap eax
test eax, eax
setne al
mov byte [rbx + 0x22], al
mov r9d, dword [rbx + 0x34]
mov eax, 0x80808081
mov ecx, r9d
shl ecx, 6
sub ecx, 0x300
mul ecx
mov ecx, r9d
mov eax, 0x80808081
mov r8d, edx
shl ecx, 5
sub ecx, 0x180
shr r8d, 7
mul ecx
sub r8w, 0x17
sub r9w, 0x23
shr edx, 7
mov ecx, 0x7f
sub dx, 0x17
movzx eax, r8b
cmp r8w, cx
mov word [rbx + 0x28], r8w
mov word [rbx + 0x2a], dx
cmova eax, ecx
mov word [rbx + 0x2c], r9w
mov word [rbx + 0x2e], dx
mov byte [rbx + 0x25], al
mov qword [rbx + 0x18], r14
mov dword [rbx + 0x3c], r13d
xor eax, eax
mov rsi, qword [rsp + 0x90]
mov r12, qword [rsp + 0x68]
mov r15, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x98]
mov r13, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x88]
mov r14, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x70
pop rbx
ret