Function at 0x14002f6dc
Capabilities:
Delete registry value
Link many functions at runtime
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1c8]
sub rsp, 0x2a0
mov rax, qword [0x1400d9180]
xor rax, rsp
mov qword [rbp + 0x190], rax
xor r13d, r13d
mov r15d, edx
movzx edi, cx
mov esi, r13d
mov r12d, r13d
mov dword [rsp + 0x30], r13d
test cx, cx
jle 0x14002f928
lea rcx, [rsp + 0x64]
xor edx, edx
mov r8d, VarUI4FromDisp
call fcn.14005bab0
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x60], VarUI4FromDisp
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x70], 2
lea rcx, str.setupapi.dll
je 0x14002f76a
lea rcx, str.cfgmgr32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x14002f928
lea rdx, str.CM_Locate_DevNodeA
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x1400a0310]
mov rcx, rbx
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.CM_Get_DevNode_Registry_PropertyA
mov rcx, rbx
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.CM_Set_DevNode_Registry_PropertyA
mov rcx, rbx
mov qword [rsp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x1400a02b0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.CM_Open_DevNode_Key
mov rcx, rbx
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [0x1400a0288]
mov rcx, rbx
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
mov qword [rsp + 0x58], rax
test r14, r14
je 0x14002f928
test r13, r13
je 0x14002f928
cmp qword [rsp + 0x40], rcx
je 0x14002f928
cmp qword [rsp + 0x48], rcx
je 0x14002f928
mov rbx, qword [rsp + 0x50]
test rbx, rbx
je 0x14002f928
test rax, rax
je 0x14002f928
lea rcx, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
call r14
test eax, eax
jne 0x14002f928
mov r14, qword [rsp + 0x58]
xor eax, eax
mov ecx, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
xor r8d, r8d
lea rax, [rsp + 0x50]
lea r9, [rbp + 0x80]
lea edx, [r8 + 0xd]
mov dword [rsp + 0x50], 0x103
mov qword [rsp + 0x20], rax
call qword [rsp + 0x40]
test eax, eax
jne 0x14002f8d1
lea rdx, [0x1400a0280]
lea rcx, [rbp + 0x80]
call fcn.14005c79c
xor ecx, ecx
test rax, rax
je 0x14002f8d1
mov word [rsp + 0x38], cx
lea r8, [rsp + 0x38]
lea rdx, str.COM_d
mov rcx, rax
call fcn.14005e42c
cmp word [rsp + 0x38], di
je 0x14002f962
mov edx, dword [rsp + 0x30]
lea rcx, [rsp + 0x34]
xor r8d, r8d
call qword [rsp + 0x48]
test eax, eax
je 0x14002f915
mov edx, dword [rsp + 0x30]
jmp 0x14002f906
mov edx, dword [rsp + 0x30]
lea rcx, [rsp + 0x34]
xor r8d, r8d
call r14
test eax, eax
jne 0x14002f95a
mov edx, dword [rsp + 0x34]
mov dword [rsp + 0x30], edx
lea rcx, [rsp + 0x34]
xor r8d, r8d
call r13
test eax, eax
jne 0x14002f8eb
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x30], eax
xor eax, eax
test r12d, r12d
je 0x14002f863
xor eax, eax
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.14005ba20
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov r12d, 1
jmp 0x14002f91d
mov ecx, dword [rsp + 0x30]
lea rax, [rsp + 0x40]
xor r12d, r12d
xor r9d, r9d
xor r8d, r8d
mov edx, 0xf003f
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
call rbx
test eax, eax
jne 0x14002f928
mov rcx, qword [rsp + 0x40]
lea ebx, [rax + 1]
lea rdx, str.PrivatePort
mov dword [rsp + 0x48], ebx
test r15d, r15d
jne 0x14002f9c6
lea r9d, [r12 + 4]
lea rax, [rsp + 0x48]
xor r8d, r8d
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x14002f9cc
mov esi, ebx
jmp 0x14002f9cc
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x14002f928
movsx eax, di
jmp 0x14002f92a