joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1402536c0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x98
mov rax, qword [0x14036f2b0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov eax, dword [rcx + 0x10]
mov rdi, r9
mov r15, qword [rbp + 0x7f]
mov rsi, r8
mov r14, rdx
mov rbx, rcx
test eax, eax
jne 0x14025370c
mov rcx, qword [rcx + 8]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov eax, dword [rbx + 0x10]
cmp eax, 1
jne 0x14025372b
mov rcx, qword [rbx + 8]
mov r9d, edi
mov r8, rsi
mov qword [rsp + 0x20], r15
mov rdx, r14
call sub.ntdll.dll_NtReadVirtualMemory
mov eax, dword [rbx + 0x10]
cmp eax, 2
jne 0x140253820
mov eax, dword [rbx]
mov edx, 0x9a4
xor eax, 0x8fea0644
mov dword [rbp - 0x31], 0xf601f600
mov dword [rbp - 1], eax
mov eax, 0xfcb3e314
xor r14, rax
mov dword [rbp - 0x2d], 0xf603f670
mov rax, rdi
mov qword [rbp + 7], r14
xor rax, 0x544becbe
mov dword [rbp - 0x29], 0xf613f624
xor r14d, r14d
mov qword [rbp + 0xf], rax
mov dword [rbp - 9], r14d
mov eax, r14d
mov dword [rbp - 0x25], 0xf615f60b
mov dword [rbp - 0x21], 0xf617f601
mov dword [rbp - 0x1d], 0xf612f617
mov dword [rbp - 0x19], 0xf61bf60d
mov dword [rbp - 0x15], 0xf613
mov byte [rbp - 0x11], 1
movzx ecx, ax
sub cx, dx
xor word [rbp + rax*2 - 0x31], cx
inc rax
cmp rax, 0xf
jb 0x1402537a2
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
lea rcx, [rbp - 0x31]
xor edx, edx
mov byte [rbp - 0x11], r14b
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140253820
mov qword [rsp + 0x38], r14
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea r8, [rbp - 1]
mov dword [rsp + 0x28], edi
mov r9d, Ordinal_27
mov edx, 0x22240e
mov qword [rsp + 0x20], rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140253d60
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x140253bc0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x98
mov rax, qword [0x14036f2b0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov eax, dword [rcx + 0x10]
mov rdi, r9
mov r15, qword [rbp + 0x7f]
mov rsi, r8
mov r14, rdx
mov rbx, rcx
test eax, eax
jne 0x140253c0c
mov rcx, qword [rcx + 8]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [rbx + 0x10]
cmp eax, 1
jne 0x140253c2b
mov rcx, qword [rbx + 8]
mov r9d, edi
mov r8, rsi
mov qword [rsp + 0x20], r15
mov rdx, r14
call sub.ntdll.dll_NtWriteVirtualMemory
mov eax, dword [rbx + 0x10]
cmp eax, 2
jne 0x140253d20
mov eax, dword [rbx]
mov edx, 0x9a4
xor eax, 0x8fea0644
mov dword [rbp - 0x31], 0xf601f600
mov dword [rbp - 1], eax
mov eax, 0xfcb3e314
xor r14, rax
mov dword [rbp - 0x2d], 0xf603f670
mov rax, rdi
mov qword [rbp + 7], r14
xor rax, 0x544becbe
mov dword [rbp - 0x29], 0xf613f624
xor r14d, r14d
mov qword [rbp + 0xf], rax
mov dword [rbp - 9], r14d
mov eax, r14d
mov dword [rbp - 0x25], 0xf615f60b
mov dword [rbp - 0x21], 0xf617f601
mov dword [rbp - 0x1d], 0xf612f617
mov dword [rbp - 0x19], 0xf61bf60d
mov dword [rbp - 0x15], 0xf613
mov byte [rbp - 0x11], 1
movzx ecx, ax
sub cx, dx
xor word [rbp + rax*2 - 0x31], cx
inc rax
cmp rax, 0xf
jb 0x140253ca2
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
lea rcx, [rbp - 0x31]
xor edx, edx
mov byte [rbp - 0x11], r14b
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140253d20
mov qword [rsp + 0x38], r14
lea rax, [rbp - 9]
mov qword [rsp + 0x30], rax
lea r8, [rbp - 1]
mov dword [rsp + 0x28], edi
mov r9d, Ordinal_27
mov edx, 0x22240a
mov qword [rsp + 0x20], rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140253d60
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x180017e60
Capabilities:
Execute syscall

Disassembly:
mov r10, rcx
mov eax, 0x23
syscall
ret
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, [0x140032a68]
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 [0x14003d070], ebx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0x30
pop rbx
ret

Function at 0x140002330
Capabilities:
Get common file path
Get program files directory

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x150
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rdi, rdx
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, 0x104
call fcn.14000bc50
xor r9d, r9d
lea rax, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
lea edx, [r9 + 0x26]
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 0x140002390
test eax, eax
je 0x1400023b5
lea ecx, [rax - 1]
movsxd rdx, ecx
movzx r8d, byte [rsp + rdx + 0x30]
cmp r8b, 0x5c
je 0x1400023bd
cmp r8b, 0x2f
je 0x1400023bd
movsxd rdx, eax
mov byte [rsp + rdx + 0x30], 0x5c
lea r8, [rsp + 0x30]
mov edx, 0xff
mov rcx, rdi
call fcn.140011a10
lea rax, [rsp + 0x30]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400023d4
mov eax, ebx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140008770
mov rbx, qword [rsp + 0x160]
add rsp, 0x150
pop rdi
ret
Function at 0x140002f80
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x10], edx
push rsi
sub rsp, 0x50
mov rsi, rcx
test rcx, rcx
jne 0x140002f99
xor al, al
add rsp, 0x50
pop rsi
ret
xor r8d, r8d
mov qword [rsp + 0x78], rbx
lea rdx, [0x140033a7c]
lea rcx, str.current_version
call fcn.140002400
mov rbx, rax
test rax, rax
jne 0x140002fc7
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.140011844
mov rcx, rbx
call fcn.140010d0c
mov edi, eax
mov rcx, rbx
test eax, eax
jne 0x140003002
call fcn.14000ce9c
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.140011844
mov rcx, rdi
mov rbp, rdi
call fcn.140010828
mov rdi, rax
test rax, rax
jne 0x140003033
mov rcx, rbx
call fcn.14000ce9c
xor al, al
jmp 0x1400030c0
mov r9, rbx
mov r8, rbp
mov edx, 1
mov rcx, rax
call fcn.140011f08
mov rcx, rbx
call fcn.14000ce9c
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.140002530
mov rcx, rdi
call fcn.140010820
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 0x140004170
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.140004d40
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400041c5
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.140004d40
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 0x140004240
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.140004d40
jmp 0x1400042bb
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Service__s_installed
call fcn.140004d40
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 0x14000429a
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.140004d40
jmp 0x1400042a6
lea rcx, str.Service_description_is_set
call fcn.140004d40
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Service_installed_successfully....
call fcn.140004d40
mov rcx, rbx
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
Function at 0x1400042e0
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.140004d40
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x140004340
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d
call fcn.140004d40
jmp 0x14000441e
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 0x14000437f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d
call fcn.140004d40
jmp 0x140004401
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 0x1400043d1
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1400043d1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d
call fcn.140004d40
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 0x1400043f3
lea rcx, str.Service__s_removed
call fcn.140004d40
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.140004d40
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140008770
add rsp, 0x90
pop rdi
ret
Function at 0x140004810
Capabilities:
Create thread

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x40]
xor ebx, ebx
mov r9d, 0x20019
mov qword [rsp + 0x40], rbx
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 0x14000486c
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140004858
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.WinPE._Will_not_create_USH_Upgrade_Process_thread
call fcn.140004d40
mov al, 1
add rsp, 0x30
pop rbx
ret
mov rcx, qword [0x14003e2f8]
test rcx, rcx
je 0x14000488e
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1400048cb
mov qword [0x14003e2f8], rbx
mov qword [rsp + 0x28], rbx
lea r8, [0x140004920]
xor r9d, r9d
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14003e2f8], rax
test rax, rax
jne 0x1400048e8
lea rcx, str.USH_Upgrade_Process_thread_creation_failed
call fcn.140004d40
xor al, al
add rsp, 0x30
pop rbx
ret
cmp qword [0x14003e2f8], rbx
je 0x14000488e
lea rcx, str.Not_created_USH_Upgrade_Process_thread_because_its_already_running
call fcn.140004d40
mov al, 1
add rsp, 0x30
pop rbx
ret
lea rcx, str.Created_USH_Upgrade_Process_thread
call fcn.140004d40
xor r9d, r9d
mov qword [rsp + 0x28], rbx
lea r8, [0x140004bc0]
mov dword [rsp + 0x20], ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov al, 1
add rsp, 0x30
pop rbx
ret
Function at 0x140004a40
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 0x140004ad8
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 0x140004adc
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x70], eax
jmp 0x140004adc
mov dword [rsp + 0x70], ebx
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x140004b0f
cmp edi, 2
jne 0x140004b01
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_There_is_no_FW_upgrade_count_reg_key
call fcn.140004d40
jmp 0x140004b0f
mov edx, edi
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Error_reading_FW_upgrade_count_reg_key_rc_d
call fcn.140004d40
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 0x140004b80
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 0x140004ba9
mov r8d, ebx
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Failed_setting_number_of_FW_upgrades_to__d_rc_d
call fcn.140004d40
add rsp, 0x58
pop rdi
pop rbx
ret
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Set_number_of_failed_FW_upgrades_to__d
call fcn.140004d40
add rsp, 0x58
pop rdi
pop rbx
ret
Function at 0x140004ea0
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x50
xor ebx, ebx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x40], rbx
mov rdi, rdx
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], rbx
mov rsi, rcx
mov dword [rsp + 0x28], 0xf003f
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], ebx
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140004f19
mov rcx, qword [rsp + 0x70]
lea r9d, [rbx + 4]
mov dword [rsp + 0x28], 4
xor r8d, r8d
mov rdx, rsi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rsi, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret

Function at 0x140004f40
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
mov rdi, rcx
lea rax, [rsp + 0x48]
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
xor r8d, r8d
xor ebx, ebx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004faa
mov rcx, qword [rsp + 0x48]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov ebx, eax
test eax, eax
je 0x140004fb8
cmp eax, 2
jne 0x140004fa1
lea rcx, str.DeleteRegKey_Key_didnt_exist_n
call fcn.1400013e0
jmp 0x140004fb8
lea rcx, str.DeleteRegKey_RegDeleteValue_failed__nError___d_n
jmp 0x140004fb1
lea rcx, str.DeleteRegKey_RegOpenKeyEx_failed__lRes___d_n
mov edx, eax
call fcn.1400013e0
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret
Function at 0x140004fd0
Capabilities:
Start service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
lea rcx, str.Inside_RunService_...._n
call fcn.1400013e0
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x14000501f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013e0
xor al, al
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov r8d, 0xf01ff
lea rdx, str.hoststoragesvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000505b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.hoststoragesvc
lea rcx, str.OpenService__S_for_running_failed__error_code___d_n
call fcn.1400013e0
jmp 0x1400050a9
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x14000508c
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.StartService_failed__error_code___d_n
call fcn.1400013e0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x30]
xor al, al
add rsp, 0x20
pop rdi
ret

Function at 0x1400050c0
Capabilities:
Stop service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x50
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x14000510a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013e0
jmp 0x140005199
mov r8d, 0xf01ff
lea rdx, str.hoststoragesvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140005146
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.hoststoragesvc
lea rcx, str.OpenService__S_for_stopping_failed__error_code___d_n
call fcn.1400013e0
jmp 0x140005190
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140005173
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x14000519b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d_n
call fcn.1400013e0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140008770
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret
Function at 0x140005220
Capabilities:
Get common file path
Get program files directory

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x150
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rdi, rdx
lea rcx, [rsp + 0x30]
xor edx, edx
mov r8d, 0x104
call fcn.14000bc50
xor r9d, r9d
lea rax, [rsp + 0x30]
xor r8d, r8d
mov qword [rsp + 0x20], rax
xor ecx, ecx
lea edx, [r9 + 0x26]
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 0x140005280
test eax, eax
je 0x1400052a5
lea ecx, [rax - 1]
movsxd rdx, ecx
movzx r8d, byte [rsp + rdx + 0x30]
cmp r8b, 0x5c
je 0x1400052ad
cmp r8b, 0x2f
je 0x1400052ad
movsxd rdx, eax
mov byte [rsp + rdx + 0x30], 0x5c
lea r8, [rsp + 0x30]
mov edx, 0xff
mov rcx, rdi
call fcn.140011a10
lea rax, [rsp + 0x30]
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400052c4
mov eax, ebx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140008770
mov rbx, qword [rsp + 0x160]
add rsp, 0x150
pop rdi
ret