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

Disassembly:
push rbx
sub rsp, 0x70
mov rax, qword [0x1400e6010]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov rbx, rcx
mov rcx, qword [rcx]
call fcn.140027900
test eax, eax
jne 0x140030862
mov rax, qword [rbx]
lea r8, [rsp + 0x38]
xor r9d, r9d
mov rcx, rax
lea edx, [r9 + 1]
call qword [rax + pe_nt_image_headers64]
test eax, eax
jne 0x140030862
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x98], rdi
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r14
mov r14, qword [rcx + 0x10]
cmp dword [r14 + 4], 1
je 0x140030577
mov rax, qword [rcx + 8]
mov qword [r14 + 0x50], rax
mov qword [r14 + 0x70], rcx
mov qword [r14 + 0x48], rbx
mov dword [r14 + 4], 1
mov byte [r14 + 9], 0x64
mov rdi, qword [r14 + 0x50]
mov r8, qword [rbx]
mov ecx, dword [rdi + 0x1c]
mov edx, dword [r8 + 0x1c]
bswap ecx
mov dword [rsp + 0x34], edx
test ecx, ecx
je 0x140030597
mov eax, dword [rdi + 0x18]
cmp eax, dword [rdi + 0x5c]
je 0x140030599
mov ecx, edx
mov rax, qword [rbx + 8]
mov r13d, 0
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x68], r12
test dword [rax + 0x30], 0x2000000
mov qword [rsp + 0x50], r15
cmove r13d, ecx
test r13d, r13d
jle 0x1400307c3
mov rax, qword [rdi]
mov ebp, 0x1a
cmp rax, qword [str.SQLite_format_3]
jne 0x140030763
mov rax, qword [rdi + 8]
cmp rax, qword [0x1400cf410]
jne 0x140030763
cmp byte [rdi + 0x12], 2
jbe 0x140030602
or word [rbx + 0x26], 1
cmp byte [rdi + 0x13], 2
ja 0x140030763
jne 0x140030667
test byte [rbx + 0x26], 0x20
jne 0x140030667
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x30], 0
mov rcx, r8
call fcn.140029aa0
mov ebp, eax
test eax, eax
jne 0x140030763
cmp dword [rsp + 0x30], eax
jne 0x140030663
mov rcx, qword [r14 + 0x70]
mov rbx, qword [rcx + 0x28]
call fcn.140021de0
mov rax, qword [rbx + 0x118]
cmp dword [rax + 0x18], ebp
jne 0x140030834
mov rcx, rbx
call fcn.140024b90
jmp 0x140030834
mov edx, dword [rsp + 0x34]
cmp word [rdi + 0x15], 0x2040
mov ebp, 0x1a
jne 0x140030763
cmp byte [rdi + 0x17], 0x20
jne 0x140030763
movzx eax, byte [rdi + 0x10]
movzx esi, byte [rdi + 0x11]
shl esi, 8
or esi, eax
shl esi, 8
lea eax, [rsi - 1]
test esi, eax
jne 0x140030763
cmp esi, 0x10000
ja 0x140030763
cmp esi, 0x100
jbe 0x140030763
movzx ebp, byte [rdi + 0x14]
mov r15d, esi
sub r15d, ebp
cmp esi, dword [rbx + 0x30]
je 0x140030728
mov rcx, qword [r14 + 0x70]
mov rdi, qword [rcx + 0x28]
call fcn.140021de0
mov rax, qword [rdi + 0x118]
cmp dword [rax + 0x18], 0
jne 0x1400306e6
mov rcx, rdi
call fcn.140024b90
mov rcx, qword [rbx + 0x80]
mov dword [rbx + 0x34], r15d
mov dword [rbx + 0x30], esi
test rcx, rcx
je 0x140030714
add rcx, 0xfffffffffffffffc
mov qword [rbx + 0x80], rcx
call fcn.140022420
mov qword [rbx + 0x80], 0
mov rcx, qword [rbx]
lea rdx, [rbx + 0x30]
mov r8d, ebp
call fcn.140026130
jmp 0x140030836
mov rax, qword [rbx + 8]
test byte [rax + 0x30], 1
jne 0x140030794
cmp r13d, edx
jle 0x140030794
lea rax, [0x1400d7054]
mov ebp, 0xb
mov ecx, ebp
mov qword [rsp + 0x20], rax
mov r9d, 0xfe7b
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call fcn.140018f60
mov rcx, qword [r14 + 0x70]
mov rdi, qword [rcx + 0x28]
call fcn.140021de0
mov rax, qword [rdi + 0x118]
cmp dword [rax + 0x18], 0
jne 0x140030785
mov rcx, rdi
call fcn.140024b90
mov qword [rbx + 0x18], 0
mov eax, ebp
jmp 0x140030836
mov ebp, 0x1a
cmp r15d, 0x1e0
jb 0x140030763
mov dword [rbx + 0x30], esi
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 r10d, dword [rbx + 0x34]
mov eax, 0x80808081
mov ecx, r10d
shl ecx, 6
sub ecx, 0x300
mul ecx
mov ecx, r10d
mov eax, 0x80808081
mov r9d, edx
shl ecx, 5
sub ecx, 0x180
shr r9d, 7
mul ecx
sub r9w, 0x17
sub r10w, 0x23
shr edx, 7
mov eax, 0x7f
sub dx, 0x17
movzx r8d, r9b
cmp r9w, ax
mov word [rbx + 0x28], r9w
mov word [rbx + 0x2a], dx
cmova r8d, eax
mov word [rbx + 0x2c], r10w
mov word [rbx + 0x2e], dx
mov byte [rbx + 0x25], r8b
mov qword [rbx + 0x18], r14
mov dword [rbx + 0x3c], r13d
xor eax, eax
mov rbp, qword [rsp + 0x88]
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 r14, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400c69d0
add rsp, 0x70
pop rbx
ret