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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x30
mov rdi, qword [rcx]
mov r13d, r9d
mov rsi, r8
mov r15, rdx
mov rbx, rcx
test r8, r8
je 0x1800479c9
cmp dword [r8 + 8], 0
jbe 0x1800479c9
cmp byte [rdi + 0xa1], 0
je 0x18004799e
lea rdx, str.corrupt_database
call fcn.1800096d0
inc dword [rbx + 0x4c]
jmp 0x180047fd0
mov rcx, rdi
mov r14, rsi
call fcn.180047770
mov ebp, eax
test eax, eax
jns 0x1800479d3
mov r8, r15
lea rdx, str.unknown_database__T
mov rcx, rbx
call fcn.1800096d0
inc dword [rbx + 0x4c]
jmp 0x180047fd0
movzx ebp, byte [rdi + 0xa0]
mov r14, r15
test ebp, ebp
js 0x180047fd0
mov r15d, 1
test r13d, r13d
je 0x180047a08
cmp dword [rsi + 8], 0
jbe 0x180047a05
cmp ebp, r15d
je 0x180047a05
lea rdx, str.temporary_table_name_must_be_unqualified
mov rcx, rbx
call fcn.1800096d0
jmp 0x180047fd0
mov ebp, r15d
movups xmm0, xmmword [r14]
mov qword [rsp + 0x60], r12
movups xmmword [rbx + 0x238], xmm0
mov r12, qword [r14]
test r12, r12
jne 0x180047a24
xor esi, esi
jmp 0x180047a55
mov r15d, dword [r14 + 8]
mov rcx, rdi
lea rdx, [r15 + 1]
call fcn.180006a30
mov rsi, rax
test rax, rax
je 0x180047a4f
mov r8d, r15d
mov rdx, r12
mov rcx, rax
call fcn.1800d3040
mov byte [rsi + r15], 0
mov r15d, 1
mov rcx, rsi
call fcn.1800097d0
test rsi, rsi
je 0x180047fcb
mov rdx, rsi
mov rcx, rbx
call fcn.180047870
test eax, eax
jne 0x180047f7c
cmp byte [rdi + 0xa0], 1
lea r8, str.sqlite_temp_master
mov rax, qword [rdi + 0x20]
mov r12d, r15d
cmovne r12d, r13d
mov r15d, ebp
shl r15, 5
mov rcx, rbx
cmp r12d, 1
mov r13, qword [r15 + rax]
lea rax, str.sqlite_master
cmovne r8, rax
mov qword [rsp + 0x20], r13
xor r9d, r9d
lea edx, [r9 + 0x12]
call fcn.180045e70
test eax, eax
jne 0x180047f7c
cmp dword [rsp + 0x80], 0
mov eax, 4
je 0x180047ae9
test r12d, r12d
mov edx, 6
mov eax, 8
cmove edx, eax
jmp 0x180047af4
test r12d, r12d
mov edx, 2
cmovne edx, eax
mov r12d, dword [rsp + 0x88]
test r12d, r12d
jne 0x180047b1c
xor r9d, r9d
mov qword [rsp + 0x20], r13
mov r8, rsi
mov rcx, rbx
call fcn.180045e70
test eax, eax
jne 0x180047f7c
cmp byte [rbx + 0x1f3], 0
jne 0x180047c0b
mov rcx, qword [rbx]
mov rax, qword [rdi + 0x20]
cmp byte [rcx + 0xa1], 0
mov r12, qword [r15 + rax]
jne 0x180047b52
lea rdx, [rbx + 8]
call fcn.180063320
test eax, eax
je 0x180047b52
mov dword [rbx + 0x18], eax
jmp 0x180047f79
mov r8, r12
mov rdx, rsi
mov rcx, rdi
call fcn.1800466d0
test rax, rax
je 0x180047bd9
cmp dword [rsp + 0x90], 0
jne 0x180047b86
mov r8, r14
lea rdx, str.table__T_already_exists
mov rcx, rbx
call fcn.1800096d0
jmp 0x180047f7c
mov rax, qword [rbx + 0x1c0]
test rax, rax
cmovne rbx, rax
mov eax, dword [rbx + 0x16c]
bt eax, ebp
jb 0x180047f7c
bts eax, ebp
mov dword [rbx + 0x16c], eax
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov rax, qword [rcx + r15 + 0x18]
mov ecx, dword [rax]
mov eax, ebp
mov dword [rbx + rax*4 + 0x170], ecx
cmp ebp, 1
jne 0x180047f7c
mov rcx, rbx
call fcn.18004d680
jmp 0x180047f7c
mov r8, r12
mov rdx, rsi
mov rcx, rdi
call fcn.1800468d0
test rax, rax
je 0x180047c03
mov r8, rsi
lea rdx, str.there_is_already_an_index_named__s
mov rcx, rbx
call fcn.1800096d0
jmp 0x180047f7c
mov r12d, dword [rsp + 0x88]
mov edx, 0x80
mov rcx, rdi
call fcn.180006a30
mov r14, rax
test rax, rax
je 0x180047f6e
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
movups xmmword [rax + 0x60], xmm0
movups xmmword [rax + 0x70], xmm0
mov qword [rax], rsi
mov eax, 0xffffffff
mov word [r14 + 0x40], ax
mov rax, qword [rdi + 0x20]
mov rdx, qword [r15 + rax + 0x18]
mov eax, 1
mov word [r14 + 0x44], ax
mov eax, 0xc8
mov word [r14 + 0x38], ax
mov qword [r14 + 0x70], rdx
cmp byte [rbx + 0x1e], 0
mov qword [rbx + 0x220], r14
jne 0x180047c9c
lea rdx, str.sqlite_sequence
mov rcx, rsi
call fcn.1800f7f50
test eax, eax
jne 0x180047c9c
mov rax, qword [r14 + 0x70]
mov qword [rax + 0x68], r14
cmp byte [rdi + 0xa1], 0
jne 0x180047fcb
mov rsi, qword [rbx + 0x10]
test rsi, rsi
jne 0x180047d01
mov rcx, rbx
call fcn.180026ac0
mov qword [rbx + 0x10], rax
mov rsi, rax
test rax, rax
je 0x180047ce1
xor r9d, r9d
mov dword [rsp + 0x20], 0
xor r8d, r8d
mov edx, 0x99
mov rcx, rax
call fcn.180026c20
cmp qword [rbx + 0x1c0], 0
jne 0x180047cf8
mov rax, qword [rbx]
test byte [rax + 0x4c], 8
jne 0x180047cf8
mov byte [rbx + 0x23], 1
test rsi, rsi
je 0x180047fcb
mov rax, qword [rbx + 0x1c0]
mov r14, rbx
test rax, rax
cmovne r14, rax
mov eax, dword [r14 + 0x16c]
bt eax, ebp
jb 0x180047d4d
bts eax, ebp
mov dword [r14 + 0x16c], eax
mov rax, qword [r14]
mov rcx, qword [rax + 0x20]
mov rax, qword [rcx + r15 + 0x18]
mov ecx, dword [rax]
mov eax, ebp
mov dword [r14 + rax*4 + 0x170], ecx
cmp ebp, 1
jne 0x180047d4d
mov rcx, r14
call fcn.18004d680
mov eax, dword [r14 + 0x168]
bts eax, ebp
mov dword [r14 + 0x168], eax
test r12d, r12d
je 0x180047d7e
xor r9d, r9d
mov dword [rsp + 0x20], 0
xor r8d, r8d
mov edx, 0x90
mov rcx, rsi
call fcn.180026c20
mov r12d, dword [rbx + 0x54]
mov r8d, ebp
inc r12d
mov dword [rsp + 0x20], 2
mov edx, 0x33
mov dword [rbx + 0x1a0], r12d
mov rcx, rsi
lea r13d, [r12 + 1]
lea r14d, [r13 + 1]
mov dword [rbx + 0x1a4], r13d
mov r9d, r14d
mov dword [rbx + 0x54], r14d
call fcn.180026c20
mov eax, dword [rsi + 0x94]
bts eax, ebp
mov dword [rsi + 0x94], eax
cmp ebp, 1
je 0x180047df0
mov rax, qword [rsi]
mov rcx, qword [rax + 0x20]
mov rax, qword [rcx + r15 + 8]
cmp byte [rax + 0x11], 0
je 0x180047df0
mov eax, dword [rsi + 0x98]
bts eax, ebp
mov dword [rsi + 0x98], eax
xor r9d, r9d
mov dword [rsp + 0x20], 0
mov r8d, r14d
mov rcx, rsi
lea edx, [r9 + 0x2d]
call fcn.180026c20
test dword [rdi + 0x2c], 0x8000
mov ecx, 1
mov r8d, 4
mov r15d, eax
cmovne r8d, ecx
mov dword [rsp + 0x20], 0
mov r9d, r14d
lea edx, [rcx + 0x18]
mov rcx, rsi
call fcn.180026c20
mov r9d, 2
mov dword [rsp + 0x20], r14d
mov r8d, ebp
mov rcx, rsi
lea edx, [r9 + 0x32]
call fcn.180026c20
mov rax, qword [rdi + 0x20]
mov r9d, r14d
xor edi, edi
mov dword [rsp + 0x20], edi
mov rcx, qword [rax + 0x18]
lea edx, [rdi + 0x19]
movzx r8d, byte [rcx + 0x71]
mov rcx, rsi
call fcn.180026c20
lea r9d, [rdi + 5]
mov dword [rsp + 0x20], r14d
mov r8d, ebp
lea edx, [rdi + 0x34]
mov rcx, rsi
call fcn.180026c20
mov edx, dword [rsi + 0x3c]
cmp edx, r15d
jbe 0x180047ea2
mov rax, qword [rsi + 8]
lea rcx, [r15 + r15*2]
mov dword [rax + rcx*8 + 8], edx
mov edx, dword [rsi + 0x3c]
lea ecx, [rdx - 1]
mov rax, qword [rsi + 0x30]
mov dword [rax + 0x64], ecx
cmp dword [rsp + 0x80], edi
jne 0x180047edd
cmp dword [rsp + 0x88], edi
jne 0x180047edd
mov r9d, r13d
mov dword [rsp + 0x20], edi
mov r8d, ebp
mov edx, 0x79
mov rcx, rsi
call fcn.180026c20
mov dword [rbx + 0x1d0], eax
jmp 0x180047ef3
xor r8d, r8d
mov dword [rsp + 0x20], edi
mov r9d, r13d
mov rcx, rsi
lea edx, [r8 + 0x19]
call fcn.180026c20
mov edx, ebp
mov rcx, rbx
call fcn.180047580
xor r8d, r8d
mov dword [rsp + 0x20], edi
mov r9d, r12d
mov rcx, rsi
lea edx, [r8 + 0x4a]
call fcn.180026c20
xor r8d, r8d
mov dword [rsp + 0x20], edi
mov r9d, r14d
mov rcx, rsi
lea edx, [r8 + 0x1c]
call fcn.180026c20
xor r8d, r8d
mov dword [rsp + 0x20], r12d
mov r9d, r14d
mov rcx, rsi
lea edx, [r8 + 0x4b]
call fcn.180026c20
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x180047f56
movsxd rax, dword [rsi + 0x3c]
lea rdx, [rax + rax*2]
mov byte [rcx + rdx*8 - 0x15], 8
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor r8d, r8d
mov rcx, rsi
lea edx, [r9 + 0x3d]
call fcn.180026c20
jmp 0x180047fcb
mov byte [rdi + 0x50], 1
mov dword [rbx + 0x18], 7
inc dword [rbx + 0x4c]
test rdi, rdi
je 0x180047fc3
cmp qword [rdi + 0x320], 0
je 0x180047f98
mov rdx, rsi
mov rcx, rdi
call fcn.1800066e0
jmp 0x180047fcb
cmp rsi, qword [rdi + 0x168]
jb 0x180047fc3
cmp rsi, qword [rdi + 0x170]
jae 0x180047fc3
mov rax, qword [rdi + 0x160]
mov qword [rsi], rax
dec dword [rdi + 0x14c]
mov qword [rdi + 0x160], rsi
jmp 0x180047fcb
mov rcx, rsi
call fcn.180006630
mov r12, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret