joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140002440
Capabilities:
Get uefi variable

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x60
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x58], rax
lea rcx, str.getAddrFromUEFI__Enter___n
call fcn.14000f070
lea rcx, str.getAddrFromUEFI__enable_privilege_n
xor edi, edi
mov qword [rsp + 0x40], rdi
call fcn.14000f070
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
lea edx, [rdi + 0x28]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1400024a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__OpenProcessToken_error:__u_n
jmp 0x1400025d2
lea r8, [rsp + 0x4c]
lea rdx, str.SeSystemEnvironmentPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1400024cf
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__LookupPrivilegeValue_error:__u_n
jmp 0x1400025d2
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x48]
mov ebx, 1
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x54], 2
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140002515
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__AdjustTokenPrivileges_enable__error:__u_n
jmp 0x1400025d2
lea r8, [0x1400460e8]
lea rdx, str.A480770A_2077_41F2_8D50_72699BB24BA3
lea rcx, str.BDADDR
mov r9d, 6
call qword [sym.imp.KERNEL32.dll_GetFirmwareEnvironmentVariableW]
test eax, eax
jne 0x14000254c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__fail_to_get_BIOS_BT_address__error:__u_n
jmp 0x1400025d2
movzx ecx, byte [0x1400460ec]
movzx eax, byte [0x1400460ed]
movzx r10d, byte [0x1400460eb]
movzx r9d, byte [0x1400460ea]
movzx r8d, byte [0x1400460e9]
movzx edx, byte [0x1400460e8]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ecx
lea rcx, str.getAddrFromUEFI__UEFI_addr_0x_02x_0x_02x_0x_02x_0x_02x_0x_02x_0x_02x_n
mov dword [rsp + 0x20], r10d
call fcn.14000f070
lea rcx, str.getAddrFromUEFI__disable_privilege_n
call fcn.14000f070
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x48]
xor r9d, r9d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x54], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1400025db
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__AdjustTokenPrivileges_disable__error:__u_n
mov edx, eax
call fcn.14000f070
mov ebx, edi
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140002605
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140002605
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.getAddrFromUEFI__CloseHandle_hToken__error:__u_n
mov edx, eax
call fcn.14000f070
mov ebx, edi
lea rcx, str.getAddrFromUEFI__leave___n
call fcn.14000f070
mov eax, ebx
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14001a650
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rdi
ret
Function at 0x1400027e0
Capabilities:
Query or enumerate registry value

Disassembly:
push rsi
sub rsp, 0x2a0
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x290], rax
xor esi, esi
lea rcx, [rsp + 0x82]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x50], esi
mov word [rsp + 0x80], si
call fcn.14001dd20
lea rax, [rsp + 0x78]
lea rdx, str.SoftwareAtheros
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x60], 4
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400028a0
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x60]
lea rdx, str.EnableServiceDebug
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x50], esi
je 0x140002a20
lea r8, str.C:AthSvc
lea rcx, [rsp + 0x80]
mov edx, 0x104
mov qword [rsp + 0x2b0], rbx
mov qword [rsp + 0x2b8], rdi
call fcn.14001af54
lea rax, [rsp + 0x7c]
lea rdx, str.SoftwareAtheros
xor r9d, r9d
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov rcx, 0xffffffff80000002
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x58], 0x208
mov dword [rsp + 0x20], esi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140002958
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x58]
lea rdx, str.ServiceLogPath
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x80]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x140044974], eax
mov ebx, eax
je 0x140002995
nop dword [rax + rax]
xor eax, eax
lock cmpxchg dword [0x140044974], ebx
cmp dword [0x140044974], ebx
je 0x140002995
mov ecx, 0x19
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x140044974], ebx
jne 0x140002970
lea rcx, [rsp + 0x80]
call fcn.14001a270
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lock cmpxchg dword [0x140044974], esi
mov edi, dword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x140044974], eax
mov ebx, eax
je 0x1400029f5
nop word [rax + rax]
xor eax, eax
lock cmpxchg dword [0x140044974], ebx
cmp dword [0x140044974], ebx
je 0x1400029f5
mov ecx, 0x19
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x140044974], ebx
jne 0x1400029d0
mov eax, esi
test edi, edi
cmovg eax, edi
mov dword [0x140044970], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lock cmpxchg dword [0x140044974], esi
mov rdi, qword [rsp + 0x2b8]
mov rbx, qword [rsp + 0x2b0]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.14001a650
add rsp, 0x2a0
pop rsi
ret
Function at 0x140002a40
Capabilities:
Print debug messages
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x260
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x250], rax
movups xmm0, xmmword [str.SOFTWAREAtherosVistaAddOn]
movups xmm1, xmmword [0x140031e58]
lea rcx, [rsp + 0x78]
xor edx, edx
mov r8d, 0x1d0
xor ebx, ebx
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [0x140031e68]
movsd xmm1, qword [0x140031e78]
movaps xmmword [rsp + 0x60], xmm0
movsd qword [rsp + 0x70], xmm1
call fcn.14001dd20
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x34], 4
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002b4e
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea rdx, str.SwitchRadio
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140002b43
cmp dword [rsp + 0x30], 2
jne 0x140002b43
lea rcx, str.reset_radio_off_status.__r_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rcx, str.Enter_Function_DisableRadioHandler__n_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [0x140045ce0]
mov ebx, 1
mov r8d, ebx
xor r9d, r9d
mov edx, 0x5e5d
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14001a650
add rsp, 0x260
pop rbx
ret

Function at 0x140002b70
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x268
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x250], rax
movups xmm0, xmmword [str.SOFTWAREAtherosVistaAddOn]
movups xmm1, xmmword [0x140031e58]
lea rcx, [rsp + 0x78]
xor edx, edx
mov r8d, 0x1d0
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [0x140031e68]
movsd xmm1, qword [0x140031e78]
movaps xmmword [rsp + 0x60], xmm0
movsd qword [rsp + 0x70], xmm1
call fcn.14001dd20
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002c3d
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea rdx, str.SwitchRadio
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [rsp + 0x30]
lea rcx, str.The_value_of_SwitchRadio_is__d
call fcn.14000f070
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14001a650
add rsp, 0x268
ret
Function at 0x140002c70
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x268
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x250], rax
movups xmm0, xmmword [str.SOFTWAREAtherosVistaAddOn]
movups xmm1, xmmword [0x140031e58]
lea rcx, [rsp + 0x78]
xor edx, edx
mov r8d, 0x1d0
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [0x140031e68]
movsd xmm1, qword [0x140031e78]
movaps xmmword [rsp + 0x60], xmm0
movsd qword [rsp + 0x70], xmm1
call fcn.14001dd20
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140002d3d
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea rdx, str.ReplaceTrayIconDisabled
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [rsp + 0x30]
lea rcx, str.The_value_of_ReplaceTrayIconDisabled_is__d
call fcn.14000f070
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14001a650
add rsp, 0x268
ret

Function at 0x140002d70
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
sub rsp, 0x30
mov rbp, rcx
lea rcx, str.CommApi.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
je 0x140002e40
mov qword [rsp + 0x40], rsi
lea rcx, str.Successfully_load_CommApi.dll_n_n
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], r12
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea rdx, str.InitApi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.CallApi
mov rcx, rbx
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.UnInitApi
mov rcx, rbx
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test r12, r12
je 0x140002e28
test rdi, rdi
je 0x140002e28
test rax, rax
je 0x140002e28
call rdi
movups xmm0, xmmword [0x140030df0]
lea rcx, [rsp + 0x20]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
movaps xmmword [rsp + 0x20], xmm0
call r12
call rsi
lea rcx, str.Successfully_fire_message_to_btvstack_n_n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov r12, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rbp
ret
Function at 0x140003180
Capabilities:
Create thread
Print debug messages
Resume thread

Disassembly:
sub rsp, 0x38
lea rcx, str.Enter_Function_StartCustomThread____n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp qword [0x140045cd8], 0
je case.default.0x1400031a6
lea rcx, str.Enter_condition_pSvc__hWorkEvent___NULL__n
add rsp, 0x38
jmp qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
mov qword [0x140045cd8], rax
call qword [sym.imp.KERNEL32.dll_CreateEventW]
lea r8, [0x1400106f0]
xor r9d, r9d
mov qword [0x140045ce8], rax
lea rax, [0x140045ce0]
xor edx, edx
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140045cd0], rax
test rax, rax
je 0x140003227
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov qword [0x140045cd0], 0
mov ecx, dword [0x140045ce0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x140045cd8]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140003292
lea rdx, str.Create_Thread_fails__n
mov ecx, 1
call fcn.14001a330
mov ecx, dword [0x140045ce0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5b
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov rcx, qword [0x140045cd8]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140003254
call fcn.14000a4e0
cmp eax, 0x14
je 0x1400032b0
call fcn.14000a4e0
cmp eax, 0x1e
je 0x1400032b0
call fcn.14000a4e0
cmp eax, 0x28
jne 0x1400032ed
cmp qword [0x140045cf0], 0
jne 0x1400032ed
lea rax, [0x140045cf8]
lea r9, [0x140045c90]
lea r8, [0x140002e50]
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x140045cf0], rax
add rsp, 0x38
ret
Function at 0x140003300
Capabilities:
Print debug messages
Terminate thread

