Function at 0x1400cfa60
Capabilities:
Connect to wmi namespace via wbemlocator
Get common file path
Get disk information via ioctl
Reference sql statements

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x538]
sub rsp, 0x620
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1404680d8]
xor rax, rsp
mov qword [rbp + 0x510], rax
mov r15, rdx
xor edx, edx
mov r8d, 0x204
lea rcx, [rbp + 0xf0]
call fcn.140286140
mov edx, 0x102
lea rcx, [rbp + 0xf0]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x1400cfae8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
lea rcx, str.Error__lu_calling_GetSystemDirectory
mov r9d, 0x66b
jmp 0x1400d014e
xor edi, edi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
lea r8d, [rdi + 3]
lea rdx, [rbp - 0x30]
lea rcx, [rbp + 0xf0]
call fcn.1402a2bc8
test eax, eax
jne 0x1400d0134
lea r9, [rbp - 0x30]
lea r8, [0x1403dbfe0]
mov edx, 0x104
lea rcx, [rbp + 0x300]
call fcn.140057c60
xor eax, eax
mov qword [rbp - 0x40], rax
mov dword [rbp - 0x38], eax
mov dword [rbp - 0x50], edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x300]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x38], rdi
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], ntohl
lea rcx, [rbp - 0x40]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2d1080
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1400cfbc6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
lea rcx, str.Error__lu_calling_DeviceIoControl
mov r9d, 0x683
jmp 0x1400d014e
mov r9d, dword [rbp - 0x3c]
lea r8, str.SELECT_SerialNumber_FROM_Win32_DiskDrive_WHERE_Index_u
mov edx, 0x104
lea rcx, [rbp - 0x20]
call fcn.14004c260
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], edi
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 - 1]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
mov esi, eax
mov eax, 0x80000000
lea ecx, [rsi + rax]
test eax, ecx
jne 0x1400cfc79
cmp esi, 0x80010119
je 0x1400cfc79
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
mov r10, qword [rax]
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], ebx
lea rcx, str.Error__lu_calling_CoInitializeSecurity_hr0x_08X
mov qword [rsp + 0x30], rcx
lea rcx, str.MachineID
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r9d, 0x697
lea r8, str.d:jenkinsworkspace_n_mbcommon_srcmbcommonmachineid.cpp
lea rdx, str.mb::common::system::MachineId::GetDiskSerialNumberInternal
mov rcx, rax
call qword [r10 + 0x20]
jmp 0x1400d0183
mov qword [rbp - 0x48], rdi
lea rax, [rbp - 0x48]
mov qword [rsp + 0x20], rax
lea r9, [0x1403a66b8]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1403a66a8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test eax, eax
jns 0x1400cfcfe
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
mov r10, qword [rax]
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], ebx
lea rcx, str.Error__lu_calling_CoCreateInstance_hr0x_08X
mov qword [rsp + 0x30], rcx
lea rcx, str.MachineID
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r9d, 0x6a1
lea r8, str.d:jenkinsworkspace_n_mbcommon_srcmbcommonmachineid.cpp
lea rdx, str.mb::common::system::MachineId::GetDiskSerialNumberInternal
mov rcx, rax
call qword [r10 + 0x20]
jmp 0x1400d0121
mov qword [rbp - 0x58], rdi
mov rbx, qword [rbp - 0x48]
lea rcx, [rsp + 0x58]
call fcn.1400d0d60
nop
mov rcx, qword [rax]
test rcx, rcx
je 0x1400cfd1e
mov rdx, qword [rcx]
jmp 0x1400cfd21
mov rdx, rdi
mov rax, qword [rbx]
lea rcx, [rbp - 0x58]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [rax + 0x18]
mov esi, eax
mov rbx, qword [rsp + 0x58]
test rbx, rbx
je 0x1400cfd9c
mov ecx, 0xffffffff
lock xadd dword [rbx + 0x10], ecx
cmp ecx, 1
jne 0x1400cfd9c
test rbx, rbx
je 0x1400cfd9c
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400cfd7d
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], rdi
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400cfd8f
call fcn.140282c34
mov qword [rbx + 8], rdi
mov edx, 0x18
mov rcx, rbx
call fcn.140282c34
test esi, esi
jns 0x1400cfdbc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
lea rcx, str.Error__lu_calling_ConnectServer_hr0x_08X
mov r9d, 0x6b4
jmp 0x1400cfe09
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xa]
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.ole32.dll_CoSetProxyBlanket]
mov esi, eax
test eax, eax
jns 0x1400cfe47
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
lea rcx, str.Error__lu_calling_CoSetProxyBlanket_hr0x_08X
mov r9d, 0x6c6
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rcx
lea rcx, str.MachineID
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r10, qword [rax]
lea r8, str.d:jenkinsworkspace_n_mbcommon_srcmbcommonmachineid.cpp
lea rdx, str.mb::common::system::MachineId::GetDiskSerialNumberInternal
mov rcx, rax
call qword [r10 + 0x20]
jmp 0x1400d0111
mov qword [rbp - 0x68], rdi
mov r14, qword [rbp - 0x58]
mov ecx, 0x18
call fcn.140282c3c
mov rbx, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400cfe88
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 8], rdi
mov dword [rbx + 0x10], 1
lea rcx, [rbp - 0x20]
call fcn.1402840e0
mov qword [rbx], rax
jmp 0x1400cfe8b
mov rbx, rdi
mov qword [rsp + 0x68], rbx
test rbx, rbx
je 0x1400d01bc
mov ecx, 0x18
call fcn.140282c3c
mov rsi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400cfed5
xor eax, eax
mov qword [rsi], rax
mov qword [rsi + 0x10], rax
mov qword [rsi + 8], rdi
mov dword [rsi + 0x10], 1
lea rcx, [0x1403dbd8c]
call fcn.1402840e0
mov qword [rsi], rax
jmp 0x1400cfed8
mov rsi, rdi
mov qword [rsp + 0x70], rsi
test rsi, rsi
je 0x1400d01b1
mov rax, qword [r14]
lea rcx, [rbp - 0x68]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdi
mov r9d, 0x30
mov r8, qword [rbx]
mov rdx, qword [rsi]
mov rcx, r14
call qword [rax + 0xa0]
mov r14d, eax
mov ecx, 0xffffffff
lock xadd dword [rsi + 0x10], ecx
cmp ecx, 1
jne 0x1400cff4f
mov rcx, qword [rsi]
test rcx, rcx
je 0x1400cff2f
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rsi], rdi
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1400cff41
call fcn.140282c34
mov qword [rsi + 8], rdi
mov edx, 0x18
mov rcx, rsi
call fcn.140282c34
nop
mov eax, 0xffffffff
lock xadd dword [rbx + 0x10], eax
cmp eax, 1
jne 0x1400cff8e
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400cff6f
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rbx], rdi
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400cff81
call fcn.140282c34
mov qword [rbx + 8], rdi
mov edx, 0x18
mov rcx, rbx
call fcn.140282c34
test r14d, r14d
jns 0x1400cffec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
mov r10, qword [rax]
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x38], ebx
lea rcx, str.Error__lu_calling_ExecQuery_hr0x_08X
mov qword [rsp + 0x30], rcx
lea rcx, str.MachineID
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r9d, 0x6d6
lea r8, str.d:jenkinsworkspace_n_mbcommon_srcmbcommonmachineid.cpp
lea rdx, str.mb::common::system::MachineId::GetDiskSerialNumberInternal
mov rcx, rax
call qword [r10 + 0x20]
jmp 0x1400d00fe
mov word [r15], di
mov qword [rbp - 0x60], rdi
mov dword [rbp - 0x70], edi
mov rcx, qword [rbp - 0x68]
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x20], rdx
lea r9, [rbp - 0x60]
mov edx, 0xffffffff
lea r8d, [rdx + 2]
call qword [rax + 0x20]
test eax, eax
js 0x1400d00d0
mov ebx, 8
cmp dword [rbp - 0x70], 0
je 0x1400d00d0
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp - 0x60]
mov rax, qword [rcx]
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, str.serialNumber
call qword [rax + 0x20]
test eax, eax
js 0x1400d0086
cmp bx, word [rsp + 0x78]
jne 0x1400d0086
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x1400d0086
mov r8, qword [rbp - 0x80]
mov edx, 0x400
mov rcx, r15
call fcn.1400cbb20
lea rcx, [rsp + 0x78]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
nop
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1400d00a1
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rbp - 0x60], rdi
mov dword [rbp - 0x70], edi
mov rcx, qword [rbp - 0x68]
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x20], rdx
lea r9, [rbp - 0x60]
mov edx, 0xffffffff
lea r8d, [rdx + 2]
call qword [rax + 0x20]
test eax, eax
jns 0x1400d0024
mov rdx, qword [rbp - 0x68]
test rdx, rdx
je 0x1400d00ea
mov qword [rbp - 0x68], rdi
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + reloc.WS2_32.dll_recv]
mov rdx, qword [rbp - 0x68]
mov edi, 1
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1400d0102
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov rdx, qword [rbp - 0x68]
test rdx, rdx
je 0x1400d0111
mov rax, qword [rdx]
mov rcx, rdx
call qword [rax + reloc.WS2_32.dll_recv]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x1400d0121
mov rdx, qword [rcx]
call qword [rdx + reloc.WS2_32.dll_recv]
nop
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x1400d0130
mov rdx, qword [rcx]
call qword [rdx + reloc.WS2_32.dll_recv]
mov eax, edi
jmp 0x1400d0185
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140024740
lea rcx, str.Error__lu_calling_wsplitpath_s
mov r9d, 0x678
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rcx
lea rcx, str.MachineID
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 1
mov r10, qword [rax]
lea r8, str.d:jenkinsworkspace_n_mbcommon_srcmbcommonmachineid.cpp
lea rdx, str.mb::common::system::MachineId::GetDiskSerialNumberInternal
mov rcx, rax
call qword [r10 + 0x20]
xor eax, eax
mov rcx, qword [rbp + 0x510]
xor rcx, rsp
call fcn.140282c10
lea r11, [rsp + 0x620]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov ecx, 0x8007000e
call fcn.1402840d0
nop
mov ecx, 0x8007000e
call fcn.1402840d0
int3