Function at 0x140004e40
Capabilities:
Connect to wmi namespace via wbemlocator
Create thread

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xc8], rbx
mov rsi, rcx
mov ebx, 1
cmp byte [rcx + 0x178], 0
jne 0x140004e79
xor eax, eax
jmp 0x140005462
mov ebp, dword [rcx]
shr ebp, 1
and ebp, ebx
mov ecx, 0xa8
call fcn.140006ad4
mov rdi, rax
mov qword [rsp + 0xb0], rax
xor r12d, r12d
lea r14, [r12 - 1]
test rax, rax
je 0x140004edd
mov dword [rax + 4], ebp
mov dword [rax], ebx
mov r8d, ebp
mov edx, ebx
mov rcx, rax
call fcn.140002b90
mov dword [rdi + 8], eax
mov dword [rdi + 0xc], ebx
mov qword [rdi + 0x10], r14
mov dword [rdi + 0x98], 0xff
mov dword [rdi + 0x9c], 0xff
mov dword [rdi + 0xa0], 0xff
jmp 0x140004ee0
mov rdi, r12
mov qword [rsi + 0x1b8], rdi
test rdi, rdi
jne 0x140004f0a
lea r8, [0x14001cc20]
lea rcx, str.P_Sensor
movzx edx, bx
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
cmp byte [rsi + 0x178], 1
jne 0x1400052a0
mov ecx, 0x38
call fcn.140006ad4
mov qword [rsp + 0xb0], rax
test rax, rax
je 0x140004f3f
mov rdx, qword [rsi + 0x1b8]
mov rcx, rax
call fcn.1400024c0
jmp 0x140004f42
mov rax, r12
mov qword [rsi + 0x180], rax
test rax, rax
jne 0x140004f57
lea r8, str.Create_CFirmDataReader_failed.
jmp 0x140004ef3
lea rdx, [rsp + 0xb8]
mov rcx, rax
call fcn.140002930
lea rcx, str.P_Sensor
test eax, eax
je 0x140005289
mov r13d, 4
mov r9d, dword [rsp + 0xb8]
lea r8, str.P_Sensor_version__d.
movzx edx, r13w
call fcn.140004370
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsi + 0x180]
call fcn.140002990
test eax, eax
je 0x14000527d
cmp dword [rsp + 0xc0], 0
jne 0x140004fc6
lea r8, str.P_Sensor_is_not_supported.
jmp 0x140004ef3
lea r15, [rsi + 0x190]
mov qword [rsp + 0x20], r15
lea r9, [0x14001d360]
mov r8d, ebx
xor edx, edx
lea rcx, [0x14001d340]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
test eax, eax
jns 0x140005010
mov r9d, eax
lea r8, str.Failed_to_create_IWbemLocator_object._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov ecx, 0x18
call fcn.140006ad4
mov rdi, rax
mov qword [rsp + 0xb0], rax
test rax, rax
je 0x14000504c
mov qword [rax + 8], r12
mov dword [rax + 0x10], ebx
lea rcx, str.ROOTWMI
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov qword [rdi], rax
test rax, rax
je 0x1400054b0
jmp 0x14000504f
mov rdi, r12
mov qword [rsp + 0xb0], rdi
test rdi, rdi
je 0x1400054a5
mov rcx, qword [r15]
lea r15, [rsi + 0x188]
mov rax, qword [rcx]
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rdi]
call qword [rax + 0x18]
mov ebp, eax
lock xadd dword [rdi + 0x10], r14d
cmp r14d, 1
jne 0x1400050d0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400050b1
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [rdi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1400050c3
call fcn.1400064b4
mov qword [rdi + 8], r12
mov edx, 0x18
mov rcx, rdi
call fcn.1400064b4
lea rcx, str.P_Sensor
test ebp, ebp
jns 0x1400050f5
mov r9d, ebp
lea r8, str.Could_not_connect._Err_code__0x_x
movzx edx, bx
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
lea r8, str.Connected_to_ROOTWMI_WMI_namespace.
movzx edx, r13w
call fcn.140004370
mov dword [rsp + 0x38], r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xa]
mov rcx, qword [r15]
call qword [sym.imp.OLE32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x140005157
mov r9d, eax
lea r8, str.Could_not_set_proxy_blanket._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
lea rdi, [rsi + 0x198]
mov qword [rsp + 0x20], rdi
lea r9, [0x14001d370]
mov r8d, r13d
xor edx, edx
lea rcx, [0x14001d330]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
test eax, eax
jns 0x1400051a1
mov r9d, eax
lea r8, str.Failed_to_create_CLSID_UnsecuredApartment_object._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov ecx, 0x18
call fcn.140006ad4
mov rcx, rax
mov qword [rsp + 0xb0], rax
test rax, rax
je 0x1400051d6
mov rax, qword [rsi + 0x180]
lea rdx, vtable.EventSink.0
mov qword [rcx], rdx
mov qword [rcx + 0x10], rax
mov dword [rcx + 8], r12d
jmp 0x1400051d9
mov rcx, r12
mov qword [rsi + 0x1b0], rcx
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rdi]
mov rax, qword [rcx]
lea r8, [rsi + 0x1a0]
mov rdx, qword [rsi + 0x1b0]
call qword [rax + 0x18]
test eax, eax
jne 0x14000526a
mov rcx, qword [rsi + 0x1a0]
test rcx, rcx
je 0x14000526a
mov rax, qword [rcx]
lea r8, [rsi + 0x1a8]
lea rdx, [0x14001d350]
call qword [rax]
test eax, eax
jne 0x14000525e
cmp qword [rsi + 0x1a8], 0
je 0x14000525e
mov ecx, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
xor r9d, r9d
mov r8d, ebx
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [rsi + 0x58], rax
test rax, rax
jne 0x1400052a0
lea r8, str.CreatePSensorEvent_failed.
jmp 0x140004ef3
lea r8, str.Query_IID_IWbemObjectSink_failed_
jmp 0x140004ef3
mov qword [rsi + 0x1a0], r12
lea r8, str.CreateObjectStub_failed_
jmp 0x140004ef3
lea r8, str.CFirmDataReader_IsSupportPSensor_failed.
jmp 0x140004ef3
lea r8, str.CFirmDataReader_GetVersion_failed.
movzx edx, bx
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
cmp byte [rsi + 0x178], 2
jne 0x14000543e
mov dword [rsp + 0xb0], r12d
xor ecx, ecx
call qword [sym.imp.OLE32.dll_CoInitialize]
test eax, eax
jns 0x1400052e2
mov r9d, eax
lea r8, str.Failed_to_CoInitialize._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
lea rdi, [rsi + 0x1c0]
mov qword [rsp + 0x20], rdi
lea r9, [0x14001cc10]
mov r8d, ebx
xor edx, edx
lea rcx, [0x14001d5c0]
call qword [sym.imp.OLE32.dll_CoCreateInstance]
test eax, eax
jns 0x14000532c
mov r9d, eax
lea r8, str.Failed_to_create_ISensorManager_object._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov rcx, qword [rdi]
mov rax, qword [rcx]
lea r8, [rsi + 0x1c8]
lea rdx, [0x14001c2d8]
call qword [rax + 0x18]
test eax, eax
jns 0x140005368
mov r9d, eax
lea r8, str.Failed_to_find_sensors._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov rcx, qword [rsi + 0x1c8]
mov rax, qword [rcx]
lea rdx, [rsp + 0xb0]
call qword [rax + 0x20]
test eax, eax
jns 0x1400053a2
mov r9d, eax
lea r8, str.Failed_to_get_sensor_number._Err_code__0x_x
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov edi, r12d
cmp dword [rsp + 0xb0], r12d
jbe 0x140004f02
mov ebp, 0x1f
nop dword [rax + rax]
mov rcx, qword [rsi + 0x1c8]
mov rax, qword [rcx]
lea r8, [rsi + 0x1d0]
mov edx, edi
call qword [rax + 0x18]
test eax, eax
js 0x140005483
mov rcx, qword [rsi + 0x1d0]
mov rax, qword [rcx]
lea r8, [rsp + 0x58]
lea rdx, [0x14001c2c0]
call qword [rax + 0x38]
test eax, eax
js 0x14000547a
cmp bp, word [rsp + 0x58]
jne 0x140005417
mov rdx, qword [rsp + 0x60]
lea rcx, str.LENOVO_P_Sensor
call fcn.14000afe4
test eax, eax
je 0x140005433
lea rcx, [rsp + 0x58]
call qword [sym.imp.OLE32.dll_PropVariantClear]
inc edi
cmp edi, dword [rsp + 0xb0]
jae 0x140004f02
jmp 0x1400053c0
lea rcx, [rsp + 0x58]
call qword [sym.imp.OLE32.dll_PropVariantClear]
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [0x140004610]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rsi + 0x50], rax
mov eax, ebx
mov rbx, qword [rsp + 0xc8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, str.Failed_to_get_SENSOR_PROPERTY_MODEL_of_sensor__d._Err_code__0x_x
jmp 0x14000548a
lea r8, str.Failed_to_get_sensor__d._Err_code__0x_x
mov dword [rsp + 0x20], eax
mov r9d, edi
movzx edx, bx
lea rcx, str.P_Sensor
call fcn.140004370
mov ebx, r12d
jmp 0x140005460
mov ecx, 0x8007000e
call fcn.140006250
nop
mov ecx, 0x8007000e
call fcn.140006250
int3