Function at 0x41a050
Capabilities:
Resolve function by parsing pe exports
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x36c
push ebx
push esi
push edi
mov esi, ecx
mov edx, dword [esi + 0xc]
xor eax, eax
mov ecx, 0x20
lea edi, [esp + 0x150]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x6b4]
mov edi, dword [ebp + 8]
push eax
lea ecx, [esp + 0x154]
push ecx
push edx
push edi
mov dword [esp + 0x28], esi
call fcn.00419a50
mov eax, dword [esi + 0x28]
add esp, 0x10
test eax, 0x4000000
je 0x41a0db
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 0x41a109
mov cl, byte [esi + 0xc1c]
add esi, 0xc1c
test cl, cl
je 0x41a109
cmp dword [ebp + 0x10], eax
jne 0x41a109
add edi, 8
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 8]
xor ebx, ebx
lea eax, [esp + 0x150]
lea esi, [edi + 0x12c]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x10], eax
add edi, 0x118
cmp dword [esi], 0
je 0x41a1b9
mov eax, dword [esi - 0x18]
or ecx, 0xffffffff
test eax, eax
je 0x41a15a
xor ecx, ecx
test al, 1
jne 0x41a15a
lea ebx, [ebx]
inc ecx
mov edx, eax
shr edx, cl
test dl, 1
je 0x41a150
mov edx, dword [edi]
mov eax, dword [edi + 4]
or eax, edx
mov edx, dword [esi + 4]
push eax
push ecx
lea eax, [esp + 0x38]
push eax
mov eax, dword [esi]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
mov eax, dword [esp + 0x28]
push eax
call fcn.00422ee0
mov eax, dword [esp + 0x4c]
add esp, 0x1c
test eax, eax
jne 0x41a1d4
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x41a1d4
mov ecx, dword [esp + 0x18]
test dword [ecx + 0xd24], 0x20000
je 0x41a1b9
mov edx, dword [esi + 4]
mov eax, dword [esi]
cmp edx, eax
jbe 0x41a1b9
mov ecx, edx
mov dword [esi], ecx
mov dword [esp + ebx*4 + 0x40], 1
mov dword [esi + 4], eax
mov edx, dword [esp + 0x10]
inc ebx
add edx, 0x40
add edi, 0x48
add esi, 0x48
cmp ebx, 2
mov dword [esp + 0x10], edx
jb 0x41a135
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x48]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x1d0]
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x41a210
push str.Connected_
lea edx, [esp + 0x4c]
mov edi, 0x49f8f0
push edx
jmp 0x41a229
cmp eax, 2
je 0x41a21a
cmp eax, 3
jne 0x41a23b
push str.Selected_
lea eax, [esp + 0x4c]
mov edi, 0x49f648
push eax
mov esi, dword [ebp + 8]
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
call fcn.00416080
add esp, 8
mov eax, dword [ebp + 8]
add eax, 8
mov dword [esp + 0x34], eax
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a247
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a255
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, [esp + 0x48]
push ecx
push str.SubKey__s_n
call fcn.0040a4a0
mov esi, dword [ebp + 0xc]
xor ebx, ebx
add esp, 8
cmp esi, ebx
je 0x41a2db
lea edx, [esp + 0xc]
push edx
push 0x2001f
push ebx
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41a2c8
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x10]
push edx
push ebx
push 0x2001f
push ebx
push ebx
push ebx
lea eax, [esp + 0x64]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x41a871
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x18]
push ecx
lea ecx, [edi + 0x2c]
call fcn.00432e30
jmp 0x41a2df
mov edi, dword [esp + 0x18]
cmp esi, ebx
mov dword [esp + 0x20], ebx
je 0x41a32c
mov eax, dword [ebp + 0x10]
mov esi, 2
cmp eax, esi
je 0x41a2f8
cmp eax, 3
jne 0x41a32c
lea eax, [edi + 0x338]
cmp eax, ebx
je 0x41a328
mov cl, byte [eax + 8]
test cl, cl
je 0x41a328
mov edx, dword [ebp + 8]
push eax
push edx
mov ecx, edi
call fcn.00416400
test eax, eax
je 0x41a328
test byte [edi + 0x6a0], 2
je 0x41a32c
mov dword [esp + 0x20], ebx
jmp 0x41a32c
mov dword [esp + 0x20], esi
cmp dword [esp + 0x30], ebx
jne 0x41a338
cmp dword [esp + 0x28], ebx
je 0x41a33d
or dword [esp + 0x20], 1
mov ebx, dword [esp + 0x18]
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 [esp + 0x20]
or edx, ecx
xor esi, esi
mov dword [ebx + 0x674], edx
lea edx, [esp + 0x150]
add eax, 0x138
mov dword [esp + 0x3c], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x2d8]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0x24]
test ecx, ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x2c], 1
mov word [esp + 0x2fc], 0x9c
je 0x41a76c
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + 0xc]
call fcn.00437b90
cmp eax, 2
je 0x41a3d9
mov ecx, dword [edi + 0xc]
call fcn.00437b90
cmp eax, 3
jne 0x41a449
mov ecx, dword [edi + 0xc]
call fcn.00437aa0
test eax, 0x200000
je 0x41a449
cmp dword [edi + 0x6b4], 0xb
je 0x41a449
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x41a449
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.0044cca0
add esp, 0xc
test eax, eax
je 0x41a449
test dword [edi + 0xd24], 0x20000
je 0x41a451
mov eax, dword [esp + esi*4 + 0x40]
test eax, eax
mov ecx, dword [esp + 0x1c]
je 0x41a43f
test ecx, ecx
je 0x41a431
cmp ecx, 2
jne 0x41a43b
mov dword [esp + 0x1c], 1
jmp 0x41a451
test eax, eax
jne 0x41a451
cmp ecx, 1
je 0x41a449
cmp ecx, 3
jne 0x41a451
mov dword [esp + 0x1c], 0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x2d8]
push eax
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
test eax, eax
jne 0x41a480
mov edx, dword [esp + 0x14]
push edx
push str.SaveDeviceProfileToReg:_EnumDisplaySettings_failed_for__s
call fcn.0040a4a0
add esp, 8
xor edi, edi
jmp 0x41a484
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
push eax
mov ecx, 0x492a60
call fcn.0042d930
push eax
mov ecx, 0x492a60
call fcn.0042e500
test al, 4
je 0x41a4b0
push 4
push esi
mov ecx, ebx
call fcn.00432730
mov dword [esp + 0x3c], esi
test edi, edi
je 0x41a502
mov edx, dword [esp + 0x1c]
push edx
push esi
mov ecx, ebx
call fcn.00432800
mov eax, dword [esp + 0x14]
push eax
push esi
mov ecx, ebx
call fcn.00432690
lea ecx, [esp + 0x2d8]
push ecx
push esi
mov ecx, ebx
call fcn.004326f0
call fcn.0044ea40
cmp eax, 8
jl 0x41a502
mov edx, dword [esp + 0x18]
cmp dword [edx + 0x6b4], 1
jne 0x41a502
mov eax, dword [esp + 0x350]
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc esi
add edx, 0x40
add ecx, 0x48
cmp esi, 2
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jb 0x41a382
cmp dword [esp + 0x20], 2
mov edi, dword [ebp + 8]
jne 0x41a5ad
mov eax, dword [edi + 0x114]
test eax, eax
je 0x41a5ad
mov eax, dword [edi + 0x15c]
test eax, eax
je 0x41a5ad
mov eax, dword [esp + 0x3c]
lea esi, [eax - 1]
push eax
mov ecx, ebx
and esi, 1
call fcn.004327a0
push esi
mov ecx, ebx
mov dword [esp + 0x30], eax
call fcn.004327a0
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 [esp + 0x2c]
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.004326f0
mov esi, dword [esp + 0x18]
test dword [esi + 0x28], 0x2000000
je 0x41a5db
lea edx, [esp + 0x150]
push edx
push edi
mov ecx, esi
call fcn.00417fe0
test eax, eax
jne 0x41a5db
push str.SaveDeviceProfileToReg:_GetMaxResolutions_failed_n
call fcn.0040a4a0
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41a91a
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.0040a4a0
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.0040a4a0
mov edx, dword [esp + 0x34]
add esp, 0x28
push edx
mov ecx, ebx
call fcn.00432c90
cmp dword [ebp + 0x10], 2
jne 0x41a791
test dword [esi + 0x28], 0x100000
je 0x41a791
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push str.UsedBySelectedProfile
push ecx
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test dword [esi + 0x28], 0x1000000
mov dword [esp + 0xc], 0
je 0x41a7a4
mov esi, dword [esp + 0x34]
push 0x2d
push esi
call fcn.0045f8f0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41a778
mov al, byte [ebx + 1]
test al, al
mov byte [esp + 0x27], al
setne al
dec al
mov ecx, 0x41
lea edi, [esp + 0x48]
push str.Selected_
and eax, 0x31
mov byte [ebx + 1], al
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x4c]
push ecx
call fcn.00416080
add esp, 8
mov eax, esi
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a6f0
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a700
mov dl, byte [esp + 0x27]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0xc]
push eax
rep movsb byte es:[edi], byte [esi]
push 0x2001f
xor esi, esi
push esi
lea ecx, [esp + 0x54]
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 0x41a7a4
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push esi
push str.UsedBySelectedProfile
push ecx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], esi
jmp 0x41a7a4
mov ecx, dword [esp + 0x14]
mov byte [ecx], 0
jmp 0x41a4b4
push esi
push str.SaveDeviceProfileToReg._something_really_WRONG._PROFILE_KEY_SEPARATOR_not_find_at_the_end__s
call fcn.0040a4a0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0xc], 0
mov ebx, dword [esp + 0x18]
test dword [ebx + 0x28], 0x100000
je 0x41a913
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x48]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x48]
push str.Connected_
push ecx
call fcn.00416080
mov eax, dword [ebx + 0xc14]
add esp, 8
cmp eax, 1
je 0x41a7fe
mov eax, 0x49fa90
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a7e6
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a7f4
jmp 0x41a81b
mov eax, 0x49f7e8
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a805
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a813
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xc]
push edx
mov ecx, eax
push 0x2001f
and ecx, 3
push 0
lea eax, [esp + 0x54]
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 0x41a889
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x10]
push edx
push 0
push 0x2001f
push 0
push 0
push 0
lea eax, [esp + 0x64]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x41a889
push str.Failed_to_open_registry_key.
call fcn.0040a4a0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [0x4722d0]
xor eax, eax
push 0x104
mov ecx, 0x41
lea edi, [esp + 0x1d4]
rep stosd dword es:[edi], eax
mov ecx, dword [str.SelectedProfileKey]
mov eax, dword [0x4722d4]
push 0x49f7e8
mov dword [esp + 0x1d8], ecx
mov ecx, dword [0x4722d8]
push 7
mov dword [esp + 0x1e0], edx
mov dx, word [0x4722dc]
mov dword [esp + 0x1e8], ecx
push 0
lea ecx, [esp + 0x1e0]
mov word [esp + 0x1f0], dx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x1e8], eax
mov al, byte [0x4722de]
push ecx
push edx
mov byte [esp + 0x1fa], al
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0xc]
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