joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001480
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x30
xor ebx, ebx
mov dword [rsp + 0x40], 4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x50], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x140035a98]
mov rcx, 0xffffffff80000002
lea r9d, [rbx + 1]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140001503
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.Log_Enable
lea rax, [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [rsp + 0x48], 1
mov rcx, qword [rsp + 0x50]
sete bl
mov dword [0x140041070], ebx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0x30
pop rbx
ret

Function at 0x140002500
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x150
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rdi, rdx
mov ebx, ecx
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x104
call fcn.14000d200
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
or rbx, 0xffffffffffffffff
lea rcx, [rsp + 0x30]
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140002560
test eax, eax
je 0x140002585
lea ecx, [rax - 1]
movsxd rdx, ecx
movzx r8d, byte [rsp + rdx + 0x30]
cmp r8b, 0x5c
je 0x14000258d
cmp r8b, 0x2f
je 0x14000258d
movsxd rdx, eax
mov byte [rsp + rdx + 0x30], 0x5c
lea r8, [rsp + 0x30]
mov edx, 0xff
mov rcx, rdi
call fcn.140013af4
lea rax, [rsp + 0x30]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400025a4
mov eax, ebx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140009d20
mov rbx, qword [rsp + 0x170]
add rsp, 0x150
pop rdi
ret
Function at 0x1400031a0
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x10], edx
push rsi
sub rsp, 0x50
mov rsi, rcx
test rcx, rcx
jne 0x1400031b9
xor al, al
add rsp, 0x50
pop rsi
ret
xor r8d, r8d
mov qword [rsp + 0x78], rbx
lea rdx, [0x140036c44]
lea rcx, str.current_version.txt
call fcn.1400025d0
mov rbx, rax
test rax, rax
jne 0x1400031e7
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rsi
ret
xor edx, edx
mov qword [rsp + 0x40], rdi
mov rcx, rax
lea r8d, [rdx + 2]
call fcn.140013928
mov rcx, rbx
call fcn.140012df0
mov edi, eax
mov rcx, rbx
test eax, eax
jne 0x140003222
call fcn.14000e44c
mov rdi, qword [rsp + 0x40]
xor al, al
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rsi
ret
xor r8d, r8d
mov qword [rsp + 0x48], rbp
xor edx, edx
call fcn.140013928
mov rcx, rdi
mov rbp, rdi
call fcn.14001290c
mov rdi, rax
test rax, rax
jne 0x140003253
mov rcx, rbx
call fcn.14000e44c
xor al, al
jmp 0x1400032e0
mov r9, rbx
mov r8, rbp
mov edx, 1
mov rcx, rax
call fcn.140013fe8
mov rcx, rbx
call fcn.14000e44c
lea rax, [rsp + 0x68]
mov rcx, rdi
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x70]
lea rdx, str._x__x__x
call fcn.1400026f0
mov rcx, rdi
call fcn.140012904
mov eax, dword [rsp + 0x60]
mov edx, eax
mov r8d, dword [rsp + 0x68]
mov ecx, eax
shr ecx, 0xc
and edx, 0xfff
shr r8d, 0x18
and ecx, 0xf
mov dword [rsp + 0x30], r8d
lea r8, str._x._x._x._x
mov dword [rsp + 0x28], edx
mov edx, 0x20
shr eax, 0x10
mov dword [rsp + 0x20], ecx
mov rcx, rsi
movzx r9d, al
call fcn.1400011f0
mov al, 1
mov rbp, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x78]
add rsp, 0x50
pop rsi
ret
Function at 0x140003360
Capabilities:
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x50
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
lea r8d, [rax + 1]
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400033cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenSCManager_failed_w_err_0x_08lx._n
lea ecx, [rdi + 1]
call fcn.1400016a0
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140009d20
add rsp, 0x50
pop rdi
ret
mov r8d, 0x24
mov qword [rsp + 0x60], rbx
lea rdx, str.WbioSrvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000340b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenService_failed_w_err_0x_08lx_n
lea ecx, [rbx + 1]
call fcn.1400016a0
jmp 0x1400034a6
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400034a6
lea rdx, str.Attempting_to_Stop_the_service_..._n
mov ecx, 1
call fcn.1400016a0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140003486
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x14000348a
lea rcx, [0x140036d84]
call fcn.140003300
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140003454
mov eax, dword [rsp + 0x24]
mov ecx, 1
lea rdx, str.Stopped._n
cmp eax, ecx
je 0x1400034a1
lea rdx, str.Failed_to_stop._n
call fcn.1400016a0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x1400034bd
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140009d20
add rsp, 0x50
pop rdi
ret
Function at 0x1400044d0
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Query environment variable

Disassembly:
push rbx
sub rsp, 0xac0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0xab0], rax
mov ebx, 0x30
lea rcx, [rsp + 0x272]
xor edx, edx
mov word [rsp + 0x270], bx
mov r8d, 0x206
call fcn.14000d200
mov r8d, 0x104
lea rdx, [rsp + 0x690]
lea rcx, str._SystemDrive_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor edx, edx
lea rcx, [rsp + 0x270]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rsp + 0x690]
mov edx, 0x104
lea r8, str._sProgramDataBroadcom_
lea rcx, [rsp + 0x270]
call fcn.140004b40
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140004575
test al, 0x10
jne 0x140004585
xor edx, edx
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor edx, edx
lea rcx, [rsp + 0x270]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rsp + 0x690]
mov edx, 0x104
lea r8, str._sProgramDataBroadcomHostStorage_
lea rcx, [rsp + 0x270]
call fcn.140004b40
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400045d2
test al, 0x10
jne 0x1400045e2
xor edx, edx
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor edx, edx
mov word [rsp + 0x480], bx
mov r8d, 0x206
lea rcx, [rsp + 0x482]
call fcn.14000d200
mov r8d, 0x104
lea rdx, [rsp + 0x8a0]
lea rcx, str._SystemRoot_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea r9, [rsp + 0x8a0]
mov edx, 0x104
lea r8, str._sSystem32BcmNfcRM.dll
lea rcx, [rsp + 0x480]
call fcn.140004b40
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400046a2
lea rcx, [rsp + 0x480]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140004699
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.FilesAndFoldersSetup:_BcmNfcRM:_File_Deletion_error:__d__0x_x__n
mov ecx, 2
mov r8d, eax
call fcn.1400016a0
mov r8d, dword [rsp + 0x20]
lea rdx, str.FilesAndFoldersSetup:_BcmNfcRM:_File_Info:__d__0x_x__n
mov ecx, 2
call fcn.1400016a0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0xab0]
xor rcx, rsp
call fcn.140009d20
add rsp, 0xac0
pop rbx
ret
Function at 0x1400046c0
Capabilities:
Check if file exists
Delete directory
Get file attributes
Query environment variable

Disassembly:
push rbp
lea rbp, [rsp - 0x350]
sub rsp, 0x450
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x340], rax
xor edx, edx
lea rcx, [rbp + 0x130]
mov r8d, 0x208
call fcn.14000d200
mov r8d, 0x104
lea rdx, [rbp + 0x130]
lea rcx, str._programfiles_
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rbp + 0x130]
mov edx, 0x104
lea r8, str._sBroadcomCV
lea rcx, [rsp + 0x20]
call fcn.140004b40
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140004874
test al, 0x10
je 0x140004874
lea rdx, str.Non_DCH_Binaries_EXIST._Cleaning_Up_Non_DCH_binaries_n
mov ecx, 1
call fcn.1400016a0
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rbp + 0x130]
mov edx, 0x104
lea r8, str._sBroadcomCVBin
lea rcx, [rsp + 0x20]
call fcn.140004b40
lea rcx, [rsp + 0x20]
call fcn.1400048a0
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rbp + 0x130]
mov edx, 0x104
lea r8, str._sBroadcomCV
lea rcx, [rsp + 0x20]
call fcn.140004b40
lea rcx, [rsp + 0x20]
call fcn.1400048a0
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rbp + 0x130]
mov edx, 0x104
lea r8, str._sBroadcomUSHFirmware
lea rcx, [rsp + 0x20]
call fcn.140004b40
lea rcx, [rsp + 0x20]
call fcn.1400048a0
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x104
call fcn.14000d200
lea r9, [rbp + 0x130]
mov edx, 0x104
lea r8, str._sBroadcom
lea rcx, [rsp + 0x20]
call fcn.140004b40
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x140004885
lea rdx, str.Non_DCH_Binaries_DOES_NOT_EXIST_n
mov ecx, 1
call fcn.1400016a0
mov rcx, qword [rbp + 0x340]
xor rcx, rsp
call fcn.140009d20
add rsp, 0x450
pop rbp
ret

Function at 0x1400048a0
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x4a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov rdi, rcx
lea r8, str._s.
mov r9, rcx
mov edx, 0x104
lea rcx, [rsp + 0x280]
call fcn.140004b40
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rbx, rax
nop dword [rax]
nop dword [rax + rax]
xor edx, edx
lea rcx, [rsp + 0x280]
mov r8d, 0x104
call fcn.14000d200
lea rax, [rsp + 0x5c]
mov r9, rdi
lea r8, str._s_s
mov qword [rsp + 0x20], rax
mov edx, 0x104
lea rcx, [rsp + 0x280]
call fcn.140004b40
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140004900
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140009d20
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x4a0
pop rdi
ret
Function at 0x140004990
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x50
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
mov rbx, rcx
xor ecx, ecx
mov qword [rsp + 0x20], rax
xor edx, edx
mov qword [rsp + 0x28], rax
mov r8d, 0xf003f
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400049f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.OpenSCManager_failed_w_err_0x_08lx._n
lea ecx, [rdi + 2]
call fcn.1400016a0
jmp 0x140004b28
mov r8d, 0x10024
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140004a34
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x140004a34
mov r8d, eax
lea rdx, str.OpenService_failed_w_err_0x_08lx_n
lea ecx, [rbx + 2]
call fcn.1400016a0
jmp 0x140004b11
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140004b11
lea rdx, str.Attempting_to_Stop_the_service_..._n
mov ecx, 1
call fcn.1400016a0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140004ab2
nop dword [rax]
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x140004ab6
lea rcx, [0x140036d84]
call fcn.140003300
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140004a80
mov eax, dword [rsp + 0x24]
cmp eax, 1
jne 0x140004b00
lea rdx, str.Stopped._n
mov ecx, eax
call fcn.1400016a0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140004af2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.DeleteService_failed_w_err_0x_08lx_n
mov ecx, 2
mov r8d, eax
call fcn.1400016a0
jmp 0x140004b11
lea rdx, str.Service_deleted_successfully_n
mov ecx, 1
jmp 0x140004b0c
lea rdx, str.Failed_to_stop._n
mov ecx, 2
call fcn.1400016a0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x140004b28
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140009d20
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x140005230
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rdi
sub rsp, 0x70
mov rdi, rcx
lea rcx, str.Inside_InstallService....
call fcn.140005f70
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140005285
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code__0x_x
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp fcn.140005f70
xor eax, eax
lea r8, str.Credential_Vault_Upgrade_Service
mov qword [rsp + 0x60], rax
lea rdx, str.Credential_Vault_Upgrade_Service
mov qword [rsp + 0x58], rax
mov r9d, 0xf01ff
mov qword [rsp + 0x50], rax
mov rcx, rbx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x110
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140005300
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Failed_to_create_service__s__error_code__0x_x
call fcn.140005f70
jmp 0x14000537b
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Service__s_installed
call fcn.140005f70
lea rax, str.USH_Upgrade_Service_for_upgrading_all_USH_components
mov edx, 1
lea r8, [rsp + 0x88]
mov qword [rsp + 0x88], rax
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000535a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Failed_to_change_the_service_description___s__error_code__0x_x
call fcn.140005f70
jmp 0x140005366
lea rcx, str.Service_description_is_set
call fcn.140005f70
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Service_installed_successfully....
call fcn.140005f70
mov rcx, rbx
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
Function at 0x1400053a0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x90
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
lea rcx, str.Inside_uninstall_service....
mov dword [rsp + 0x30], 0
call fcn.140005f70
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140005400
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d
call fcn.140005f70
jmp 0x1400054de
mov r8d, 0xf01ff
mov qword [rsp + 0xa0], rbx
lea rdx, str.Credential_Vault_Upgrade_Service
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000543f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d
call fcn.140005f70
jmp 0x1400054c1
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
cmp dword [rsp + 0x3c], 1
je 0x140005491
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140005491
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d
call fcn.140005f70
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Failed_to_delete_service__s
test eax, eax
je 0x1400054b3
lea rcx, str.Service__s_removed
call fcn.140005f70
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Service_uninstalled_successfully....
call fcn.140005f70
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140009d20
add rsp, 0x90
pop rdi
ret
Function at 0x140005990
Capabilities:
Create thread
Query or enumerate registry value

