Function at 0x1400106b4
Capabilities:
Get common file path
Get file attributes
Link many functions at runtime
Set current directory

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x480
mov rbx, rcx
mov edi, 0x117
lea rcx, [rsp + 0x21]
xor edx, edx
mov r8, rdi
mov byte [rsp + 0x20], 0
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x490]
call fcn.140005e18
cmp byte [rsp + 0x20], 0
je 0x140010882
lea rcx, [rsp + 0x251]
mov r8, rdi
xor edx, edx
mov byte [rsp + 0x250], 0
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x250]
call fcn.140010a1c
lea rdx, str._sqlite3.dll
lea rcx, [rsp + 0x20]
call sub.msvcrt.dll_strcat
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or edi, 0xffffffff
cmp eax, edi
jne 0x14001076c
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0x20]
call fcn.140010a1c
lea rdx, [0x1400126a0]
lea rcx, [rsp + 0x20]
call sub.msvcrt.dll_strcat
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, edi
jne 0x14001079e
lea rdx, [rsp + 0x250]
lea rcx, [rsp + 0x20]
call fcn.140010a1c
lea rdx, str._nss3.dll
lea rcx, [rsp + 0x20]
call sub.msvcrt.dll_strcat
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
mov qword [rbx + 0x48], rax
jne 0x1400108c1
call fcn.1400066d0
cmp dword [rax + 4], 5
jbe 0x1400107d7
xor edx, edx
lea rcx, [rsp + 0x20]
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x1400108bd
mov edi, 0x104
lea rcx, [rsp + 0x371]
xor edx, edx
mov r8, rdi
mov byte [rsp + 0x370], 0
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x141]
mov r8, rdi
xor edx, edx
mov byte [rsp + 0x140], 0
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x370]
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x140]
call fcn.140010a1c
lea rcx, [rsp + 0x140]
mov edx, 0x5c
call sub.msvcrt.dll_strrchr
test rax, rax
jne 0x140010852
mov byte [rsp + 0x140], al
jmp 0x140010855
mov byte [rax], 0
lea rcx, [rsp + 0x140]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea rcx, [rsp + 0x370]
mov qword [rbx + 0x48], rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x1400108c1
lea rcx, str.sqlite3.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov qword [rbx + 0x48], rax
jne 0x1400108a9
lea rcx, str.mozsqlite3.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rbx + 0x48], rax
cmp qword [rbx + 0x48], 0
jne 0x1400108c1
lea rcx, str.nss3.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rbx + 0x48], rax
mov rcx, qword [rbx + 0x48]
test rcx, rcx
je 0x14001098d
lea rdx, str.sqlite3_open
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_prepare
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_step
mov qword [rbx + 8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_column_text
mov qword [rbx + 0x10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_column_int
mov qword [rbx + 0x18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_column_int64
mov qword [rbx + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_finalize
mov qword [rbx + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_close
mov qword [rbx + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rbx + 0x48]
lea rdx, str.sqlite3_exec
mov qword [rbx + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbx + 0x40], rax
mov eax, 1
jmp 0x14001098f
xor eax, eax
mov rbx, qword [rsp + 0x498]
add rsp, 0x480
pop rdi
ret