Function at 0x14018ec50
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x648
mov rax, qword [0x1408fa960]
xor rax, rsp
mov qword [rsp + 0x630], rax
mov byte [rsp + 0x20], 0
lea rax, str.SELECT_a.name__a2.name__b.definition_FROM_sys.objects_a_INNER_JOIN_sys.schemas_a2_ON_a.schema_id__a2.schema_id_INNER_JOIN_sys.sql_modules_b_ON_a.object_id__b.object_id_WHERE_a.type__V_AND_a2.name_IN____S__HID_Report__HID_Rest___ORDER_BY_a.name
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x650]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x650]
call qword [rax + reloc.msi.dll_MsiEnumClientsA]
movzx eax, al
test eax, eax
jne 0x14018ecbf
mov rax, qword [rsp + 0x650]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x650]
call qword [rax + MsiDatabaseExportA]
test eax, eax
jne 0x14018f41b
mov rax, qword [rsp + 0x650]
mov rax, qword [rax]
mov rax, qword [rax + 0x1b0]
mov qword [rsp + 0x50], rax
mov dl, 1
mov rcx, qword [rsp + 0x650]
call qword [rsp + 0x50]
movzx eax, al
test eax, eax
je 0x14018f41b
lea rcx, [rsp + 0x1b0]
call fcn.14000a280
nop
lea rcx, [rsp + 0xd0]
call fcn.14000df30
nop
mov rax, qword [rsp + 0x650]
add rax, 0x100
mov rcx, rax
call fcn.1400165c0
movzx eax, al
test eax, eax
je 0x14018ed3d
mov rax, qword [rsp + 0x650]
add rax, 0x180
mov qword [rsp + 0x40], rax
jmp 0x14018ed50
mov rax, qword [rsp + 0x650]
add rax, 0x100
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x190]
call fcn.140015150
nop
lea rcx, [rsp + 0x190]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.14001e490
lea r8, [rsp + 0x108]
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x1b0]
call fcn.140014cf0
lea rcx, [rsp + 0xd0]
call fcn.14005aaa0
mov rax, qword [rsp + 0x650]
mov rax, qword [rax]
mov rax, qword [rax + 0x178]
mov qword [rsp + 0x68], rax
lea r9, [rsp + 0xd0]
mov r8d, 3
lea rdx, [rsp + 0x1b0]
mov rcx, qword [rsp + 0x650]
call qword [rsp + 0x68]
test eax, eax
jne 0x14018f3db
mov byte [rsp + 0x20], 1
lea rdx, [0x14031d084]
lea rcx, [rsp + 0x1d0]
call fcn.1400179b0
nop
xor r9d, r9d
lea r8, [rsp + 0x1d0]
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0x3b0]
call fcn.140142410
nop
lea rcx, [rsp + 0x1d0]
call fcn.14000a800
lea rdx, [0x14031da34]
lea rcx, [rsp + 0x210]
call fcn.1400179b0
nop
lea rdx, [0x14031e6f8]
lea rcx, [rsp + 0x1f0]
call fcn.1400179b0
nop
xor r9d, r9d
lea r8, [rsp + 0x210]
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0x310]
call fcn.140194f00
nop
lea rcx, [rsp + 0x1f0]
call fcn.14000a800
nop
lea rcx, [rsp + 0x210]
call fcn.14000a800
lea rdx, [0x14031e254]
lea rcx, [rsp + 0x250]
call fcn.1400179b0
nop
lea rdx, [0x14031e910]
lea rcx, [rsp + 0x230]
call fcn.1400179b0
nop
xor r9d, r9d
lea r8, [rsp + 0x250]
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x270]
call fcn.140194f00
nop
lea rcx, [rsp + 0x230]
call fcn.14000a800
nop
lea rcx, [rsp + 0x250]
call fcn.14000a800
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0xd0]
call fcn.14000e6a0
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
jmp 0x14018ef2f
lea rcx, [rsp + 0x30]
call fcn.1401953f0
lea rdx, [rsp + 0x118]
lea rcx, [rsp + 0xd0]
call fcn.14000e890
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.14000e0f0
movzx eax, al
test eax, eax
je 0x14018f372
lea rcx, [rsp + 0x30]
call fcn.140009d90
mov qword [rsp + 0x70], rax
mov edx, 1
mov rcx, qword [rsp + 0x70]
call fcn.140071750
mov rdx, rax
lea rcx, [rsp + 0x170]
call fcn.140015150
nop
lea rcx, [rsp + 0x30]
call fcn.140009d90
mov qword [rsp + 0x78], rax
mov edx, 2
mov rcx, qword [rsp + 0x78]
call fcn.140071750
mov rdx, rax
lea rcx, [rsp + 0x128]
call fcn.140015150
nop
xor r8d, r8d
mov dx, SQLMoreResults
lea rcx, [rsp + 0x128]
call fcn.1400786e0
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14018efed
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x128]
call fcn.1400d7d40
mov qword [rsp + 0x38], 0
mov r8, qword [rsp + 0x38]
lea rdx, [0x14031e924]
lea rcx, [rsp + 0x128]
call fcn.140036b80
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x128]
call fcn.140016630
sub rax, 2
cmp qword [rsp + 0x38], rax
jae 0x14018f0eb
cmp qword [rsp + 0x28], 0xffffffffffffffff
je 0x14018f0eb
cmp qword [rsp + 0x28], 0
jbe 0x14018f0ba
mov rax, qword [rsp + 0x28]
dec rax
mov rdx, rax
lea rcx, [rsp + 0x128]
call fcn.14001e9c0
movzx ecx, word [rax]
call fcn.14023aeec
test eax, eax
je 0x14018f0ba
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x80], rax
lea rcx, [rsp + 0x128]
call fcn.140016630
mov rcx, qword [rsp + 0x80]
cmp rcx, rax
jae 0x14018f0ba
mov rax, qword [rsp + 0x28]
add rax, 2
mov rdx, rax
lea rcx, [rsp + 0x128]
call fcn.14001e9c0
movzx ecx, word [rax]
call fcn.14023aeec
test eax, eax
je 0x14018f0ba
jmp 0x14018f0eb
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x38], rax
mov r8, qword [rsp + 0x38]
lea rdx, [0x14031e92c]
lea rcx, [rsp + 0x128]
call fcn.140036b80
mov qword [rsp + 0x28], rax
jmp 0x14018f014
cmp qword [rsp + 0x28], 0xffffffffffffffff
je 0x14018f10e
mov rax, qword [rsp + 0x28]
add rax, 3
mov r8, rax
xor edx, edx
lea rcx, [rsp + 0x128]
call fcn.140078570
mov r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x128]
lea rcx, [rsp + 0x148]
call fcn.140194e70
nop
lea rcx, [rsp + 0xe8]
call fcn.14000df30
nop
lea rdx, [rsp + 0xe8]
lea rcx, [rsp + 0x100]
call fcn.140148a90
xor r8d, r8d
mov rdx, qword [rax]
lea rcx, [rsp + 0x148]
call fcn.140194180
lea rdx, [rsp + 0x148]
lea rcx, [rsp + 0xe8]
call fcn.140194c30
mov dx, reloc.msi.dll_MsiEnumComponentQualifiersA
lea rcx, [rsp + 0x148]
call fcn.140194a90
lea rdx, [0x14031e938]
lea rcx, [rsp + 0x170]
call fcn.14003a7a0
movzx eax, al
test eax, eax
je 0x14018f224
lea rcx, [rsp + 0x30]
call fcn.140009d90
mov qword [rsp + 0x88], rax
xor edx, edx
mov rcx, qword [rsp + 0x88]
call fcn.140071750
mov r9d, 1
lea r8, [rsp + 0x148]
mov rdx, rax
lea rcx, [rsp + 0x450]
call fcn.140142410
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x98], rax
mov rdx, qword [rsp + 0x98]
lea rcx, [rsp + 0x310]
call fcn.14004cec0
nop
lea rcx, [rsp + 0x450]
call fcn.140049b90
jmp 0x14018f336
lea rdx, [0x14031e950]
lea rcx, [rsp + 0x170]
call fcn.14003a7a0
movzx eax, al
test eax, eax
je 0x14018f2bb
lea rcx, [rsp + 0x30]
call fcn.140009d90
mov qword [rsp + 0xa0], rax
xor edx, edx
mov rcx, qword [rsp + 0xa0]
call fcn.140071750
mov r9d, 1
lea r8, [rsp + 0x148]
mov rdx, rax
lea rcx, [rsp + 0x4f0]
call fcn.140142410
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0xb0], rax
mov rdx, qword [rsp + 0xb0]
lea rcx, [rsp + 0x270]
call fcn.14004cec0
nop
lea rcx, [rsp + 0x4f0]
call fcn.140049b90
jmp 0x14018f336
lea rcx, [rsp + 0x30]
call fcn.140009d90
mov qword [rsp + 0xb8], rax
xor edx, edx
mov rcx, qword [rsp + 0xb8]
call fcn.140071750
mov r9d, 1
lea r8, [rsp + 0x148]
mov rdx, rax
lea rcx, [rsp + 0x590]
call fcn.140142410
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xc8], rax
mov rdx, qword [rsp + 0xc8]
lea rcx, [rsp + 0x3b0]
call fcn.14004cec0
nop
lea rcx, [rsp + 0x590]
call fcn.140049b90
nop
lea rcx, [rsp + 0xe8]
call fcn.140195260
nop
lea rcx, [rsp + 0x148]
call fcn.1400eb510
nop
lea rcx, [rsp + 0x128]
call fcn.14000a800
nop
lea rcx, [rsp + 0x170]
call fcn.14000a800
jmp 0x14018ef25
lea rdx, [rsp + 0x3b0]
mov rcx, qword [rsp + 0x658]
call fcn.14004cec0
lea rdx, [rsp + 0x310]
mov rcx, qword [rsp + 0x658]
call fcn.14004cec0
lea rdx, [rsp + 0x270]
mov rcx, qword [rsp + 0x658]
call fcn.14004cec0
nop
lea rcx, [rsp + 0x270]
call fcn.140049b90
nop
lea rcx, [rsp + 0x310]
call fcn.140049b90
nop
lea rcx, [rsp + 0x3b0]
call fcn.140049b90
mov rax, qword [rsp + 0x650]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x650]
call qword [rax + reloc.msi.dll_MsiGetDatabaseState]
nop
lea rcx, [rsp + 0x190]
call fcn.14000a800
nop
lea rcx, [rsp + 0xd0]
call fcn.140057b10
nop
lea rcx, [rsp + 0x1b0]
call fcn.14000a800
movzx eax, byte [rsp + 0x20]
mov rcx, qword [rsp + 0x630]
xor rcx, rsp
call fcn.140222a60
add rsp, 0x648
ret