Disassembly:
push rdi
sub rsp, 0x50
lea rax, [rsp + 0x60]
xor edi, edi
mov r9d, 0x20019
mov qword [rsp + 0x60], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinPE
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400059ec
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400059d8
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.WinPE._Will_not_create_USH_Upgrade_Process_thread
call fcn.140005f70
mov al, 1
add rsp, 0x50
pop rdi
ret
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x20019
xor r8d, r8d
mov qword [rsp + 0x78], rbx
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], edi
mov ebx, edi
mov dword [rsp + 0x68], 4
mov dword [rsp + 0x60], edi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140005a71
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rdx, str.ManualFirmwareUpgradeOnly
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140005a71
mov ebx, dword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, 1
mov rbx, qword [rsp + 0x78]
jne 0x140005a9a
lea rcx, str.Manual_FW_upgrade_only._Will_not_create_USH_Upgrade_Process_thread
call fcn.140005f70
mov al, 1
add rsp, 0x50
pop rdi
ret
mov rcx, qword [0x1400422f8]
test rcx, rcx
je 0x140005abc
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x140005af9
mov qword [0x1400422f8], rdi
mov qword [rsp + 0x28], rdi
lea r8, [0x140005b50]
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x1400422f8], rax
test rax, rax
jne 0x140005b16
lea rcx, str.USH_Upgrade_Process_thread_creation_failed
call fcn.140005f70
xor al, al
add rsp, 0x50
pop rdi
ret
cmp qword [0x1400422f8], rdi
je 0x140005abc
lea rcx, str.Not_created_USH_Upgrade_Process_thread_because_its_already_running
call fcn.140005f70
mov al, 1
add rsp, 0x50
pop rdi
ret
lea rcx, str.Created_USH_Upgrade_Process_thread
call fcn.140005f70
xor r9d, r9d
mov qword [rsp + 0x28], rdi
lea r8, [0x140005df0]
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov al, 1
add rsp, 0x50
pop rdi
ret
Function at 0x140005c70
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbx
push rdi
sub rsp, 0x58
xor ebx, ebx
mov dword [rax + 0x18], 4
mov qword [rax - 0x28], rbx
xor r9d, r9d
mov dword [rax + 8], ebx
xor r8d, r8d
mov dword [rax + 0x10], ebx
lea rax, [rax + 0x20]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], rbx
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0x20019
mov edi, ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140005d08
mov rcx, qword [rsp + 0x88]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x28], rax
lea rdx, str.FailedFWUpgradeCount
lea rax, [rsp + 0x78]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
jne 0x140005d0c
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x70], eax
jmp 0x140005d0c
mov dword [rsp + 0x70], ebx
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x140005d3f
cmp edi, 2
jne 0x140005d31
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_There_is_no_FW_upgrade_count_reg_key
call fcn.140005f70
jmp 0x140005d3f
mov edx, edi
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Error_reading_FW_upgrade_count_reg_key_rc_d
call fcn.140005f70
inc dword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x40], rbx
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], rbx
xor r8d, r8d
mov dword [rsp + 0x28], 0xf003f
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140005db0
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x70]
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 [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [rsp + 0x70]
test ebx, ebx
je 0x140005dd9
mov r8d, ebx
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Failed_setting_number_of_FW_upgrades_to__d_rc_d
call fcn.140005f70
add rsp, 0x58
pop rdi
pop rbx
ret
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Set_number_of_failed_FW_upgrades_to__d
call fcn.140005f70
add rsp, 0x58
pop rdi
pop rbx
ret