Function at 0x140051460
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rsi
push rdi
push r13
sub rsp, 0x78
mov r13, qword [rcx]
mov rdi, r8
mov rsi, rdx
mov qword [rsp + 0x50], r13
mov rbx, rcx
cmp byte [r13 + 0x63], 0
jne 0x140051bb4
mov r9, qword [rdx + 8]
mov qword [rsp + 0x70], r12
xor r12d, r12d
mov qword [rsp + 0x68], r14
test r9, r9
je 0x1400514c9
mov rdx, qword [r13 + 0x20]
mov ecx, r12d
cmp qword [rdx + 0x18], r9
lea rax, [rdx + 0x18]
je 0x1400514bc
inc ecx
lea rax, [rax + 0x20]
cmp qword [rax], r9
jne 0x1400514b1
movsxd rax, ecx
shl rax, 5
mov r9, qword [rax + rdx]
jmp 0x1400514cd
mov r9, qword [rdx + 0x10]
mov r8, qword [rsi + 0x18]
xor edx, edx
mov rcx, rbx
call fcn.1400565e0
mov r14, rax
test rax, rax
je 0x140051baa
mov rdx, rax
mov rcx, rbx
call fcn.14004d430
test eax, eax
jne 0x140051baa
cmp qword [r14 + 0x18], r12
lea r9, str.view
cmove r9, r12
cmp dword [r14 + 0x54], r12d
je 0x140051518
lea r9, str.virtual_table
jmp 0x14005151d
test r9, r9
je 0x140051540
mov rax, qword [r14]
lea r8, str.drop_column_from
lea rdx, str.cannot__s__s___s_
mov qword [rsp + 0x20], rax
mov rcx, rbx
call fcn.140007d30
jmp 0x140051baa
mov rdx, rdi
mov qword [rsp + 0x60], r15
mov rcx, r13
call fcn.1400575c0
mov qword [rsp + 0x48], rax
mov r15, rax
test rax, rax
je 0x140051ba5
mov rdx, rax
mov rcx, r14
call fcn.14007ce60
mov dword [rsp + 0x40], eax
test eax, eax
jns 0x14005158b
mov r8, r15
lea rdx, str.no_such_column:___s_
mov rcx, rbx
call fcn.140007d30
jmp 0x140051b45
movsxd rdi, eax
mov rax, qword [r14 + 8]
shl rdi, 5
movzx ecx, word [rax + rdi + 0x1c]
test cl, 9
je 0x1400515cc
test cl, 1
lea rax, str.PRIMARY_KEY
lea r8, str.UNIQUE
mov r9, r15
cmovne r8, rax
lea rdx, str.cannot_drop__s_column:___s_
mov rcx, rbx
call fcn.140007d30
jmp 0x140051b45
cmp word [r14 + 0x46], 1
jg 0x1400515eb
mov r8, r15
lea rdx, str.cannot_drop_column___s_:_no_other_columns_exist
mov rcx, rbx
call fcn.140007d30
jmp 0x140051b45
mov rcx, qword [r14 + 0x70]
mov qword [rsp + 0xb0], rbp
mov ebp, 0xffff8000
test rcx, rcx
je 0x14005161c
mov rax, qword [r13 + 0x20]
mov ebp, r12d
add rax, 0x18
cmp qword [rax], rcx
je 0x14005161c
inc ebp
lea rax, [rax + 0x20]
cmp qword [rax], rcx
jne 0x140051611
mov rax, qword [r13 + 0x20]
lea rdx, str.SELECT_1_FROM___w_.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d___Q___Q_NULL
mov qword [rsp + 0x30], 0
movsxd rcx, ebp
shl rcx, 5
cmp ebp, 1
sete r12b
mov rsi, qword [rcx + rax]
lea rax, [0x1402df794]
mov qword [rsp + 0x28], rax
mov r9, rsi
mov r8, rsi
mov dword [rsp + 0x20], r12d
mov rcx, rbx
mov byte [rbx + 0x1c], 1
call fcn.140055f20
cmp ebp, 1
je 0x14005168c
lea r9, [0x1402df794]
mov qword [rsp + 0x20], 0
mov r8, rsi
lea rdx, str.SELECT_1_FROM_temp.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1___Q___Q_NULL
mov rcx, rbx
call fcn.140055f20
mov rax, qword [r14]
lea rdx, str.UPDATE___w_.sqlite_master_SET_sql__sqlite_drop_column__d__sql___d__WHERE__typetable_AND_tbl_name_Q_COLLATE_nocase_
mov qword [rsp + 0x28], rax
mov r9d, ebp
mov eax, dword [rsp + 0x40]
mov r8, rsi
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.140055f20
mov r8d, 2
mov edx, ebp
mov rcx, rbx
call fcn.14004d510
lea rax, str.after_drop_column
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
lea rdx, str.SELECT_1_FROM___w_.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name___d___Q___Q_NULL
mov r9, rsi
mov dword [rsp + 0x20], r12d
mov r8, rsi
mov byte [rbx + 0x1c], 1
mov rcx, rbx
call fcn.140055f20
cmp ebp, 1
je 0x140051713
lea r9, str.after_drop_column
mov qword [rsp + 0x20], r15
mov r8, rsi
lea rdx, str.SELECT_1_FROM_temp.sqlite_master_WHERE_name_NOT_LIKE_sqliteX____ESCAPE_X_AND_sql_NOT_LIKE_create_virtual___AND_sqlite_rename_test__Q__sql__type__name__1___Q___Q_NULL
mov rcx, rbx
call fcn.140055f20
cmp dword [rbx + 0x30], 0
jne 0x140051b35
mov rax, qword [r14 + 8]
test byte [rax + rdi + 0x1c], 0x20
jne 0x140051b35
mov rdi, qword [rbx + 0x10]
xor eax, eax
mov dword [rsp + 0xa0], eax
mov esi, eax
test rdi, rdi
jne 0x140051761
cmp qword [rbx + 0xa0], rax
jne 0x140051756
mov rax, qword [rbx]
test byte [rax + 0x5c], 8
jne 0x140051756
mov byte [rbx + 0x23], 1
mov rcx, rbx
call fcn.14002a390
mov rdi, rax
mov r12d, dword [rbx + 0x34]
mov r9, r14
mov r8d, ebp
mov dword [rsp + 0x20], 0x62
mov edx, r12d
lea ecx, [r12 + 1]
mov dword [rbx + 0x34], ecx
mov rcx, rbx
call fcn.14006c380
movsxd rdx, dword [rdi + 0x90]
mov dword [rsp + 0xb8], edx
cmp dword [rdi + 0x94], edx
jg 0x1400517bd
xor r9d, r9d
mov dword [rsp + 0x20], esi
mov r8d, r12d
mov rcx, rdi
lea edx, [r9 + 0x25]
call fcn.14002a730
mov dword [rsp + 0xb8], eax
xor edx, edx
jmp 0x1400517e9
lea rcx, [rdx + rdx*2]
lea eax, [rdx + 1]
xor edx, edx
mov dword [rdi + 0x90], eax
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], Ordinal_41
mov dword [rax + rcx*8 + 4], r12d
mov qword [rax + rcx*8 + 8], rdx
mov qword [rax + rcx*8 + 0x10], rdx
inc dword [rbx + 0x38]
mov ebp, dword [rbx + 0x38]
movsx eax, word [r14 + 0x46]
add eax, ebp
mov dword [rsp + 0x44], ebp
mov dword [rbx + 0x38], eax
test byte [r14 + 0x40], 0x80
jne 0x14005185b
movsxd rcx, dword [rdi + 0x90]
cmp dword [rdi + 0x94], ecx
jg 0x14005182c
mov dword [rsp + 0x20], edx
mov r9d, ebp
mov edx, Ordinal_133
mov r8d, r12d
mov rcx, rdi
call fcn.14002a730
jmp 0x140051876
lea eax, [rcx + 1]
mov dword [rdi + 0x90], eax
lea rcx, [rcx + rcx*2]
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], Ordinal_133
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], ebp
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], rdx
jmp 0x140051876
mov rsi, qword [r14 + 0x10]
test rsi, rsi
je 0x140051876
mov eax, dword [rsi + 0x64]
and al, 3
cmp al, 2
je 0x140051876
mov rsi, qword [rsi + 0x28]
test rsi, rsi
jne 0x140051864
movzx ecx, word [r14 + 0x46]
xor r11d, r11d
mov ebx, r11d
cmp r11w, cx
jge 0x14005194d
mov r15d, dword [rsp + 0x40]
lea r9d, [r11 - 1]
mov r13d, ebx
cmp ebx, r15d
je 0x14005192c
mov rax, qword [r14 + 8]
movsxd rcx, ebx
shl rcx, 5
test byte [rcx + rax + 0x1c], 0x20
jne 0x14005192c
test rsi, rsi
je 0x140051904
movzx edx, word [rsi + 0x60]
mov ecx, r11d
test edx, edx
je 0x1400518df
mov r8, qword [rsi + 8]
nop word [rax + rax]
mov eax, ecx
cmp bx, word [r8 + rax*2]
je 0x1400518e3
inc ecx
cmp ecx, edx
jl 0x1400518d0
movzx ecx, r9w
movsx r10d, cx
movzx edx, r15w
mov rcx, rsi
call fcn.140057b00
movsx ecx, ax
mov eax, r11d
cmp r10d, ecx
setg al
sub r10d, eax
jmp 0x140051907
mov r10d, r13d
lea eax, [rbp + 1]
mov r9d, ebx
add eax, r10d
mov r8d, r12d
mov rdx, r14
mov dword [rsp + 0x20], eax
mov rcx, rdi
call fcn.140048bf0
inc r13d
xor r11d, r11d
lea r9d, [r11 - 1]
movsx ecx, word [r14 + 0x46]
inc ebx
cmp ebx, ecx
jl 0x140051897
mov r15, qword [rsp + 0x48]
mov dword [rsp + 0xa0], r13d
mov r13, qword [rsp + 0x50]
movsx ebx, cx
movsxd rcx, dword [rdi + 0x90]
add ebx, ebp
inc ebp
cmp dword [rdi + 0x94], ecx
jg 0x140051984
mov r9d, dword [rsp + 0xa0]
mov r8d, ebp
mov edx, 0x5c
mov dword [rsp + 0x20], ebx
mov rcx, rdi
call fcn.14002a730
xor r11d, r11d
jmp 0x1400519b7
mov edx, dword [rsp + 0xa0]
lea eax, [rcx + 1]
mov dword [rdi + 0x90], eax
lea rcx, [rcx + rcx*2]
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], 0x5c
mov dword [rax + rcx*8 + 4], ebp
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], ebx
mov qword [rax + rcx*8 + 0x10], r11
test rsi, rsi
je 0x140051a39
movsxd rdx, dword [rdi + 0x90]
movzx esi, word [rsi + 0x5e]
cmp dword [rdi + 0x94], edx
jg 0x1400519ea
mov r9d, ebx
mov dword [rsp + 0x20], ebp
mov r8d, r12d
mov edx, reloc.WLDAP32.dll_Ordinal_133
mov rcx, rdi
call fcn.14002a730
mov edx, eax
jmp 0x140051a17
lea rcx, [rdx + rdx*2]
lea eax, [rdx + 1]
mov dword [rdi + 0x90], eax
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], reloc.WLDAP32.dll_Ordinal_133
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], ebx
mov dword [rax + rcx*8 + 0xc], ebp
mov qword [rax + rcx*8 + 0x10], r11
mov rax, qword [rdi]
cmp byte [rax + 0x63], 0
jne 0x140051a92
movsxd rax, edx
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 0x88]
mov byte [rax + rcx*8 + 1], 0xfd
mov dword [rax + rcx*8 + 0x10], esi
jmp 0x140051a92
movsxd rcx, dword [rdi + 0x90]
mov edx, dword [rsp + 0x44]
cmp dword [rdi + 0x94], ecx
jg 0x140051a65
mov dword [rsp + 0x20], edx
mov r9d, ebx
mov edx, Ordinal_127
mov r8d, r12d
mov rcx, rdi
call fcn.14002a730
jmp 0x140051a92
lea eax, [rcx + 1]
mov dword [rdi + 0x90], eax
lea rcx, [rcx + rcx*2]
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], Ordinal_127
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], ebx
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], r11
mov r8d, dword [rsp + 0xb8]
movsxd rcx, dword [rdi + 0x90]
lea edx, [r8 + 1]
cmp dword [rdi + 0x94], ecx
jg 0x140051ace
xor eax, eax
mov r9d, edx
mov r8d, r12d
mov dword [rsp + 0x20], eax
mov rcx, rdi
lea edx, [rax + 5]
call fcn.14002a730
mov r8d, dword [rsp + 0xb8]
jmp 0x140051aff
lea eax, [rcx + 1]
xor r9d, r9d
mov dword [rdi + 0x90], eax
lea rcx, [rcx + rcx*2]
mov rax, qword [rdi + 0x88]
mov dword [rax + rcx*8], 5
mov dword [rax + rcx*8 + 4], r12d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r9d
mov qword [rax + rcx*8 + 0x10], r9
mov rax, qword [rdi]
mov edx, dword [rdi + 0x90]
cmp byte [rax + 0x63], 0
je 0x140051b17
lea rax, [0x140321520]
jmp 0x140051b32
lea eax, [rdx - 1]
test r8d, r8d
cmovns eax, r8d
cdqe
lea rcx, [rax + rax*2]
mov rax, qword [rdi + 0x88]
lea rax, [rax + rcx*8]
mov dword [rax + 8], edx
mov rsi, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xb0]
cmp qword [r13 + 0x2e0], 0
je 0x140051b5c
mov rdx, r15
mov rcx, r13
call fcn.140004480
jmp 0x140051ba5
cmp r15, qword [r13 + 0x1d0]
jae 0x140051b9d
cmp r15, qword [r13 + 0x1c0]
jb 0x140051b81
mov rax, qword [r13 + 0x1b8]
mov qword [r15], rax
mov qword [r13 + 0x1b8], r15
jmp 0x140051ba5
cmp r15, qword [r13 + 0x1c8]
jb 0x140051b9d
mov rax, qword [r13 + 0x1a8]
mov qword [r15], rax
mov qword [r13 + 0x1a8], r15
jmp 0x140051ba5
mov rcx, r15
call fcn.140004410
mov r15, qword [rsp + 0x60]
mov r12, qword [rsp + 0x70]
mov r14, qword [rsp + 0x68]
mov rdx, rsi
mov rcx, r13
add rsp, 0x78
pop r13
pop rdi
pop rsi
pop rbx
jmp fcn.14005f680