Function at 0x4ec720
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x70
push 0xffffffffffffffff
push 0x54c52b
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x596c60]
xor eax, ebp
mov dword [ebp + 0x6c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x78]
mov ecx, esi
mov dword [ebp - 4], 0
mov dword [ebp], 0
push 0x24
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
push str.B8798664_D6E1_40EE_9A6F_F6A827243D9C
mov dword [ebp + 0x10], esi
mov byte [esi], 0
call fcn.0047c020
lea eax, [ebp + 0xc]
mov dword [ebp - 4], 0
push eax
push 0xf013f
push 0
push 0x570850
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4ecc2f
push 0x2e
push eax
mov byte [ebp + 0x3c], al
lea eax, [ebp + 0x3d]
push eax
call fcn.0050c510
add esp, 0xc
mov dword [ebp + 8], 0x2f
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0x3c]
push eax
push 0
push 0
push str.TSDeviceID
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4ec904
cmp dword [ebp + 8], 0x24
jb 0x4ec904
call fcn.004ed4e0
cmp dword [eax], 0
je 0x4ec8eb
sub esp, 8
mov dword [ebp - 4], 1
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xb4
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TSTelemetry::GetDeviceId_____Existing_TS_device_id_found.
mov ecx, eax
call fcn.0047f0b0
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 3
cmp dword [ecx + 0x14], 0x10
jb 0x4ec883
mov ecx, dword [ecx]
call fcn.004ed4e0
mov eax, dword [eax]
test eax, eax
je 0x4ec894
push ecx
call eax
add esp, 4
lea ecx, [ebp + 0x24]
call fcn.0047abe0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.0047b5a0
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x56b700
push eax
call fcn.00528f2f
add esp, 4
mov dword [ebp - 4], 0
lea eax, [ebp + 0x3c]
mov ecx, esi
push eax
call fcn.0048e460
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
lea eax, [ebp + 0x3c]
mov ecx, esi
push eax
call fcn.0048e460
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
lea eax, [ebp + 0x14]
push eax
call dword [sym.imp.RPCRT4.dll_UuidCreate]
test eax, eax
jne 0x4ecb1c
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x14]
push eax
call dword [sym.imp.RPCRT4.dll_UuidToStringA]
test eax, eax
jne 0x4eca58
mov edx, dword [ebp + 4]
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ec934
sub ecx, edi
lea eax, [ecx + 1]
push eax
push edx
push 1
push 0
push str.TSDeviceID
push dword [ebp + 0xc]
mov dword [ebp + 8], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4eca40
push dword [ebp + 4]
mov ecx, esi
call fcn.0048e460
call fcn.004ed4e0
cmp dword [eax], 0
je 0x4eca40
sub esp, 8
mov dword [ebp - 4], 5
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xc7
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TSTelemetry::GetDeviceId_____New_TS_device_id_created.
mov ecx, eax
call fcn.0047f0b0
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 7
cmp dword [ecx + 0x14], 0x10
jb 0x4ec9ed
mov ecx, dword [ecx]
call fcn.004ed4e0
mov eax, dword [eax]
test eax, eax
je 0x4ec9fe
push ecx
call eax
add esp, 4
lea ecx, [ebp + 0x24]
call fcn.0047abe0
lea ecx, [ebp - 0xa8]
call fcn.00479050
lea eax, [ebp + 4]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeA]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
lea eax, [ebp + 4]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeA]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
call fcn.004ed4e0
cmp dword [eax], 0
je 0x4ecb0e
sub esp, 8
mov dword [ebp - 4], 9
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xce
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TSTelemetry::GetDeviceId_____Error___Failed_to_convert_GUID
mov ecx, eax
call fcn.0047f0b0
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 0xb
cmp dword [ecx + 0x14], 0x10
jb 0x4ecadc
mov ecx, dword [ecx]
call fcn.004ed4e0
mov eax, dword [eax]
test eax, eax
je 0x4ecaed
push ecx
call eax
add esp, 4
lea ecx, [ebp + 0x24]
call fcn.0047abe0
mov byte [ebp - 4], 9
jmp 0x4ecbf9
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
mov eax, dword [0x59f750]
test al, 1
jne 0x4ecb4f
push dword [ebp + 0xc]
or eax, 1
mov dword [0x59f748], 0
mov dword [0x59f750], eax
mov dword [0x59f74c], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
cmp dword [0x59f748], 0
je 0x4ecb0e
sub esp, 8
mov dword [ebp - 4], 0xd
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xd3
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TSTelemetry::GetDeviceId_____Error___Failed_to_create_GUID
mov ecx, eax
call fcn.0047f0b0
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 0xf
cmp dword [ecx + 0x14], 0x10
jb 0x4ecbce
mov ecx, dword [ecx]
call fcn.004ed4e0
mov eax, dword [eax]
test eax, eax
je 0x4ecbdf
push ecx
call eax
add esp, 4
cmp dword [ebp + 0x38], 0x10
jb 0x4ecbf5
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4ecbf5
push eax
call fcn.00507b54
add esp, 4
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x58]
call fcn.0047b5a0
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x56b700
push eax
call fcn.00528f2f
add esp, 4
mov dword [ebp - 4], 0
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4ecd60
mov eax, dword [0x59f750]
test al, 1
jne 0x4ecc59
or eax, 1
mov dword [0x59f748], 0
mov dword [0x59f750], eax
mov dword [0x59f74c], 1
jmp 0x4ecd65
cmp dword [0x59f748], 0
je 0x4ecd65
sub esp, 8
mov dword [ebp - 4], 0x11
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 0x12
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xdc
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TSTelemetry::GetDeviceId_____Error___Parent_key_doesnt_exist
mov ecx, eax
call fcn.0047f0b0
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 0x13
cmp dword [ecx + 0x14], 0x10
jb 0x4eccdc
mov ecx, dword [ecx]
mov eax, dword [0x59f750]
test al, 1
jne 0x4ecd03
or eax, 1
mov dword [0x59f748], 0
mov dword [0x59f750], eax
mov dword [0x59f74c], 1
jmp 0x4ecd12
mov eax, dword [0x59f748]
test eax, eax
je 0x4ecd12
push ecx
call eax
add esp, 4
cmp dword [ebp + 0x38], 0x10
jb 0x4ecd28
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4ecd28
push eax
call fcn.00507b54
add esp, 4
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x11
call fcn.0047b5a0
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x56b700
push eax
call fcn.00528f2f
add esp, 4
mov dword [ebp - 4], 0
jmp 0x4ecd60
mov eax, dword [0x59f750]
test al, 1
jne 0x4ecd8a
or eax, 1
mov dword [0x59f748], 0
mov dword [0x59f750], eax
mov dword [0x59f74c], 1
jmp 0x4ece8c
cmp dword [0x59f748], 0
je 0x4ece8c
sub esp, 8
mov dword [ebp - 4], 0x15
lea ecx, [ebp - 0xa8]
call fcn.0047b4d0
mov edx, str.._tstelemetry.cpp
mov byte [ebp - 4], 0x16
lea ecx, [ebp - 0xa8]
call fcn.0047f0b0
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
push 0xdf
mov ecx, eax
call fcn.0047b130
mov edx, 0x56b378
mov ecx, eax
call fcn.0047f0b0
mov edx, str.TS_device_Id:
mov ecx, eax
call fcn.0047f0b0
mov edx, esi
mov ecx, eax
call fcn.0047ee50
lea eax, [ebp + 0x24]
push eax
lea ecx, [ebp - 0xa8]
call fcn.0047b620
mov ecx, eax
mov byte [ebp - 4], 0x17
cmp dword [ecx + 0x14], 0x10
jb 0x4ece16
mov ecx, dword [ecx]
mov eax, dword [0x59f750]
test al, 1
jne 0x4ece3d
or eax, 1
mov dword [0x59f748], 0
mov dword [0x59f750], eax
mov dword [0x59f74c], 1
jmp 0x4ece4c
mov eax, dword [0x59f748]
test eax, eax
je 0x4ece4c
push ecx
call eax
add esp, 4
cmp dword [ebp + 0x38], 0x10
jb 0x4ece62
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4ece62
push eax
call fcn.00507b54
add esp, 4
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0x15
call fcn.0047b5a0
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0x56b700
push eax
call fcn.00528f2f
add esp, 4
jmp 0x4ece8c
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x6c]
xor ecx, ebp
call fcn.005072fd
lea esp, [ebp + 0x70]
pop ebp
ret 4