Function at 0x41a2c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x35c
push ebx
push esi
push edi
mov esi, ecx
mov edx, dword [esi + 0xc]
xor eax, eax
mov ecx, 0x20
lea edi, [ebp - 0x1bc]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x6b4]
mov edi, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x1bc]
push ecx
push edx
push edi
mov dword [ebp - 8], esi
call fcn.00419d00
mov eax, dword [esi + 0x28]
add esp, 0x10
test eax, 0x4000000
je 0x41a345
mov ecx, dword [edi + 0x150]
mov ebx, dword [edi + 0x154]
mov edx, dword [edi + 0x198]
mov eax, SysReAllocString
or ecx, eax
mov dword [edi + 0x150], ecx
mov ecx, dword [edi + 0x19c]
or ebx, eax
or edx, eax
or ecx, eax
mov dword [edi + 0x154], ebx
mov dword [edi + 0x198], edx
mov dword [edi + 0x19c], ecx
mov ecx, dword [esi + 0xc14]
mov eax, 1
cmp ecx, eax
jne 0x41a373
mov cl, byte [esi + 0xc1c]
add esi, 0xc1c
test cl, cl
je 0x41a373
cmp dword [ebp + 0x10], eax
jne 0x41a373
add edi, 8
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
lea ebx, [ebp - 0x1bc]
add esi, 0x12c
mov eax, dword [esi]
test eax, eax
je 0x41a3e4
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [esi + 4]
lea edx, [ebp - 0x20]
push edx
push ecx
push eax
push ebx
call fcn.004232d0
mov eax, dword [ebp - 0x1c]
add esp, 0x14
test eax, eax
jne 0x41a3f0
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x41a3f0
mov edx, dword [ebp - 8]
test dword [edx + 0xd24], 0x20000
je 0x41a3e4
mov eax, dword [esi + 4]
mov ecx, dword [esi]
cmp eax, ecx
jbe 0x41a3e4
mov eax, ecx
mov ecx, dword [esi + 4]
mov dword [esi], ecx
mov dword [ebp + edi*4 - 0x34], 1
mov dword [esi + 4], eax
inc edi
add ebx, 0x40
add esi, 0x48
cmp edi, 2
jb 0x41a390
xor eax, eax
mov ecx, 0x41
lea edi, [ebp - 0x13c]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [ebp - 0x2c0]
rep stosd dword es:[edi], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x41a42d
push str.Connected_
lea edx, [ebp - 0x13c]
mov edi, 0x4a8d98
push edx
jmp 0x41a448
cmp eax, 2
je 0x41a437
cmp eax, 3
jne 0x41a45a
push str.Selected_
lea eax, [ebp - 0x13c]
mov edi, 0x4a8af0
push eax
mov esi, dword [ebp + 8]
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
call fcn.00416990
add esp, 8
mov eax, dword [ebp + 8]
add eax, 8
mov dword [ebp - 0x28], eax
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a465
lea edi, [ebp - 0x13c]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a475
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x13c]
push ecx
push str.SubKey__s_n
call fcn.0040acd0
mov esi, dword [ebp + 0xc]
xor ebx, ebx
add esp, 8
cmp esi, ebx
je 0x41a4fc
lea edx, [ebp - 4]
push edx
push 0x2001f
push ebx
lea eax, [ebp - 0x13c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41a4eb
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 4]
push edx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x13c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x41aa61
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 8]
push ecx
lea ecx, [edi + 0x2c]
call fcn.00432ea0
jmp 0x41a4ff
mov edi, dword [ebp - 8]
cmp esi, ebx
mov dword [ebp - 0x14], ebx
je 0x41a549
mov eax, dword [ebp + 0x10]
mov esi, 2
cmp eax, esi
je 0x41a517
cmp eax, 3
jne 0x41a549
lea eax, [edi + 0x338]
cmp eax, ebx
je 0x41a546
mov cl, byte [eax + 8]
test cl, cl
je 0x41a546
mov edx, dword [ebp + 8]
push eax
push edx
mov ecx, edi
call fcn.00416cf0
test eax, eax
je 0x41a546
test byte [edi + 0x6a0], 2
je 0x41a549
mov dword [ebp - 0x14], ebx
jmp 0x41a549
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x1c], ebx
jne 0x41a553
cmp dword [ebp - 0x20], ebx
je 0x41a557
or dword [ebp - 0x14], 1
mov ebx, dword [ebp - 8]
mov eax, dword [ebp + 8]
lea edi, [ebx + 0x338]
mov esi, eax
add ebx, 0x2c
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x674]
mov ecx, dword [ebp - 0x14]
or edx, ecx
xor esi, esi
mov dword [ebx + 0x674], edx
lea edx, [ebp - 0x1bc]
add eax, 0x138
mov dword [ebp - 0x24], esi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x18], eax
jmp 0x41a5a0
xor eax, eax
mov ecx, 0x27
lea edi, [ebp - 0x35c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0x24]
test ecx, ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x38], 1
mov word [ebp - 0x338], 0x9c
je 0x41a957
mov edi, dword [ebp - 8]
mov ecx, dword [edi + 0xc]
call fcn.00437b20
cmp eax, 2
je 0x41a5f1
mov ecx, dword [edi + 0xc]
call fcn.00437b20
cmp eax, 3
jne 0x41a65d
mov ecx, dword [edi + 0xc]
call fcn.00437a70
test eax, 0x200000
je 0x41a65d
cmp dword [edi + 0x6b4], 0xb
je 0x41a65d
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x41a65d
mov edx, dword [ebp - 0xc]
push 0
lea ecx, [ebp - 0x10]
push ecx
push edx
call fcn.0044d790
add esp, 0xc
test eax, eax
je 0x41a65d
test dword [edi + 0xd24], 0x20000
je 0x41a664
mov eax, dword [ebp + esi*4 - 0x34]
test eax, eax
mov ecx, dword [ebp - 0x10]
je 0x41a653
test ecx, ecx
je 0x41a646
cmp ecx, 2
jne 0x41a64f
mov dword [ebp - 0x10], 1
jmp 0x41a664
test eax, eax
jne 0x41a664
cmp ecx, 1
je 0x41a65d
cmp ecx, 3
jne 0x41a664
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x35c]
push eax
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
test eax, eax
jne 0x41a690
mov edx, dword [ebp - 0xc]
push edx
push str.SaveDeviceProfileToReg:_EnumDisplaySettings_failed_for__s
call fcn.0040acd0
add esp, 8
xor edi, edi
jmp 0x41a693
mov edi, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, 0x49c088
call fcn.00430380
push eax
mov ecx, 0x49c088
call fcn.0042e450
test al, 4
je 0x41a6bd
push 4
push esi
mov ecx, ebx
call fcn.00432760
mov dword [ebp - 0x24], esi
test edi, edi
je 0x41a709
mov edx, dword [ebp - 0x10]
push edx
push esi
mov ecx, ebx
call fcn.00432830
mov eax, dword [ebp - 0xc]
push eax
push esi
mov ecx, ebx
call fcn.004326c0
lea ecx, [ebp - 0x35c]
push ecx
push esi
mov ecx, ebx
call fcn.00432720
call fcn.0044f640
cmp eax, 8
jl 0x41a709
mov edx, dword [ebp - 8]
cmp dword [edx + 0x6b4], 1
jne 0x41a709
mov eax, dword [ebp - 0x2e4]
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
inc esi
add edx, 0x40
add ecx, 0x48
cmp esi, 2
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x18], ecx
jb 0x41a5a0
cmp dword [ebp - 0x14], 2
mov edi, dword [ebp + 8]
jne 0x41a7a8
mov eax, dword [edi + 0x114]
test eax, eax
je 0x41a7a8
mov eax, dword [edi + 0x15c]
test eax, eax
je 0x41a7a8
mov eax, dword [ebp - 0x24]
lea esi, [eax - 1]
push eax
mov ecx, ebx
and esi, 1
call fcn.004327d0
push esi
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.004327d0
mov dword [eax + 0x34], 0
lea edx, [esi + esi*8]
lea ecx, [edi + edx*8]
mov edx, dword [ecx + 0x134]
mov dword [eax + 0x68], edx
mov edx, dword [ecx + 0x12c]
mov dword [eax + 0x6c], edx
mov edx, dword [ecx + 0x130]
mov dword [eax + 0x70], edx
mov ecx, dword [ecx + 0x138]
mov edx, dword [ebp + 8]
mov dword [eax + 0x78], ecx
mov ecx, dword [edx + 0x6c]
push eax
mov dword [eax + 0x2c], ecx
push esi
mov ecx, ebx
mov dword [eax + 0x30], 0
call fcn.00432720
mov esi, dword [ebp - 8]
test dword [esi + 0x28], 0x2000000
je 0x41a7d4
lea edx, [ebp - 0x1bc]
push edx
push edi
mov ecx, esi
call fcn.00418330
test eax, eax
jne 0x41a7d4
push str.SaveDeviceProfileToReg:_GetMaxResolutions_failed_n
call fcn.0040acd0
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41ab00
mov eax, dword [edi + 0x134]
mov ecx, dword [edi + 0x138]
mov edx, dword [edi + 0x130]
push eax
mov eax, dword [edi + 0x12c]
push ecx
push edx
push eax
push str.SaveDeviceProfileToReg._Saved_Mode_for_Drive_0__Width__d___Hight__d___Freq__d___Bpp__d_
call fcn.0040acd0
mov ecx, dword [edi + 0x17c]
mov edx, dword [edi + 0x180]
mov eax, dword [edi + 0x178]
push ecx
mov ecx, dword [edi + 0x174]
push edx
push eax
push ecx
push str.SaveDeviceProfileToReg._Saved_Mode_for_Drive_1__Width__d___Hight__d___Freq__d___Bpp__d_
call fcn.0040acd0
mov edx, dword [ebp - 4]
add esp, 0x28
push edx
mov ecx, ebx
call fcn.00432cf0
cmp dword [ebp + 0x10], 2
jne 0x41a97b
test dword [esi + 0x28], 0x100000
je 0x41a97b
mov ecx, dword [ebp - 4]
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push str.UsedBySelectedProfile
push ecx
mov dword [ebp + 0x10], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test dword [esi + 0x28], 0x1000000
mov dword [ebp - 4], 0
je 0x41a98c
mov esi, dword [ebp - 0x28]
push 0x2d
push esi
call fcn.004616e0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41a962
mov al, byte [ebx + 1]
test al, al
mov byte [ebp + 0xb], al
setne al
dec al
mov ecx, 0x41
lea edi, [ebp - 0x13c]
push str.Selected_
and eax, 0x31
mov byte [ebx + 1], al
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00416990
add esp, 8
mov eax, esi
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a8e0
lea edi, [ebp - 0x13c]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a8f0
mov dl, byte [ebp + 0xb]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 4]
push eax
rep movsb byte es:[edi], byte [esi]
push 0x2001f
xor esi, esi
push esi
lea ecx, [ebp - 0x13c]
mov byte [ebx + 1], dl
mov edx, dword [ebp + 0xc]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41a98c
mov ecx, dword [ebp - 4]
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push esi
push str.UsedBySelectedProfile
push ecx
mov dword [ebp + 0x10], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], esi
jmp 0x41a98c
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
jmp 0x41a6c1
push esi
push str.SaveDeviceProfileToReg._something_really_WRONG._PROFILE_KEY_SEPARATOR_not_find_at_the_end__s
call fcn.0040acd0
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 8]
test dword [ebx + 0x28], 0x100000
je 0x41aaf9
xor eax, eax
mov ecx, 0x41
lea edi, [ebp - 0x13c]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x13c]
push str.Connected_
push ecx
call fcn.00416990
mov eax, dword [ebx + 0xc14]
add esp, 8
cmp eax, 1
je 0x41a9eb
mov eax, 0x4a8f38
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a9d1
lea edi, [ebp - 0x13c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a9e1
jmp 0x41aa0a
mov eax, 0x4a8c90
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a9f2
lea edi, [ebp - 0x13c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41aa02
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 4]
push edx
mov ecx, eax
push 0x2001f
and ecx, 3
push 0
lea eax, [ebp - 0x13c]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0xc]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41aa79
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 4]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
lea eax, [ebp - 0x13c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x41aa79
push str.Failed_to_open_registry_key.
call fcn.0040acd0
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [0x47bef8]
xor eax, eax
push 0x104
mov ecx, 0x41
lea edi, [ebp - 0x2c0]
rep stosd dword es:[edi], eax
mov ecx, dword [str.SelectedProfileKey]
mov eax, dword [0x47befc]
push 0x4a8c90
mov dword [ebp - 0x2c0], ecx
mov ecx, dword [0x47bf00]
push 7
mov dword [ebp - 0x2bc], edx
mov dx, word [0x47bf04]
mov dword [ebp - 0x2b4], ecx
push 0
lea ecx, [ebp - 0x2c0]
mov word [ebp - 0x2b0], dx
mov edx, dword [ebp - 4]
mov dword [ebp - 0x2b8], eax
mov al, byte [0x47bf06]
push ecx
push edx
mov byte [ebp - 0x2ae], al
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or dword [ebx + 0xd24], 0x20
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10