Function at 0x4022e6
Capabilities:
Set registry value

Disassembly:
sub esp, 0x174
mov eax, dword [0x41d250]
xor eax, esp
mov dword [esp + 0x170], eax
push ebx
mov ebx, dword [esp + 0x17c]
push ebp
mov ebp, dword [sym.imp.ole32.dll_CoCreateInstance]
push esi
mov esi, dword [esp + 0x188]
push edi
lea eax, [esp + 0x18]
push eax
push 0x4182b0
xor edi, edi
push 0x15
push edi
push 0x418310
mov byte [esp + 0x27], 0
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
call ebp
test eax, eax
jl 0x402350
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x402350
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
lea eax, [esp + 0x14]
push eax
push 0x4182d0
push 0x15
push edi
push 0x418330
call ebp
test byte [esi], 0xf0
mov ebp, 0x160
je 0x4023c1
cmp eax, edi
jl 0x4023c1
cmp dword [esp + 0x14], edi
je 0x4023c1
push ebp
lea eax, [esp + 0x24]
push edi
push eax
call fcn.0040b600
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x20]
push edx
push ebp
push dword [esi]
mov byte [esp + 0x8e], 0xf9
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
cmp byte [esp + 0x81], 1
jne 0x4023ba
and dword [esp + 0x3c], 0xfff00000
mov dword [esi + 0x64], 1
mov ecx, dword [esp + 0x3c]
mov dword [esi + 0x3c], ecx
test byte [esi + 4], 0xf0
je 0x40241b
cmp eax, edi
jl 0x40241b
cmp dword [esp + 0x14], edi
je 0x402429
push ebp
lea eax, [esp + 0x24]
push edi
push eax
call fcn.0040b600
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x20]
push edx
push ebp
push dword [esi + 4]
mov byte [esp + 0x8e], 0xf9
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
cmp byte [esp + 0x81], 1
jne 0x402414
and dword [esp + 0x3c], 0xfff00000
mov dword [esi + 0x68], 1
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x40], eax
mov eax, dword [esp + 0x14]
cmp eax, edi
je 0x402429
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp ebx, edi
je 0x4025f2
push 4
pop ebp
push ebp
lea eax, [esi + 8]
push eax
push ebp
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push str.OperatingMode
push ebx
call edi
test eax, eax
jne 0x4025f2
push ebp
push esi
push ebp
push eax
push str.PrimaryDevice
push ebx
call edi
push ebp
lea eax, [esi + 4]
push eax
push ebp
push 0
push str.SecondaryDevice
push ebx
call edi
push ebp
lea eax, [esi + 0xc]
push eax
push ebp
push 0
push str.PrimaryXX
push ebx
call edi
push ebp
lea eax, [esi + 0x10]
push eax
push ebp
push 0
push str.PrimaryYY
push ebx
call edi
push ebp
lea eax, [esi + 0x14]
push eax
push ebp
push 0
push str.PrimaryRR
push ebx
call edi
push ebp
lea eax, [esi + 0x18]
push eax
push ebp
push 0
push str.PrimaryBPP
push ebx
call edi
push ebp
lea eax, [esi + 0x24]
push eax
push ebp
push 0
push str.SecondaryXX
push ebx
call edi
push ebp
lea eax, [esi + 0x28]
push eax
push ebp
push 0
push str.SecondaryYY
push ebx
call edi
push ebp
lea eax, [esi + 0x2c]
push eax
push ebp
push 0
push str.SecondaryRR
push ebx
call edi
push ebp
lea eax, [esi + 0x30]
push eax
push ebp
push 0
push str.SecondaryBPP
push ebx
call edi
push ebp
lea eax, [esi + 0x1c]
push eax
push ebp
push 0
push str.PrimaryAspectScaling
push ebx
call edi
push ebp
lea eax, [esi + 0x34]
push eax
push ebp
push 0
push str.SecondaryAspectScaling
push ebx
call edi
push ebp
lea eax, [esi + 0x20]
push eax
push ebp
push 0
push str.PrimaryDisplayOrientation
push ebx
call edi
push ebp
lea eax, [esi + 0x38]
push eax
push ebp
push 0
push str.SecondaryDisplayOrientation
push ebx
call edi
push ebp
lea eax, [esi + 0x3c]
push eax
push ebp
push 0
push str.PrimaryTVStandard
push ebx
call edi
push ebp
lea eax, [esi + 0x40]
push eax
push ebp
push 0
push str.SecondaryTVStandard
push ebx
call edi
push ebp
lea eax, [esi + 0x64]
push eax
push ebp
push 0
push str.PrimaryTVHDTV
push ebx
call edi
push ebp
lea eax, [esi + 0x68]
push eax
push ebp
push 0
push str.SecondaryTVHDTV
push ebx
call edi
push ebp
lea eax, [esi + 0x44]
push eax
push ebp
push 0
push str.PrimaryTop
push ebx
call edi
push ebp
lea eax, [esi + 0x50]
push eax
push ebp
push 0
push str.PrimaryBottom
push ebx
call edi
push ebp
lea eax, [esi + 0x48]
push eax
push ebp
push 0
push str.PrimaryLeft
push ebx
call edi
push ebp
lea eax, [esi + 0x4c]
push eax
push ebp
push 0
push str.PrimaryRight
push ebx
call edi
push ebp
lea eax, [esi + 0x54]
push eax
push ebp
push 0
push str.SecondaryTop
push ebx
call edi
push ebp
lea eax, [esi + 0x60]
push eax
push ebp
push 0
push str.SecondaryBottom
push ebx
call edi
push ebp
lea eax, [esi + 0x58]
push eax
push ebp
push 0
push str.SecondaryLeft
push ebx
call edi
push ebp
add esi, 0x5c
push esi
push ebp
push 0
push str.SecondaryRight
push ebx
call edi
mov byte [esp + 0x13], 1
mov ecx, dword [esp + 0x180]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b67a
add esp, 0x174
ret 8