Function at 0x140004160
Capabilities:
Query environment variable
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x7d0]
sub rsp, 0x8d0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x7c0], rax
lea rax, str.SystemCurrentControlSetControlDeviceOverridesUSBVID_0A5CPID_5800LocationPaths
xor esi, esi
mov qword [rsp + 0x60], rax
mov ebx, esi
lea rax, str.SystemCurrentControlSetControlDeviceOverridesUSBVID_0A5CPID_5832LocationPaths
mov dword [rsp + 0x58], esi
mov qword [rsp + 0x68], rax
lea rax, str.SystemCurrentControlSetControlDeviceOverridesUSBVID_0A5CPID_5833LocationPaths
mov qword [rsp + 0x70], rax
lea rax, str.SystemCurrentControlSetControlDeviceOverridesUSBVID_0A5CPID_5834LocationPaths
mov qword [rsp + 0x78], rax
nop dword [rax]
mov rdx, qword [rsp + rbx*8 + 0x60]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x40], rsi
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov qword [rsp + 0x30], rsi
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x140004222
mov r8d, eax
lea rdx, str.CreateUshRegistryEntries:_RegCreateKeyEx:_FAILED:_STATUS:__d__0x_x__n
mov ecx, 2
call fcn.1400016a0
jmp 0x14000424f
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x58]
mov dword [rsp + 0x28], 4
lea rdx, str.Removable
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc rbx
cmp rbx, 4
jl 0x1400041d0
mov r15d, 0x30
lea rcx, [rbp - 0x7e]
xor edx, edx
mov word [rbp - 0x80], r15w
mov r8d, 0x206
call fcn.14000d200
mov r8d, 0x104
lea rdx, [rbp + 0x3a0]
lea rcx, str._SystemDrive_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [rbp + 0x3a0]
mov edx, 0x104
lea r8, str._sProgramDataBroadcomHostStorage_
lea rcx, [rbp - 0x80]
call fcn.140004b40
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOM
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
or rdi, 0xffffffffffffffff
lea r14d, [r15 - 0x2f]
test eax, eax
je 0x140004313
mov r8d, eax
lea rdx, str.CreateUshRegistryEntries:_RegCreateKeyEx:_HostStorage:_FAILED:_STATUS:__d__0x_x__n
lea ecx, [rdi + 3]
call fcn.1400016a0
jmp 0x140004357
lea rcx, [rbp - 0x80]
mov rax, rdi
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], si
lea rax, [rax + 1]
jne 0x140004320
mov rcx, qword [rsp + 0x50]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.HostStoragePath
lea rax, [rbp - 0x80]
mov r9d, r14d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x50]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareRSASoftware_Token
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x50]
mov ebx, esi
test eax, eax
cmove ebx, r14d
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, r14d
jne 0x14000449a
xor edx, edx
mov word [rbp + 0x190], r15w
mov r8d, 0x206
lea rcx, [rbp + 0x192]
call fcn.14000d200
mov r8d, 0x104
lea rdx, [rbp + 0x5b0]
lea rcx, str._SystemRoot_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [rbp + 0x5b0]
mov edx, 0x104
lea r8, str._sSystem32BcmTokenProvider.dll
lea rcx, [rbp + 0x190]
call fcn.140004b40
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWARERSASoftware_TokenLibraryPlugins1F83ED30_4241_11DD_AE16_0800200C9A66
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x20006
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x14000444e
mov r8d, eax
lea rdx, str.CreateUshRegistryEntries:_RegCreateKeyEx:_BcmTokenProviderPath:_FAILED:_STATUS:__d__0x_x__n
mov ecx, 2
call fcn.1400016a0
jmp 0x14000448f
lea rax, [rbp + 0x190]
cmp word [rax + rdi*2 + 2], si
lea rdi, [rdi + 1]
jne 0x140004455
mov rcx, qword [rsp + 0x50]
lea eax, [rdi*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.path
lea rax, [rbp + 0x190]
mov r9d, r14d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rbp + 0x7c0]
xor rcx, rsp
call fcn.140009d20
lea r11, [rsp + 0x8d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret