Function at 0x1400010e0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x4c0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x4b0], rax
xor r14d, r14d
lea rcx, [0x1400032e0]
xor r8d, r8d
mov dword [rsp + 0x40], r14d
xor edx, edx
mov ebp, r14d
lea r9d, [r14 + 0xa]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
lea rsi, str.Eterlogic_Virtual_Serial_Port__COM8_
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140001159
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetupDiGetClassDevs_failed._Error:__lu_n
call fcn.140001020
jmp 0x140001249
lea r8, [rsp + 0x68]
mov dword [rsp + 0x68], 0x20
xor edx, edx
mov rcx, rbx
mov edi, r14d
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x140001240
nop dword [rax]
mov r9d, 0x100
mov qword [rsp + 0x20], r14
lea r8, [rsp + 0x2b0]
mov rcx, rbx
lea rdx, [rsp + 0x68]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x140001212
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rax, [rsp + 0xb0]
mov dword [rsp + 0x28], 0x200
lea rdx, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov rcx, rbx
lea r8d, [r9 + 0xc]
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x140001226
lea rdx, [rsp + 0xb0]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
movzx ecx, word [rsi + rax*2 + 2]
cmp cx, word [rdx + rax*2 + 2]
jne 0x140001226
add rax, 2
cmp rax, 0x25
je 0x140001275
movzx ecx, word [rsi + rax*2]
cmp cx, word [rdx + rax*2]
je 0x1400011f0
jmp 0x140001226
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetupDiGetDeviceInstanceId_failed._Error:__lu_n
call fcn.140001020
inc edi
lea r8, [rsp + 0x68]
mov edx, edi
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x140001180
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor edx, edx
lea rcx, [0x1400032e0]
call qword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInfoList]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14000127c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetupDiCreateDeviceInfoList_failed._Error:__d_n
call fcn.140001020
xor eax, eax
jmp 0x1400014e0
lea rax, [rsp + 0x48]
mov dword [rsp + 0x48], 0x20
mov qword [rsp + 0x30], rax
lea r8, [0x1400032e0]
mov dword [rsp + 0x28], 1
lea rdx, str.ETERLOGIC_VSPE
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInfoW]
test eax, eax
jne 0x1400012dd
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiCreateDeviceInfo_failed._Error:__d_n
mov edx, eax
call fcn.140001020
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x1400014e0
mov qword [rsp + 0x28], r14
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov qword [rsp + 0x20], r14
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiRegisterDeviceInfo]
test eax, eax
jne 0x14000130e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiRegisterDeviceInfo_failed._Error:__d_n
jmp 0x1400012c6
lea rax, [rsp + 0x88]
mov dword [rsp + 0x88], 0x20
mov qword [rsp + 0x28], rax
lea r8, [0x1400032e0]
xor r9d, r9d
mov dword [rsp + 0x20], r14d
lea rdx, [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInterfaceW]
test eax, eax
jne 0x140001359
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SetupDiCreateDeviceInterface_failed._Error:__d_n
jmp 0x1400012c6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], r14
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x88]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400013ad
lea rcx, str.Memory_allocation_failed._n
call fcn.140001020
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x1400014e0
mov r9d, dword [rsp + 0x40]
lea rdx, [rsp + 0x88]
mov dword [rax], 8
mov r8, rdi
lea rax, [rsp + 0x48]
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
jne 0x14000140c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetupDiGetDeviceInterfaceDetail_failed._Error:__d_n
call fcn.140001020
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x1400014e0
mov r9, rsi
mov dword [rsp + 0x20], 0x4a
mov r8d, 0xc
lea rdx, [rsp + 0x48]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiSetDeviceRegistryPropertyW]
test eax, eax
jne 0x140001445
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.SetupDiSetDeviceRegistryProperty_failed._Error:__d_n
call fcn.140001020
jmp 0x14000144a
mov ebp, 1
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
lea rdx, [rsp + 0x48]
mov rcx, rbx
mov dword [rsp + 0x20], 1
lea r8d, [r9 + 1]
call qword [sym.imp.SETUPAPI.dll_SetupDiCreateDevRegKeyW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400012cd
lea rax, str.COM8
mov dword [rsp + 0x28], 0xa
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.PortName
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1400014c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_set_PortName._Error:__d_n
call fcn.140001020
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, ebp
mov rcx, qword [rsp + 0x4b0]
xor rcx, rsp
call fcn.140001820
lea r11, [rsp + 0x4c0]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop r14
ret