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

Disassembly:
push rbp
push rbx
push rdi
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0x88
xor eax, eax
mov qword [rbp + 0xf], rax
mov ebx, eax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
mov qword [rbp + 0x27], rax
mov qword [rbp + 0x2f], rax
cmp ecx, 1
jne 0x140003114
or ebx, ecx
mov dword [rbp + 0xf], ebx
call fcn.1400015c0
xor r14d, r14d
mov dword [rbp + 0x7f], 4
mov qword [rsp + 0x40], r14
lea rax, [rbp + 7]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r14d
mov edi, 7
mov dword [rbp + 0x77], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14000319a
mov rcx, qword [rbp + 7]
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rdx, [0x140033b08]
lea rax, [rbp + 0x77]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14000319a
mov edi, dword [rbp + 0x77]
mov rcx, qword [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 1
jne 0x1400031ae
or ebx, 2
jmp 0x1400031c3
cmp edi, 7
jne 0x1400031b8
or ebx, 4
jmp 0x1400031c3
cmp edi, 0xfe
jne 0x1400031c6
or ebx, 8
mov dword [rbp + 0xf], ebx
mov qword [rsp + 0x40], r14
lea rax, [rbp + 7]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r14d
mov dword [rbp + 0x67], r14d
mov ebx, r14d
mov dword [rbp + 0x7f], 4
mov dword [rbp + 0x77], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14000324d
mov rcx, qword [rbp + 7]
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rdx, str.FailedFWUpgradeCount
lea rax, [rbp + 0x77]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x140003251
mov ecx, dword [rbp + 0x77]
mov dword [rbp + 0x67], ecx
jmp 0x140003251
mov dword [rbp + 0x67], r14d
mov rcx, qword [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x140003286
mov ecx, 1
cmp ebx, 2
jne 0x140003277
lea rdx, str.There_is_no_FW_upgrade_count_reg_key_n
call fcn.1400016a0
jmp 0x140003286
mov r8d, ebx
lea rdx, str.Error_reading_FW_upgrade_count_reg_key_rc_d_n
call fcn.1400016a0
cmp dword [rbp + 0x67], 0x14
jb 0x1400032d5
lea rdx, str.Failed._Too_many_failed_FW_upgrades._n_n
mov ecx, 1
call fcn.1400016a0
mov rcx, qword [0x14003d880]
test rcx, rcx
je 0x1400032b5
call fcn.14000ce9c
mov qword [0x14003d880], r14
mov edx, 1
lea rcx, str.Will_not_attempt_to_upgrade_CV_firmware_because_there_were_too_many_failed_firmware_upgrades.
call fcn.140005560
xor eax, eax
add rsp, 0x88
pop r14
pop rdi
pop rbx
pop rbp
ret
lea rdx, [rbp + 0x6f]
mov qword [rsp + 0x80], rsi
lea rcx, [rbp + 0xf]
mov dword [rbp + 0x6f], r14d
call fcn.140001830
mov qword [rsp + 0x40], r14
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
xor r9d, r9d
xor r8d, r8d
test eax, eax
mov esi, eax
lea rax, [rbp + 0x77]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], r14d
je 0x1400033b7
inc dword [rbp + 0x67]
mov ebx, r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140003369
mov rcx, qword [rbp + 0x77]
lea rax, [rbp + 0x67]
mov dword [rsp + 0x28], 4
lea rdx, str.FailedFWUpgradeCount
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r9d, dword [rbp + 0x67]
mov r8d, esi
mov ecx, 1
test ebx, ebx
je 0x140003395
lea rdx, str.Failed._Return_code:__d_Failed_setting_number_of_FW_upgrades_to__d_rc_d_n
mov dword [rsp + 0x20], ebx
call fcn.1400016a0
jmp 0x1400033a1
lea rdx, str.Failed._Return_code:__d_Set_number_of_failed_FW_upgrades_to__d_n_n
call fcn.1400016a0
mov edx, 1
lea rcx, str.CV_firmware_upgrade_failed
call fcn.140005560
jmp 0x1400035cd
mov dword [rbp + 0x67], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400033f0
mov rcx, qword [rbp + 0x77]
lea rax, [rbp + 0x67]
mov dword [rsp + 0x28], 4
lea rdx, str.FailedFWUpgradeCount
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rbp + 0x6f], r14d
je 0x140003488
mov qword [rsp + 0x40], r14
lea rax, [rbp + 0x77]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14000346d
mov rcx, qword [rbp + 0x77]
lea rax, [rbp + 0x6f]
mov dword [rsp + 0x28], 4
lea rdx, [0x140033b08]
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x77]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, 4
lea rcx, str.CV_firmware_upgrade_succeeded
call fcn.140005560
mov qword [rsp + 0x40], r14
lea rax, [rbp + 7]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], r14d
mov edi, r14d
mov dword [rbp + 0x7f], 4
mov dword [rbp + 0x77], r14d
mov ebx, r14d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140003509
mov rcx, qword [rbp + 7]
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x28], rax
lea rdx, str.FirmwareUpgardeStatus
lea rax, [rbp + 0x77]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x140003509
mov edi, dword [rbp + 0x77]
mov rcx, qword [rbp + 7]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x14000353e
mov ecx, 1
cmp ebx, 2
jne 0x14000352f
lea rdx, str.There_is_no_FirmwareUpgardeStatus_reg_key_n
call fcn.1400016a0
jmp 0x14000353e
mov r8d, ebx
lea rdx, str.Error_reading_FirmwareUpgardeStatus_reg_key_rc_d_n
call fcn.1400016a0
cmp edi, 1
jne 0x1400035bc
lea rdx, str.FirmwareUpgardeStatus_value_is_SET._USH_Might_got_FW_upgraded__RE_STARTED._Need_to_do_cvRemainingFwUpgardeSteps_n
mov ecx, edi
call fcn.1400016a0
call fcn.140001e40
mov r8d, eax
lea rdx, str.Remaining_FW_UpgardeSteps_execution_Status_0x_x_n
mov ecx, edi
call fcn.1400016a0
call fcn.1400051c0
test al, al
jne 0x14000359c
lea rdx, str.Re_Install_Drivers_as_PIDs_change_could_cause_issue_due_to_the_new_FW_upgrade__n
mov ecx, edi
call fcn.1400016a0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140003600
lea rdx, str.Re_Install_Drivers_COMPLETED__n
mov ecx, edi
call fcn.1400016a0
lea rcx, str.FirmwareUpgardeStatus
call fcn.140004f40
mov r8d, eax
lea rdx, str.Deleting_FirmwareUpgardeStatus_reg_key._Status_0x_x_n
mov ecx, 1
call fcn.1400016a0
lea rdx, str.Finished_n_n
mov ecx, 1
call fcn.1400016a0
mov rcx, qword [0x14003d880]
test rcx, rcx
je 0x1400035e5
call fcn.14000ce9c
mov qword [0x14003d880], r14
mov eax, esi
mov rsi, qword [rsp + 0x80]
add rsp, 0x88
pop r14
pop rdi
pop rbx
pop rbp
ret