Disassembly:
sub rsp, 0x38
mov qword [rsp + 0x20], 0xfffffffffffffffe
lea rcx, str.Enter_Function_StopCustomThread____n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.14000a4e0
cmp eax, 0x14
je 0x140003338
call fcn.14000a4e0
cmp eax, 0x1e
je 0x140003338
call fcn.14000a4e0
cmp eax, 0x28
jne 0x140003377
cmp qword [0x140045cf0], 0
je 0x140003377
lea rcx, str.TerminateThread_pSvc__hTimerThread__0___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
mov rcx, qword [0x140045cf0]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
nop
mov rcx, qword [0x140045cf0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140045cf0], 0
cmp qword [0x140046110], 0
je 0x1400033b6
lea rcx, str.TerminateThread_g_hS3S4CheckThread__0___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
mov rcx, qword [0x140046110]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
nop
mov rcx, qword [0x140046110]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140046110], 0
mov rcx, qword [0x140045cd0]
test rcx, rcx
je 0x140003441
mov dword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [rsp + 0x40], 0x103
jne 0x140003441
xor r9d, r9d
xor r8d, r8d
mov edx, 0x5e5c
mov ecx, dword [0x140045ce0]
call qword [sym.imp.USER32.dll_PostThreadMessageW]
mov edx, 0x2710
mov rcx, qword [0x140045cd0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x140003429
lea rcx, str.TerminateThread_pSvc__hCustomThread__0___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edx, edx
mov rcx, qword [0x140045cd0]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
nop
mov rcx, qword [0x140045cd0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140045cd0], 0
mov rcx, qword [0x140045cd8]
test rcx, rcx
je 0x14000345e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140045cd8], 0
mov rcx, qword [0x140045ce8]
test rcx, rcx
je 0x14000347b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x140045ce8], 0
add rsp, 0x38
ret
Function at 0x1400036d0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x440]
sub rsp, 0x540
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rbp + 0x430], rax
mov rax, qword [rcx]
movaps xmm0, xmmword [str.SOFTWAREAtherosVistaAddOnSupported]
movaps xmm1, xmmword [0x140033be0]
mov qword [rbp - 0x80], rax
mov rax, qword [rcx + 8]
lea rcx, [rbp + 0x5c]
movaps xmmword [rbp + 0x10], xmm0
movaps xmm0, xmmword [0x140033bf0]
movaps xmmword [rbp + 0x20], xmm1
mov qword [rbp - 0x78], rax
mov eax, dword [0x140033c18]
xor edx, edx
movaps xmm1, xmmword [0x140033c00]
movaps xmmword [rbp + 0x30], xmm0
mov r8d, 0x1bc
mov dword [rbp + 0x58], eax
movsd xmm0, qword [0x140033c10]
movsd qword [rbp + 0x50], xmm0
movaps xmmword [rbp + 0x40], xmm1
call fcn.14001dd20
xor edi, edi
lea rcx, [rbp + 0x222]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x60], edi
mov dword [rsp + 0x64], 8
mov word [rbp + 0x220], di
call fcn.14001dd20
lea r8d, [rdi + 0x40]
lea rdx, [rbp - 0x70]
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x70], 4
call qword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
je 0x140003814
lea rax, [rsp + 0x68]
lea r9d, [rdi + 1]
lea rdx, [rbp + 0x10]
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003814
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x14000381b
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x1400038cb
mov qword [rsp + 0x558], rbx
mov ebx, edi
cmp dword [rsp + 0x60], ebx
jbe 0x1400038b6
nop
lea rcx, [rbp + 0x220]
xor edx, edx
mov r8d, 0x208
call fcn.14001dd20
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x74]
lea r9, [rsp + 0x64]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x78]
lea r8, [rbp + 0x220]
mov qword [rsp + 0x28], rax
mov edx, ebx
mov dword [rsp + 0x64], 0x104
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x1400038a7
lea rdx, [rbp + 0x220]
lea rcx, [rbp - 0x70]
call fcn.14001a900
test eax, eax
jne 0x1400038a7
cmp dword [rsp + 0x74], 1
je 0x1400038b1
inc ebx
cmp ebx, dword [rsp + 0x60]
jb 0x140003830
jmp 0x1400038b6
mov edi, 1
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rbx, qword [rsp + 0x558]
mov eax, edi
mov rcx, qword [rbp + 0x430]
xor rcx, rsp
call fcn.14001a650
mov rdi, qword [rsp + 0x560]
add rsp, 0x540
pop rbp
ret
Function at 0x1400054b0
Capabilities:
Create thread
Print debug messages

Disassembly:
push rbx
sub rsp, 0x30
sub ecx, 4
je 0x140005561
sub ecx, 3
je 0x1400054d5
dec ecx
je 0x1400054e2
cmp ecx, 0xa
je 0x1400054e2
xor eax, eax
add rsp, 0x30
pop rbx
ret
lea rcx, str.Enter_case_PBT_APMRESUMESUSPEND__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [0x140046104], 0
jne 0x1400055ad
lea rcx, str.System_resume_from_S3_S4__n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call fcn.14000a4e0
cmp eax, 0x14
je 0x14000551a
call fcn.14000a4e0
cmp eax, 0x1e
je 0x14000551a
call fcn.14000a4e0
cmp eax, 0x28
jne 0x140005528
xor ebx, ebx
mov dword [0x140045d00], ebx
mov dword [0x140045cfc], ebx
call fcn.140002a40
mov dword [0x140046104], 1
mov dword [0x1400460f8], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x1400460fc], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x140046118], eax
xor eax, eax
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
lea r8, [0x140003060]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
mov qword [0x140046110], rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.System_enter_S3_S4__n
mov dword [0x140046108], 1
mov dword [0x140046104], ebx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
add rsp, 0x30
pop rbx
ret

Function at 0x1400055c0
Capabilities:
Get file version info

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r12
sub rsp, 0x50
mov r12, rcx
mov r8d, 0x208
xor ecx, ecx
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdx, [rsp + 0x40]
xor ebx, ebx
mov rcx, rsi
mov dword [rsp + 0x40], ebx
call qword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov ebp, eax
test eax, eax
je 0x1400056bc
lea ecx, [rbx + 2]
mov edx, ebp
mov qword [rsp + 0x80], rdi
mov dword [rsp + 0x44], ebx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [rsp + 0x40]
mov r8d, ebp
mov r9, rax
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.VERSION.dll_GetFileVersionInfoW]
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x48]
lea rdx, [0x140031b30]
mov rcx, rbx
call qword [sym.imp.VERSION.dll_VerQueryValueW]
mov r11, qword [rsp + 0x48]
mov rcx, r12
movzx edx, word [r11 + 0x16]
movzx r8d, word [r11 + 0x10]
movzx eax, word [r11 + 0x14]
movzx r9d, word [r11 + 0x12]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x20], r8d
lea r8, str._d._d._d._d
mov edx, 0x104
call fcn.14001a734
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rdi, qword [rsp + 0x80]
mov eax, 1
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r12
pop rsi
pop rbp
ret
xor eax, eax
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r12
pop rsi
pop rbp
ret
Function at 0x140006d00
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
push rbx
sub rsp, 0x4b0
mov rax, qword [0x140043468]
xor rax, rsp
mov qword [rsp + 0x4a0], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
je 0x140006ec1
mov qword [rsp + 0x4c0], rdi
lea rcx, [rsp + 0x82]
xor edi, edi
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x80], di
call fcn.14001dd20
lea rcx, [rsp + 0x292]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x290], di
call fcn.14001dd20
lea rdx, [rsp + 0x290]
mov r8d, 0x102
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea r8, [0x140030ed8]
lea rcx, [rsp + 0x80]
mov edx, 0x104
call fcn.14001af54
lea r8, [rsp + 0x290]
lea rcx, [rsp + 0x80]
mov edx, 0x104
call fcn.14001aecc
lea r8, [0x140030ed8]
lea rcx, [rsp + 0x80]
mov edx, 0x104
call fcn.14001aecc
lea rdx, [rsp + 0x80]
lea rcx, str.The_szFilename_is:__s_n
call fcn.14000f070
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
lea rax, [rsp + 0x80]
lea r8, str.AtherosSvc
lea rdx, str.AtherosSvc
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
mov r9d, 0xf01ff
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140006e75
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Install_service_failed_error_code___d_n
lea ecx, [rdi + 1]
mov r8d, eax
call fcn.14001a330
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x140006eb9
lea rax, str.Atheros_BT_Stack_Service_Agent
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x70], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov rdi, qword [rsp + 0x4c0]
mov rcx, qword [rsp + 0x4a0]
xor rcx, rsp
call fcn.14001a650
add rsp, 0x4b0
pop rbx
ret