Function at 0x14018a690
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2e8
mov rax, qword [0x1408fa960]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov dword [rsp + 0x34], 0
mov rax, qword [rsp + 0x2f0]
add rax, 0x160
mov rdx, qword [0x1408cfde0]
mov rcx, rax
call fcn.14003a7a0
movzx eax, al
test eax, eax
je 0x14018a6f5
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x2f0]
call qword [rax + 0x40]
jmp 0x14018ac7b
mov byte [rsp + 0x30], 0
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x2f0]
call qword [rax + reloc.msi.dll_MsiEnumClientsA]
movzx eax, al
test eax, eax
jne 0x14018a735
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x2f0]
call qword [rax + MsiDatabaseExportA]
test eax, eax
jne 0x14018ac76
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rax, qword [rax + 0x1b0]
mov qword [rsp + 0xc0], rax
mov dl, 1
mov rcx, qword [rsp + 0x2f0]
call qword [rsp + 0xc0]
movzx eax, al
test eax, eax
je 0x14018ac76
lea rcx, [rsp + 0x240]
call fcn.1401757c0
nop
lea rcx, [rsp + 0x138]
call fcn.14000a280
nop
lea rcx, [rsp + 0x158]
call fcn.14000a280
nop
lea rcx, [rsp + 0x118]
call fcn.14000a280
nop
lea r8, [rsp + 0x158]
lea rdx, [rsp + 0x118]
lea rcx, [rsp + 0x240]
call fcn.1401793e0
lea rcx, [rsp + 0x48]
call fcn.14000df30
nop
lea rcx, [rsp + 0x158]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0x108]
call fcn.14001e490
lea rcx, [rsp + 0x118]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xc8]
call fcn.14001e490
lea r9, [rsp + 0x108]
lea r8, [rsp + 0xc8]
lea rdx, str.SELECT_count___FROM_sys.server_principals_WHERE_type__U_AND_UPPER__name____UPPER___S_S____AND_is_disabled__0
lea rcx, [rsp + 0x138]
call fcn.14001d950
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rax, qword [rax + 0x178]
mov qword [rsp + 0x60], rax
lea r9, [rsp + 0x48]
mov r8d, 1
lea rdx, [rsp + 0x138]
mov rcx, qword [rsp + 0x2f0]
call qword [rsp + 0x60]
test eax, eax
jne 0x14018a8c2
lea rcx, [rsp + 0x48]
call fcn.1400204f0
movzx eax, al
test eax, eax
jne 0x14018a8c2
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.14002d0f0
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x3c], 0xffffffff
xor edx, edx
mov rcx, qword [rsp + 0x68]
call fcn.140071750
xor r9d, r9d
mov r8d, 0x200
lea rdx, [rsp + 0x3c]
mov rcx, rax
call fcn.14008db90
movzx eax, al
test eax, eax
je 0x14018a8c2
cmp dword [rsp + 0x3c], 0
jle 0x14018a8c2
mov byte [rsp + 0x30], 1
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x14018abf7
lea rcx, [rsp + 0x48]
call fcn.14005aaa0
lea rcx, [rsp + 0x138]
call fcn.140016540
lea rcx, [rsp + 0x118]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.14001e490
lea rcx, [rsp + 0x118]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xe8]
call fcn.14001e490
lea rcx, [rsp + 0x118]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0xf8]
call fcn.14001e490
lea rax, [rsp + 0xd8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0xf8]
lea rdx, str.SELECT_name_FROM_sys.server_principals_WHERE_type__G_AND_LEN__name_____LEN___S___AND_UPPER__LEFT__name__LEN___S________UPPER___S___AND_is_disabled__0
lea rcx, [rsp + 0x138]
call fcn.140070040
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rax, qword [rax + 0x178]
mov qword [rsp + 0x70], rax
lea r9, [rsp + 0x48]
mov r8d, 1
lea rdx, [rsp + 0x138]
mov rcx, qword [rsp + 0x2f0]
call qword [rsp + MsiRecordGetStringA]
test eax, eax
jne 0x14018abf7
lea rcx, [rsp + 0x48]
call fcn.1400204f0
movzx eax, al
test eax, eax
jne 0x14018abf7
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.14002d0f0
mov qword [rsp + 0x78], rax
xor edx, edx
mov rcx, qword [rsp + 0x78]
call fcn.140071750
mov rdx, rax
lea rcx, [rsp + 0x1b8]
call fcn.140015150
nop
lea rcx, [rsp + 0x178]
call fcn.14000a280
nop
lea rcx, [rsp + 0x198]
call fcn.14000a280
nop
lea rcx, [rsp + 0x1d8]
call fcn.14000a280
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x88], rax
mov byte [rsp + 0x20], 0
mov r9, qword [rsp + 0x88]
lea r8, [rsp + 0x178]
lea rdx, [rsp + 0x1b8]
lea rcx, [rsp + 0x240]
call fcn.14017e8c0
nop
lea rcx, [rsp + 0x1d8]
call fcn.14000a800
lea r8, [rsp + 0x198]
lea rdx, [rsp + 0x118]
lea rcx, [rsp + 0x240]
call fcn.140176380
lea rcx, [rsp + 0x218]
call fcn.14000a280
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x98], rax
mov eax, dword [rsp + 0x34]
or eax, 1
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xb0], rax
lea rcx, [rsp + 0x1f8]
call fcn.14000a280
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xa8], rax
mov eax, dword [rsp + 0x34]
or eax, 2
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0xb8]
lea r8, [rsp + 0x178]
lea rdx, [rsp + 0x158]
lea rcx, [rsp + 0x240]
call fcn.14017e0c0
movzx eax, al
test eax, eax
jne 0x14018ab74
lea r9, [rsp + 0x198]
lea r8, [rsp + 0x178]
lea rdx, [rsp + 0x158]
lea rcx, [rsp + 0x240]
call fcn.14017e500
movzx eax, al
test eax, eax
jne 0x14018ab74
mov dword [rsp + 0x40], 0
jmp 0x14018ab7c
mov dword [rsp + 0x40], 1
movzx eax, byte [rsp + 0x40]
mov byte [rsp + 0x38], al
mov eax, dword [rsp + 0x34]
and eax, 2
test eax, eax
je 0x14018aba3
and dword [rsp + 0x34], 0xfffffffd
lea rcx, [rsp + 0x1f8]
call fcn.14000a800
nop
mov eax, dword [rsp + 0x34]
and eax, 1
test eax, eax
je 0x14018abc0
and dword [rsp + 0x34], 0xfffffffe
lea rcx, [rsp + 0x218]
call fcn.14000a800
movzx eax, byte [rsp + 0x38]
test eax, eax
je 0x14018abce
mov byte [rsp + 0x30], 1
lea rcx, [rsp + 0x198]
call fcn.14000a800
nop
lea rcx, [rsp + 0x178]
call fcn.14000a800
nop
lea rcx, [rsp + 0x1b8]
call fcn.14000a800
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x14018ac1d
mov rax, qword [rsp + 0x2f0]
add rax, 0x90
mov rdx, qword [0x1408cfdd0]
mov rcx, rax
call fcn.140015550
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x2f0]
call qword [rax + reloc.msi.dll_MsiGetDatabaseState]
nop
lea rcx, [rsp + 0x48]
call fcn.140057b10
nop
lea rcx, [rsp + 0x118]
call fcn.14000a800
nop
lea rcx, [rsp + 0x158]
call fcn.14000a800
nop
lea rcx, [rsp + 0x138]
call fcn.14000a800
nop
lea rcx, [rsp + 0x240]
call fcn.140175840
movzx eax, byte [rsp + 0x30]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.140222a60
add rsp, 0x2e8
ret