Function at 0x140003d70
Capabilities:
Check if file exists
Create process on windows
Get common file path
Query or enumerate registry value

Disassembly:
sub rsp, 0xa8
mov rax, r8
cmp edx, 0x401
jne 0x140003a44
mov r8, r9
mov rdx, rax
add rsp, 0xa8
jmp 0x140003d70
cmp edx, 0x402
jne 0x140003a65
lea rdx, [rcx + 0x138]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_Shell_NotifyIconW]
xor eax, eax
add rsp, 0xa8
ret
cmp edx, 0x403
jne 0x140003a89
lea rdx, [rcx + 0x138]
mov ecx, 2
call qword [sym.imp.SHELL32.dll_Shell_NotifyIconW]
xor eax, eax
add rsp, 0xa8
ret
mov qword [rsp + 0xb0], rbx
mov qword [rsp + 0xa0], rdi
cmp edx, 0x404
jne 0x140003be3
lea rbx, [0x140006c24]
mov rdx, rbx
lea rcx, [0x14000c130]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
lea rdi, str.GPUSwitchDialog.exe
test eax, eax
jne 0x140003b1f
mov r8d, 0x104
lea rdx, [0x14000c130]
lea rcx, [0x140000000]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [0x14000c130]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea rcx, [0x14000c130]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea r9, [0x14000c130]
mov qword [rsp + 0x20], rdi
lea r8, str._s_s
mov edx, 0x104
lea rcx, [0x14000bd10]
call fcn.140001090
mov rdx, rbx
lea rcx, [0x14000c340]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140003b6b
lea r9d, [rax + 1]
xor ecx, ecx
lea r8d, [rax + 0x23]
lea rdx, [0x14000c340]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rcx, [0x14000c340]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea rdx, str.ASUSARMOURY_CRATE_ServiceGPUSwitchSettings.ini
lea rcx, [0x14000c340]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [0x14000c130]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003d47
lea rcx, [0x14000bd10]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003d47
lea rcx, [0x14000c340]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003d47
mov rdx, rdi
call fcn.140004310
test eax, eax
jne 0x140003d47
lea r9, [0x14000c340]
lea r8, str.Verify
lea rdx, str.Notify
lea rcx, str.GPUSwitch
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
xor eax, eax
jmp 0x140003d51
cmp edx, 0x111
jne 0x140003d4b
cmp rax, 0x8009
jne 0x140003d47
lea rbx, [0x140006c24]
mov qword [rsp + 0xb8], rbp
lea rdi, [0x14000bf20]
mov qword [rsp + 0xc0], rsi
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
lea rbp, str.GPUSwitchTutorial.exe
lea rsi, [0x14000bb00]
test eax, eax
jne 0x140003c7b
mov r8d, 0x104
lea rcx, [0x140000000]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r9, rdi
mov qword [rsp + 0x20], rbp
lea r8, str._s_s
mov edx, 0x104
mov rcx, rsi
call fcn.140001090
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003d37
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003d37
mov rdx, rbp
call fcn.140004310
test eax, eax
jne 0x140003d37
xor edx, edx
mov dword [rsp + 0x30], 0x70
xorps xmm0, xmm0
mov qword [rsp + 0x38], rdx
lea rax, str.Open
mov qword [rsp + 0x68], rdx
mov rcx, rsi
mov qword [rsp + 0x40], rax
movdqa xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x80], rdx
mov dword [rsp + 0x88], edx
movdqa xmmword [rsp + 0x90], xmm0
mov dword [rsp + 0x34], 0x40
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x60], 1
call fcn.140002770
test eax, eax
je 0x140003d37
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov rcx, qword [rsp + 0x98]
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rsi, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xb8]
xor eax, eax
jmp 0x140003d51
call qword [sym.imp.mfc140u.dll_CMFCRibbonPanel::ShowPopup]
mov rbx, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xa0]
add rsp, 0xa8
ret
push rbp
push rsi
lea rbp, [rsp - 0x3e8]
sub rsp, 0x4e8
mov rax, qword [0x14000b018]
xor rax, rsp
mov qword [rbp + 0x3d0], rax
mov eax, dword [rcx + 0x148]
mov rsi, rcx
cmp rdx, rax
je 0x140003da8
xor eax, eax
jmp 0x1400042bc
mov qword [rsp + 0x508], rbx
mov eax, 0x202
mov qword [rsp + 0x510], rdi
mov qword [rsp + 0x518], r14
mov qword [rsp + 0x4e0], r15
cmp r8w, ax
jne 0x140004193
call qword [sym.imp.mfc140u.dll_AfxFullPath]
xor ebx, ebx
mov rcx, rax
test rax, rax
je 0x140003df2
mov rax, qword [rax]
call qword [rax + 0xf8]
jmp 0x140003df5
mov rax, rbx
mov rcx, qword [rax + 0x40]
call qword [sym.imp.USER32.dll_SetForegroundWindow]
lea rdi, [0x140006c24]
lea rsi, [0x14000c550]
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
lea r15, str.GPUSwitchDialog.exe
lea r14, [0x14000c760]
test eax, eax
jne 0x140003e6f
mov r8d, 0x104
lea rcx, [0x140000000]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov r9, rsi
mov qword [rsp + 0x20], r15
lea r8, str._s_s
mov edx, 0x104
mov rcx, r14
call fcn.140001090
mov rdx, rdi
lea rcx, [0x14000cb80]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140003ebb
lea r9d, [rax + 1]
xor ecx, ecx
lea r8d, [rax + 0x23]
lea rdx, [0x14000cb80]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rcx, [0x14000cb80]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea rdx, str.ASUSARMOURY_CRATE_ServiceGPUSwitchSettings.ini
lea rcx, [0x14000cb80]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rdx, rdi
lea rcx, [0x14000b8f0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x140003f07
lea r9d, [rax + 1]
xor ecx, ecx
lea r8d, [rax + 0x1c]
lea rdx, [0x14000b8f0]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rcx, [0x14000b8f0]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea rdx, str.ASUSGPUSwitchNotSupport.ini
lea rcx, [0x14000b8f0]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140004297
mov rcx, r14
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140004297
mov rdx, r15
call fcn.140004310
test eax, eax
jne 0x140004297
lea rcx, [0x14000b8f0]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140003fce
xorps xmm0, xmm0
mov dword [rsp + 0x40], 0x70
lea rax, str.Open
movdqa xmmword [rbp - 0x80], xmm0
mov rcx, r14
mov qword [rsp + 0x50], rax
movdqa xmmword [rbp - 0x60], xmm0
mov dword [rsp + 0x44], 0x40
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x70], 1
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x70], rbx
mov dword [rbp - 0x68], ebx
call fcn.140002770
test eax, eax
je 0x140004297
lea rcx, [rsp + 0x40]
call qword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov rcx, qword [rbp - 0x58]
mov edx, 0x1f4
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x140004297
lea rcx, [0x14000cb80]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140004297
xor edx, edx
lea rcx, [rbp - 0x50]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov ecx, 0x510
call fcn.140004a10
mov rdi, rax
mov qword [rsp + 0x30], rax
lea rax, vtable.StringRegHelper.0
mov edx, 0x200
lea r8, str.SOFTWAREASUSARMOURY_CRATE_ServiceGPU_Switch
lea rcx, [rdi + 0x10]
mov qword [rdi], rax
mov qword [rdi + 8], 0xffffffff80000002
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
lea r8, str.ErrorReason
mov edx, 0x80
lea rcx, [rdi + 0x410]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rcx, qword [rdi + 8]
lea rax, [rsp + 0x30]
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rsp + 0x30], rbx
lea rdx, [rdi + 0x10]
mov dword [rsp + 0x3c], 1
mov dword [rsp + 0x38], 0x208
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400040a9
lea rax, [rsp + 0x30]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x10]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004114
xor edx, edx
lea rcx, [rbp + 0x1c0]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x3c]
lea rax, [rbp + 0x1c0]
xor r8d, r8d
lea rdx, [rdi + 0x410]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea r9, [rbp + 0x1c0]
mov edx, 0x104
lea r8, [0x140007760]
lea rcx, [rbp - 0x50]
call fcn.140001090
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
lea rdx, str.OldBIOS
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140004297
lea rdx, str.OldVBIOS
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140004297
lea rdx, str.NoPower
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
je 0x140004297
lea r9, [0x14000cb80]
lea r8, str.Verify
lea rdx, str.Notify
lea rcx, str.GPUSwitch
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x140004297
mov eax, 0x205
cmp r8w, ax
jne 0x140004297
lea rdx, [0x140006c24]
lea rcx, [0x14000c970]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x1400041f2
lea r9d, [rax + 1]
xor ecx, ecx
lea r8d, [rax + 0x1c]
lea rdx, [0x14000c970]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rcx, [0x14000c970]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea rdx, str.ASUSGPUSwitchNotSupport.ini
lea rcx, [0x14000c970]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [0x14000c970]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140004297
call qword [sym.imp.mfc140u.dll_AfxFullPath]
xor ebx, ebx
mov rcx, rax
test rax, rax
je 0x140004225
mov rax, qword [rax]
call qword [rax + 0xf8]
mov rdi, rax
jmp 0x140004228
mov rdi, rbx
mov rcx, qword [rdi + 0x40]
call qword [sym.imp.USER32.dll_SetForegroundWindow]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0xe8]
xor edx, edx
mov rcx, qword [rax + 8]
call qword [sym.imp.USER32.dll_GetSubMenu]
mov rcx, rax
call qword [sym.imp.mfc140u.dll_CList_CMFCPropertyGridProperty]
mov r14, rax
test rax, rax
je 0x140004297
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_GetCursorPos]
mov r9d, dword [rsp + 0x34]
xor edx, edx
mov r8d, dword [rsp + 0x30]
mov rcx, r14
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.mfc140u.dll_CMFCFilterChunkValueImpl::SetSystemTimeValue]
mov rcx, qword [rdi + 0x40]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_PostMessageW]
mov r15, qword [rsp + 0x4e0]
mov eax, 1
mov r14, qword [rsp + 0x518]
mov rdi, qword [rsp + 0x510]
mov rbx, qword [rsp + 0x508]
mov rcx, qword [rbp + 0x3d0]
xor rcx, rsp
call fcn.140004750
add rsp, 0x4e8
pop rsi
pop rbp
ret