Function at 0x401020
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x118], eax
push esi
push 0x100
lea eax, [esp + 0x1c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x10], 0x100
lea eax, [esp + 8]
mov dword [esp + 0x14], 3
push eax
push str.SYSTEMCurrentControlSetEnumDISPLAYAUODF8742e1ef7460UID265988Device_ParametersEDID_OVERRIDE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4010da
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0x403234
push dword [esp + 0x1c]
call esi
test eax, eax
jne 0x4010da
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0x403234
push dword [esp + 0x1c]
call esi
test eax, eax
je 0x401195
mov eax, 4
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret
lea eax, [esp + 8]
push eax
push 0x403238
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x40110b
mov eax, 1
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push str.EDID
push dword [esp + 0x1c]
call esi
test eax, eax
je 0x401143
mov eax, 2
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret
lea eax, [esp + 8]
push eax
push str.SYSTEMCurrentControlSetEnumDISPLAYAUODF8742e1ef7460UID265988Device_ParametersEDID_OVERRIDE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x401195
push 0x100
lea eax, [esp + 0x1c]
push eax
push 3
push 0
push 0x403234
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x401195
mov eax, 3
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x18]
call fcn.00401370
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x403310
call fcn.00401e20
mov edx, str.Change_refresh_rate_
mov ecx, eax
call fcn.00401e20
mov edx, 0x4032f4
mov ecx, eax
call fcn.00401e20
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0xd]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___bool__]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Turn_On_V_Sync_
call fcn.00401e20
mov edx, 0x4032f4
mov ecx, eax
call fcn.00401e20
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0xe]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___bool__]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Delete_Useless_Descriptors_
call fcn.00401e20
mov edx, 0x4032f4
mov ecx, eax
call fcn.00401e20
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0xf]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___bool__]
cmp byte [esp + 0xd], 1
jne 0x40129b
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Change_refresh_rate_60hz_or_95hz___0_if_60hz__1_if_95hz_
call fcn.00401e20
mov edx, 0x4032f4
mov ecx, eax
call fcn.00401e20
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
lea eax, [esp + 0xd]
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::operator___bool__]
mov al, byte [esp + 0xd]
test al, al
jne 0x401282
cmp byte [esp + 0x4e], al
je 0x40129b
cmp byte [esp + 0x4f], al
je 0x40129b
mov word [esp + 0x4e], 0x376c
jmp 0x40129b
cmp al, 1
jne 0x40129b
cmp byte [esp + 0x4e], 0
je 0x40129b
cmp byte [esp + 0x4f], 0
je 0x40129b
mov word [esp + 0x4e], 0x57c0
cmp byte [esp + 0xe], 1
jne 0x4012b7
mov al, byte [esp + 0x5f]
mov edx, 0x1e
test al, al
movzx ecx, al
cmovne ecx, edx
mov byte [esp + 0x5f], cl
cmp byte [esp + 0xf], 1
jne 0x4012cf
push 0x36
lea eax, [esp + 0x64]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor ecx, ecx
mov byte [esp + 0x97], 0
xor al, al
nop dword [eax + eax]
sub al, byte [esp + ecx + 0x18]
inc ecx
mov byte [esp + 0x97], al
cmp ecx, 0x7f
jl 0x4012e0
push 0x80
lea eax, [esp + 0x1c]
push eax
push 3
push 0x403234
push str.SYSTEMCurrentControlSetEnumDISPLAYAUODF8742e1ef7460UID265988Device_ParametersEDID_OVERRIDE
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
test eax, eax
je 0x40132e
mov eax, 5
pop esi
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Success
call fcn.00401e20
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [esp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x11c]
xor eax, eax
pop esi
xor ecx, esp
call fcn.00402040
mov esp, ebp
pop ebp
ret