Function at 0x1400409a0
Capabilities:
Print debug messages
Set registry value

Disassembly:
cmp r8d, 0x218
jne 0x140040c0b
push rdi
sub rsp, 0x50
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x60], rbx
mov rbx, r9
mov rdi, rcx
mov qword [rsp + 0x20], rbx
mov r9d, r8d
mov r8d, 0x81
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d___uMsg___d__wParam___d
call fcn.14005dbf0
mov dword [rsp + 0x30], 0
cmp rbx, 6
jb 0x140040c01
cmp rbx, 7
jbe 0x140040ba7
cmp rbx, 0x12
je 0x140040ba7
cmp rbx, 0x8013
jne 0x140040c01
mov r8d, 0x9b
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d___uMsg__WM_POWERBROADCAST__wParam__PBT_POWERSETTINGCHANGE
call fcn.14005dbf0
mov rdx, qword [rsp + 0x80]
mov qword [rdi + 0x28], rdx
test rdx, rdx
je 0x140040b84
lea rcx, [rsp + 0x38]
call fcn.14004d620
nop
mov rdx, qword [rdi + 0x28]
lea rcx, [rdx + 0x14]
mov qword [rsp + 0x28], rcx
mov ecx, dword [rdx + 0x10]
mov dword [rsp + 0x20], ecx
mov r9, qword [rax]
mov r8d, 0xa2
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_GUID___s__Length___d__Data___d
call fcn.14005dbf0
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140040aa5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
cmp rax, qword [0x1400d22b0]
jne 0x140040c01
mov rax, qword [rcx + 8]
cmp rax, qword [0x1400d22b8]
jne 0x140040c01
mov ebx, dword [rcx + 0x14]
mov r9d, ebx
mov r8d, 0xa7
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_GUID_CONSOLE_DISPLAY_STATE__dwConsoleDisplayState___d
call fcn.14005dbf0
test ebx, ebx
jne 0x140040b2e
mov r8d, 0xab
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_GUID_CONSOLE_DISPLAY_STATE_0__set_1_for_SkipActionForS0
call fcn.14005dbf0
lea r9d, [rbx + 1]
lea r8, str.SkipActionForS0
lea rdx, str.SOFTWARERealtekAudioRtkAudUServiceOthers
mov rcx, 0xffffffff80000002
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
jmp fcn.14007dbb0
cmp ebx, 1
jne 0x140040c01
mov dword [rsp + 0x70], 0
lea r9, [rsp + 0x70]
lea r8, str.SkipActionForS0
lea rdx, str.SOFTWARERealtekAudioRtkAudUServiceOthers
mov rcx, 0xffffffff80000002
call fcn.14007da80
cmp dword [rsp + 0x70], 0
je 0x140040c01
mov r8d, SystemTimeToVariantTime
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_GUID_CONSOLE_DISPLAY_STATE_1__delay_500ms_to_remove_SkipActionForS0
call fcn.14005dbf0
jmp 0x140040be9
mov r8d, 0xbc
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_lParam_is_NULL
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
jmp fcn.14005dbf0
lea r9, [rsp + 0x30]
lea r8, str.SkipActionForS0
lea rdx, str.SOFTWARERealtekAudioRtkAudUServiceOthers
mov rcx, 0xffffffff80000002
call fcn.14007da80
cmp dword [rsp + 0x30], 0
je 0x140040c01
mov r9, rbx
mov r8d, 0x94
lea rdx, str.CCustomizeHuawei::OnWindowsPowerMessage
lea rcx, str._s__d_RESUME__d___delay_500ms_to_remove_SkipActionForS0
call fcn.14005dbf0
call fcn.14000b5e0
mov r8d, 0x1f4
mov edx, 0x432
mov rcx, rax
call fcn.1400b43a0
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rdi
ret