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

Disassembly:
mov byte [rsp + 0x20], r9b
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rbp, qword [rcx]
xor r14d, r14d
mov r12, qword [rsp + 0xf0]
mov r13, r8
mov rsi, rcx
test r8, r8
jne 0x140046f4c
test r12, r12
je 0x14004755d
mov rdi, qword [rcx + 0x148]
test rdi, rdi
je 0x14004755d
test r12, r12
jne 0x140046f7d
mov rdx, qword [rdi]
mov rcx, rbp
call fcn.140046e9c
mov r9b, byte [rsp + 0xe8]
test eax, eax
je 0x140046f7d
bts dword [rdi + 0x40], 0xc
cmp byte [rbp + 0xb5], r14b
je 0x140046fb0
test r12, r12
je 0x140046f9f
lea rdx, [0x1400df5d8]
mov rcx, rsi
call fcn.14000bee8
jmp 0x14004755d
mov eax, dword [rbp + 0xb0]
mov dword [rdi + 0x38], eax
cmp eax, 1
jne 0x140046fb0
or dword [rdi + 0x40], eax
test r9b, r9b
jns 0x140046ff0
mov eax, dword [rdi + 0x40]
test al, 8
je 0x140046fc5
lea rdx, str.AUTOINCREMENT_not_allowed_on_WITHOUT_ROWID_tables
jmp 0x140046f92
mov rcx, rsi
test al, 4
jne 0x140046fe0
mov r8, qword [rdi]
lea rdx, str.PRIMARY_KEY_missing_on_table__s
call fcn.14000bee8
jmp 0x14004755d
or eax, 0x280
mov rdx, rdi
mov dword [rdi + 0x40], eax
call fcn.1400469b4
mov rcx, qword [rdi + 0x70]
mov r15d, 0xffff8000
test rcx, rcx
je 0x140047018
mov rax, qword [rbp + 0x20]
mov r15d, r14d
add rax, 0x18
jmp 0x140047013
inc r15d
lea rax, [rax + 0x20]
cmp qword [rax], rcx
jne 0x14004700c
mov rax, qword [rdi + 0x30]
test rax, rax
je 0x140047053
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, rsi
lea r8d, [r9 + 4]
call fcn.140038b30
cmp dword [rsi + 0x30], r14d
je 0x140047053
mov rdx, qword [rdi + 0x30]
test rdx, rdx
je 0x14004704f
mov rcx, rbp
call fcn.14003a9ac
mov qword [rdi + 0x30], r14
test byte [rdi + 0x40], 0x60
je 0x14004711d
mov ecx, r14d
mov r13d, r14d
mov dword [rsp + 0xd0], ecx
cmp r14w, word [rdi + 0x46]
jge 0x140047104
mov rbx, r14
xor r12d, r12d
mov r14, qword [rdi + 8]
test byte [r14 + rbx + 0x1c], 0x60
je 0x140047110
mov r14, qword [r14 + rbx + 8]
mov r8d, 8
mov r9, r14
mov qword [rsp + 0x20], r12
mov rdx, rdi
mov rcx, rsi
call fcn.140038b30
test eax, eax
je 0x1400470d8
test r14, r14
je 0x1400470bd
mov rdx, r14
mov rcx, rbp
call fcn.140039c5c
xor r9d, r9d
xor r8d, r8d
mov rcx, rbp
lea edx, [r9 + 0x77]
call fcn.1400396ac
mov rcx, qword [rdi + 8]
mov qword [rcx + rbx + 8], rax
mov ecx, dword [rsp + 0xd0]
movsx eax, word [rdi + 0x46]
inc ecx
add rbx, 0x20
mov dword [rsp + 0xd0], ecx
cmp ecx, eax
jl 0x14004707b
mov r12, qword [rsp + 0xf0]
xor r14d, r14d
test r13d, r13d
jne 0x140047115
lea rdx, str.must_have_at_least_one_non_generated_column
jmp 0x140046f92
inc r13d
jmp 0x1400470df
mov r13, qword [rsp + 0xe0]
movsx ecx, word [rdi + 0x46]
mov edx, r14d
mov r8, qword [rdi + 8]
test ecx, ecx
jle 0x140047140
add r8, 0x1a
movzx eax, byte [r8]
dec ecx
add edx, eax
lea r8, [r8 + 0x20]
test ecx, ecx
jg 0x140047130
cmp word [rdi + 0x44], r14w
lea ecx, [rdx + 1]
cmovge ecx, edx
shl ecx, 2
call fcn.14000d0b4
mov rbx, qword [rdi + 0x10]
mov word [rdi + 0x4c], ax
jmp 0x140047169
mov rcx, rbx
call fcn.14004685c
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x14004715d
mov al, byte [rbp + 0xb5]
test al, al
jne 0x140047503
mov rcx, rsi
call fcn.14005cba8
mov r14, rax
test rax, rax
je 0x14004755d
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor r8d, r8d
lea edx, [rbx + 0x74]
mov rcx, rax
call fcn.1400266e8
mov rcx, qword [rdi + 0x18]
lea rax, str.VIEW
test rcx, rcx
lea r8, str.TABLE
lea rdx, str.view
cmovne r8, rax
lea rax, str.table
cmovne rax, rdx
mov qword [rsp + 0x50], rax
test r12, r12
je 0x140047405
mov eax, dword [rsi + 0x38]
lea edx, [rbx + 0x61]
inc eax
mov dword [rsp + 0x20], r15d
mov dword [rsp + 0xe0], eax
lea r8d, [rbx + 1]
inc eax
mov rcx, rsi
mov dword [rsp + 0xd0], eax
inc eax
mov dword [rsi + 0x38], eax
mov rax, qword [rsi + 0xa0]
test rax, rax
cmovne rcx, rax
mov byte [rcx + 0x21], 1
mov rcx, r14
mov r9d, dword [rsi + 0x7c]
call fcn.1400266e8
movsxd rax, dword [r14 + 0x90]
test eax, eax
jle 0x140047243
lea rcx, [rax + rax*2]
mov rax, qword [r14 + 0x88]
lea edx, [rbx + 0x10]
mov word [rax + rcx*8 - 0x16], dx
mov r8d, dword [rsp + 0xe0]
xor r9d, r9d
mov dword [rsi + 0x34], 2
mov rcx, r14
mov ebx, dword [r14 + 0x90]
inc ebx
lea edx, [r9 + 0xd]
mov dword [rsp + 0x20], ebx
call fcn.1400266e8
xor ecx, ecx
cmp dword [rsi + 0x30], ecx
jne 0x14004755d
mov r8b, 0x41
mov rdx, r12
mov rcx, rsi
call fcn.14005caac
xor edx, edx
test rax, rax
je 0x14004755d
movzx ecx, word [rax + 0x46]
mov word [rdi + 0x48], cx
mov word [rdi + 0x46], cx
mov rcx, qword [rax + 8]
mov qword [rdi + 8], rcx
mov word [rax + 0x46], dx
mov qword [rax + 8], rdx
cmp qword [rbp + 0x2d8], rdx
jne 0x1400472bd
add dword [rax + 0x3c], 0xffffffff
jne 0x1400472ca
mov rdx, rax
mov rcx, rbp
call fcn.140044f74
xor edx, edx
mov eax, dword [rsp + 0xe0]
lea r8, [rsp + 0x58]
and qword [rsp + 0x60], 0
mov rcx, rsi
mov qword [rsp + 0x70], rdx
mov dword [rsp + 0x68], edx
mov rdx, r12
mov byte [rsp + 0x58], 0xd
mov dword [rsp + 0x5c], eax
call fcn.140060cbc
xor r12d, r12d
cmp dword [rsi + 0x30], r12d
jne 0x14004755d
mov edx, dword [rsp + 0xe0]
mov rcx, r14
call fcn.140026b80
lea edx, [rbx - 1]
mov rcx, r14
call fcn.140027210
mov ecx, dword [r14 + 0x90]
lea edx, [r12 + 0xe]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
mov dword [rax + 8], ecx
mov rcx, r14
mov r8d, dword [rsp + 0x5c]
call fcn.1400266e8
mov r9d, dword [rsp + 0x68]
mov edx, 0x5b
mov r8d, dword [rsp + 0x64]
mov rcx, r14
mov r12d, dword [rsp + 0xd0]
mov ebx, eax
mov dword [rsp + 0x20], r12d
call fcn.1400266e8
xor r8d, r8d
mov rdx, rdi
mov rcx, r14
call fcn.1400511fc
xor ecx, ecx
lea r9d, [r12 + 1]
mov dword [rsp + 0x20], ecx
lea edx, [rcx + 0x79]
lea r8d, [rcx + 1]
mov rcx, r14
call fcn.1400266e8
mov edx, 0x7a
lea eax, [r12 + 1]
mov r9d, r12d
mov dword [rsp + 0x20], eax
mov rcx, r14
lea r8d, [rdx - 0x79]
call fcn.1400266e8
xor r12d, r12d
mov r9d, ebx
xor r8d, r8d
mov dword [rsp + 0x20], r12d
mov rcx, r14
lea edx, [r12 + 0xb]
call fcn.1400266e8
mov edx, ebx
mov rcx, r14
call fcn.140027210
mov ecx, dword [r14 + 0x90]
lea edx, [r12 + 0x74]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
lea r8d, [r12 + 1]
mov dword [rax + 8], ecx
mov rcx, r14
call fcn.1400266e8
mov rdx, rdi
mov rcx, rbp
call fcn.140046550
jmp 0x14004744b
cmp byte [rsp + 0xe8], bl
lea rax, [rsi + 0x108]
mov rcx, r13
cmovne rcx, rax
mov rax, qword [rcx]
mov r9d, dword [rcx]
sub r9d, dword [rsi + 0xf8]
cmp byte [rax], 0x3b
je 0x140047430
add r9d, dword [rcx + 8]
mov rax, qword [rsi + 0xf8]
lea rdx, str.CREATE__s__.s
mov rcx, rbp
mov qword [rsp + 0x20], rax
call fcn.14000b284
mov rcx, qword [rdi]
lea rdx, str.UPDATE__Q.sqlite_master_SET_type_s__name_Q__tbl_name_Q__rootpage_d__sql_Q_WHERE_rowid_d
mov r8, qword [rbp + 0x20]
mov r12, rax
mov eax, dword [rsi + 0x78]
mov r9, qword [rsp + 0x50]
mov dword [rsp + 0x40], eax
mov eax, dword [rsi + 0x7c]
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rcx
mov rcx, rsi
movsxd rbx, r15d
shl rbx, 5
mov r8, qword [r8 + rbx]
call fcn.14004467c
test r12, r12
je 0x1400474a1
mov rdx, r12
mov rcx, rbp
call fcn.140009378
mov edx, r15d
mov rcx, rsi
call fcn.140046414
test byte [rdi + 0x40], 8
je 0x1400474d6
mov r8, qword [rbp + 0x20]
xor ecx, ecx
mov rax, qword [rbx + r8 + 0x18]
cmp qword [rax + 0x68], rcx
jne 0x1400474d6
mov r8, qword [rbx + r8]
lea rdx, str.CREATE_TABLE__Q.sqlite_sequence_name_seq_
mov rcx, rsi
call fcn.14004467c
mov r8, qword [rdi]
lea rdx, str.tbl_name_q_AND_type_trigger
mov rcx, rbp
call fcn.14000b284
mov r8, rax
mov edx, r15d
mov rcx, r14
call fcn.140026ac4
mov al, byte [rbp + 0xb5]
xor r14d, r14d
test al, al
je 0x14004755d
mov rcx, qword [rdi + 0x70]
mov r8, rdi
mov rdx, qword [rdi]
add rcx, 8
call fcn.14000d4dc
test rax, rax
je 0x140047525
mov rcx, rbp
call fcn.140009a00
jmp 0x14004755d
mov qword [rsi + 0x148], r14
or dword [rbp + 0x2c], 1
cmp qword [rdi + 0x18], r14
jne 0x14004755d
mov rax, qword [rsp + 0xd8]
mov rcx, qword [rsi + 0xf8]
cmp qword [rax], r14
cmovne r13, rax
mov edx, dword [r13]
sub edx, ecx
call fcn.14000bc34
add eax, 0xd
mov dword [rdi + 0x50], eax
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret