joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18000a3a0
Capabilities:
Find process by pid

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rsi
push rdi
sub rsp, 0x98
mov rax, qword [0x180016030]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0xc0000001
cmp qword [rsp + 0x30], 0
jne 0x18000a40a
mov eax, dword [rsp + 0xb0]
lea rdx, [rsp + 0x30]
mov ecx, eax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jge 0x18000a40a
xor al, al
jmp 0x18000a5ef
lea rax, [rsp + 0x58]
mov rdi, rax
xor eax, eax
mov ecx, 0x30
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_KeAttachProcess]
nop
mov rcx, qword [rsp + 0xc0]
call fcn.180009a90
movzx eax, al
test eax, eax
je 0x18000a5ab
mov eax, dword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc0]
lea rax, [rcx + rax - 1]
mov rcx, rax
call fcn.180009a90
movzx eax, al
test eax, eax
je 0x18000a5ab
mov dword [rsp + 0x24], 0
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x48], rax
cmp dword [0x180020c3c], 0
jne 0x18000a49a
cmp dword [0x180020bfc], 0
je 0x18000a4d0
call fcn.1800024f0
cmp dword [0x180020c3c], 0
je 0x18000a4ad
call fcn.18000fe10
cmp dword [0x180020bfc], 0
je 0x18000a4d0
call fcn.180002a90
btr rax, 0x10
mov rcx, rax
call fcn.180002b90
mov dword [rsp + 0x24], 1
cmp dword [0x180020c3c], 0
jne 0x18000a52f
cmp dword [0x180020bfc], 0
jne 0x18000a4f3
movabs rax, 0x8000000000000000
cmp qword [rsp + 0x40], rax
jb 0x18000a52f
mov r8d, dword [rsp + 0xc8]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.18000adf0
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0xc8]
cmp dword [rsp + 0x38], eax
je 0x18000a525
mov dword [rsp + 0x20], 0xc0000001
jmp 0x18000a52d
mov dword [rsp + 0x20], 0
jmp 0x18000a54c
mov eax, dword [rsp + 0xc8]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
mov dword [rsp + 0x20], 0
cmp dword [0x180020c3c], 0
jne 0x18000a55c
cmp dword [rsp + 0x24], 0
je 0x18000a5ab
mov qword [rsp + 0x50], 0
cmp dword [rsp + 0x24], 0
je 0x18000a57e
call fcn.180002a90
bts rax, 0x10
mov rcx, rax
call fcn.180002b90
cmp dword [0x180020c3c], 0
je 0x18000a596
call fcn.18000fed0
mov qword [rsp + 0x50], rax
call fcn.18000fe70
call fcn.180002500
cmp qword [rsp + 0x50], 0
je 0x18000a5ab
mov dword [rsp + 0x20], 0xc0000001
call qword [sym.imp.ntoskrnl.exe_KeDetachProcess]
jmp 0x18000a5bb
cmp qword [rsp + 0xb8], 0
jne 0x18000a5d1
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
cmp dword [rsp + 0x20], 0
jl 0x18000a5e2
mov dword [rsp + 0x28], 1
jmp 0x18000a5ea
mov dword [rsp + 0x28], 0
movzx eax, byte [rsp + 0x28]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.180012980
add rsp, 0x98
pop rdi
pop rsi
ret
Function at 0x18000a800
Capabilities:
Check os version

Disassembly:
sub rsp, 0x168
mov rax, qword [0x180016030]
xor rax, rsp
mov qword [rsp + 0x150], rax
cmp qword [0x1800160f8], 0
jne 0x18000a8e5
mov dword [rsp + 0x30], 0x114
lea rcx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_RtlGetVersion]
test eax, eax
je 0x18000a845
xor eax, eax
jmp 0x18000a8ec
cmp dword [rsp + 0x34], 0xa
jb 0x18000a8d4
cmp dword [rsp + 0x3c], 0x3839
jb 0x18000a8d4
call fcn.180002ab0
and rax, 0xfffffffffffff000
mov qword [rsp + 0x20], rax
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.ntoskrnl.exe_MmGetVirtualForPhysical]
mov qword [rsp + 0x28], rax
movabs rax, 0xffffff8000000000
mov rcx, qword [rsp + 0x28]
and rcx, rax
mov rax, rcx
mov qword [0x1800160f8], rax
movabs rax, 0x7ffffffff8
mov rcx, qword [0x1800160f8]
add rcx, rax
mov rax, rcx
mov qword [0x180020c20], rax
movabs rax, 0x7b7ffffff8
mov rcx, qword [0x1800160f8]
add rcx, rax
mov rax, rcx
mov qword [0x180020c28], rax
jmp 0x18000a8e5
movabs rax, 0xfffff68000000000
mov qword [0x1800160f8], rax
mov rax, qword [0x1800160f8]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.180012980
add rsp, 0x168
ret
Function at 0x1400f8448
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x1400f8578
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, [0x140034a78]
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 [0x14003f070], ebx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
add rsp, 0x30
pop rbx
ret

Function at 0x140002500
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.14000c770
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 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.140013064
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.140009290
mov rbx, qword [rsp + 0x160]
add rsp, 0x150
pop rdi
ret
Function at 0x1400031b0
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x10], edx
push rsi
sub rsp, 0x50
mov rsi, rcx
test rcx, rcx
jne 0x1400031c9
xor al, al
add rsp, 0x50
pop rsi
ret
xor r8d, r8d
mov qword [rsp + 0x78], rbx
lea rdx, [0x140035c34]
lea rcx, str.current_version.txt
call fcn.1400025d0
mov rbx, rax
test rax, rax
jne 0x1400031f7
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.140012e98
mov rcx, rbx
call fcn.140012360
mov edi, eax
mov rcx, rbx
test eax, eax
jne 0x140003232
call fcn.14000d9bc
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.140012e98
mov rcx, rdi
mov rbp, rdi
call fcn.140011e7c
mov rdi, rax
test rax, rax
jne 0x140003263
mov rcx, rbx
call fcn.14000d9bc
xor al, al
jmp 0x1400032f0
mov r9, rbx
mov r8, rbp
mov edx, 1
mov rcx, rax
call fcn.140013558
mov rcx, rbx
call fcn.14000d9bc
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.140002700
mov rcx, rdi
call fcn.140011e74
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 0x140003370
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 0x1400033db
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.140009290
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 0x14000341b
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 0x1400034b6
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x1400034b6
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 0x140003496
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x14000349a
lea rcx, [0x140035d74]
call fcn.140003310
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 0x140003464
mov eax, dword [rsp + 0x24]
mov ecx, 1
lea rdx, str.Stopped._n
cmp eax, ecx
je 0x1400034b1
lea rdx, str.Failed_to_stop._n
call fcn.1400016a0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x1400034cd
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.140009290
add rsp, 0x50
pop rdi
ret
Function at 0x1400047d0
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.140005510
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140004825
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.140005510
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 0x1400048a0
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.140005510
jmp 0x14000491b
lea rdx, str.Credential_Vault_Upgrade_Service
lea rcx, str.Service__s_installed
call fcn.140005510
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 0x1400048fa
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.140005510
jmp 0x140004906
lea rcx, str.Service_description_is_set
call fcn.140005510
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.Service_installed_successfully....
call fcn.140005510
mov rcx, rbx
mov rbx, qword [rsp + 0x80]
add rsp, 0x70
pop rdi
jmp qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
Function at 0x140004940
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.140005510
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400049a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d
call fcn.140005510
jmp 0x140004a7e
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 0x1400049df
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed__error_code___d
call fcn.140005510
jmp 0x140004a61
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 0x140004a31
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x140004a31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ControlService_failed__error_code___d
call fcn.140005510
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 0x140004a53
lea rcx, str.Service__s_removed
call fcn.140005510
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.140005510
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140009290
add rsp, 0x90
pop rdi
ret
Function at 0x140004f30
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 0x140004f8c
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140004f78
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.WinPE._Will_not_create_USH_Upgrade_Process_thread
call fcn.140005510
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 0x140005011
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 0x140005011
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 0x14000503a
lea rcx, str.Manual_FW_upgrade_only._Will_not_create_USH_Upgrade_Process_thread
call fcn.140005510
mov al, 1
add rsp, 0x50
pop rdi
ret
mov rcx, qword [0x1400402f8]
test rcx, rcx
je 0x14000505c
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x140005099
mov qword [0x1400402f8], rdi
mov qword [rsp + 0x28], rdi
lea r8, [0x1400050f0]
xor r9d, r9d
mov dword [rsp + 0x20], edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x1400402f8], rax
test rax, rax
jne 0x1400050b6
lea rcx, str.USH_Upgrade_Process_thread_creation_failed
call fcn.140005510
xor al, al
add rsp, 0x50
pop rdi
ret
cmp qword [0x1400402f8], rdi
je 0x14000505c
lea rcx, str.Not_created_USH_Upgrade_Process_thread_because_its_already_running
call fcn.140005510
mov al, 1
add rsp, 0x50
pop rdi
ret
lea rcx, str.Created_USH_Upgrade_Process_thread
call fcn.140005510
xor r9d, r9d
mov qword [rsp + 0x28], rdi
lea r8, [0x140005390]
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 0x140005210
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 0x1400052a8
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 0x1400052ac
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x70], eax
jmp 0x1400052ac
mov dword [rsp + 0x70], ebx
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x1400052df
cmp edi, 2
jne 0x1400052d1
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_There_is_no_FW_upgrade_count_reg_key
call fcn.140005510
jmp 0x1400052df
mov edx, edi
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Error_reading_FW_upgrade_count_reg_key_rc_d
call fcn.140005510
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 0x140005350
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 0x140005379
mov r8d, ebx
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Failed_setting_number_of_FW_upgrades_to__d_rc_d
call fcn.140005510
add rsp, 0x58
pop rdi
pop rbx
ret
lea rcx, str.IncreaseNumberOfFailedFWUpgrades:_Set_number_of_failed_FW_upgrades_to__d
call fcn.140005510
add rsp, 0x58
pop rdi
pop rbx
ret
Function at 0x140005670
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x50
xor ebx, ebx
mov dword [rdx], r8d
mov qword [rax - 0x28], rbx
mov esi, r8d
mov dword [rax + 0x18], ebx
mov rdi, rdx
mov dword [rax + 0x10], 4
lea rax, [rax + 0x20]
mov qword [rsp + 0x38], rax
lea rdx, str.SOFTWAREBROADCOMUSHUpgradeService
mov qword [rsp + 0x30], rbx
mov rbp, rcx
mov dword [rsp + 0x28], 0x20019
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 0x140005711
mov rcx, qword [rsp + 0x88]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0x80]
xor r8d, r8d
mov rdx, rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
jne 0x140005713
mov ecx, dword [rsp + 0x80]
mov dword [rdi], ecx
jmp 0x140005713
mov dword [rdi], esi
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret

Function at 0x140005730
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 0x1400057a9
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 0x1400058a0
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 0x1400058ef
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 0x14000592b
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 0x140005979
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x14000595c
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 0x140005990
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 0x1400059da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed__error_code___d_n
call fcn.1400013e0
jmp 0x140005a69
mov r8d, 0xf01ff
lea rdx, str.hoststoragesvc
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x140005a16
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 0x140005a60
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140005a43
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, 1
jmp 0x140005a6b
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.140009290
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret