Function at 0x140010d10
Capabilities:
Link many functions at runtime
Reference sql statements

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rsp + 0xa0], rbx
mov r13d, edx
mov rbp, rcx
xor esi, esi
call fcn.140025894
mov rcx, rax
mov eax, esi
test rcx, rcx
setne al
test eax, eax
jne 0x140010d58
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
call fcn.140025894
mov rcx, rax
mov eax, esi
test rcx, rcx
setne al
test eax, eax
jne 0x140010d86
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0x210]
call fcn.140032fc8
lea rcx, str.msi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r12, rax
or rbx, 0xffffffffffffffff
test rax, rax
je 0x140011104
lea rdx, str.MsiGetActiveDatabase
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
lea rdx, str.MsiCloseHandle
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x30], rax
mov ecx, r13d
call rdi
mov r14d, eax
mov dword [rsp + 0x28], eax
test eax, eax
je 0x1400110e1
call fcn.140025894
mov rcx, rax
mov eax, esi
test rcx, rcx
setne al
test eax, eax
jne 0x140010e19
mov ecx, 0x80004005
call fcn.140007cd0
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rdx, str.MsiDatabaseOpenViewW
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
lea rdx, str.MsiViewExecute
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r13, rax
lea r8, [rbp + 0xa0]
lea rdx, str.SELECT_Client_FROM_ADSCompClients_WHERE_Component
lea rcx, [rsp + 0x50]
call fcn.140007ae0
nop
lea r8, [0x140061f6c]
mov rdx, rax
lea rcx, [rsp + 0x38]
call fcn.140007a00
nop
lea r8, [rsp + 0xb0]
mov rdx, qword [rax]
mov ecx, r14d
call rdi
mov edi, esi
test eax, eax
sete dil
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140010eb5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140010ed5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test edi, edi
je 0x1400110b4
xor edx, edx
mov ecx, dword [rsp + 0xb0]
call r13
test eax, eax
je 0x140010f10
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
lea r8, str.Couldnt_Open_View
mov edx, 1
call qword [rax + 0xd0]
mov rdi, qword [rsp + 0x30]
jmp 0x140011099
lea rdx, str.MsiViewFetch
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
lea rdx, [rsp + 0xb8]
mov ecx, dword [rsp + 0xb0]
call r14
test eax, eax
jne 0x140011074
nop
mov dword [rsp + 0x2c], 0x800
lea rdx, str.MsiRecordGetStringW
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r13, rax
movsxd rdi, dword [rsp + 0x2c]
mov r8, qword [rsp + 0x20]
mov ecx, 1
sub ecx, dword [r8 - 8]
mov eax, dword [r8 - 0xc]
sub eax, edi
or eax, ecx
jge 0x140010f89
mov edx, edi
lea rcx, [rsp + 0x20]
call fcn.140009290
mov r8, qword [rsp + 0x20]
test edi, edi
js 0x140011069
cmp edi, dword [r8 - 0xc]
jg 0x140011069
mov dword [r8 - 0x10], edi
mov rax, qword [rsp + 0x20]
mov word [rax + rdi*2], 0
lea r9, [rsp + 0x2c]
mov edx, 1
mov ecx, dword [rsp + 0xb8]
call r13
test eax, eax
jne 0x14001102d
mov rdx, qword [rsp + 0x20]
test rdx, rdx
jne 0x140010fd0
mov ecx, esi
jmp 0x140010fe6
xor eax, eax
mov rcx, rbx
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
js 0x14001105e
cmp ecx, dword [rdx - 0xc]
jg 0x14001105e
mov dword [rdx - 0x10], ecx
movsxd rcx, ecx
mov rax, qword [rsp + 0x20]
mov word [rax + rcx*2], 0
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x210]
call fcn.140033088
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
mov r9, qword [rsp + 0x20]
lea r8, str.Read_Client_from_Table:__s
mov edx, 0xa
call qword [rax + 0xd0]
jmp 0x140011043
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
lea r8, str.___ReadClientsFromTable:_MsiRecordgetString_failed
xor edx, edx
call qword [rax + 0xd0]
lea rdx, [rsp + 0xb8]
mov ecx, dword [rsp + 0xb0]
call r14
test eax, eax
jne 0x140011074
jmp 0x140010f40
mov ecx, 0x80070057
call fcn.140007cd0
int3
mov ecx, 0x80070057
call fcn.140007cd0
int3
cmp dword [rsp + 0xb8], 0
je 0x14001108f
mov r14d, dword [rsp + 0x28]
mov ecx, r14d
mov rdi, qword [rsp + 0x30]
call rdi
jmp 0x140011099
mov r14d, dword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
lea rdx, str.MsiViewClose
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [rsp + 0xb0]
call rax
jmp 0x1400110b9
mov rdi, qword [rsp + 0x30]
mov ecx, r14d
call rdi
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400110f9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400110f9
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
lea r8, str.ReadClientsFromTable:_MsiGetActiveDatabase_Failed
xor edx, edx
call qword [rax + 0xd0]
mov esi, ebx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x140011126
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea rcx, [rbp + 0x38]
mov rax, qword [rcx]
mov r9d, esi
lea r8, str.LoadLibrary_msi.dll_Failed__error:_d
xor edx, edx
call qword [rax + 0xd0]
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
mov ecx, ebx
lock xadd dword [rdx + 0x10], ecx
add ecx, 0xffffffff
test ecx, ecx
jg 0x140011147
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140011165
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, esi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret