Function at 0x419fa0
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 + 0x45c]
mov edi, dword [ebp + 8]
push eax
lea ecx, [esp + 0x154]
push ecx
push edx
push edi
mov dword [esp + 0x24], esi
call fcn.004199a0
mov eax, dword [esi + 0x28]
add esp, 0x10
test eax, 0x4000000
je 0x41a02b
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 + 0x9bc]
mov eax, 1
cmp ecx, eax
jne 0x41a059
mov cl, byte [esi + 0x9c0]
add esi, 0x9c0
test cl, cl
je 0x41a059
cmp dword [ebp + 0x10], eax
jne 0x41a059
add edi, 8
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
lea ebx, [esp + 0x150]
add esi, 0x12c
jmp 0x41a080
mov eax, dword [esi]
test eax, eax
je 0x41a0d9
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esi + 4]
lea edx, [esp + 0x2c]
push edx
push ecx
push eax
push ebx
call fcn.00422b90
mov eax, dword [esp + 0x44]
add esp, 0x14
test eax, eax
jne 0x41a0e5
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x41a0e5
mov edx, dword [esp + 0x14]
test dword [edx + 0xac8], 0x20000
je 0x41a0d9
mov eax, dword [esi + 4]
mov ecx, dword [esi]
cmp eax, ecx
jbe 0x41a0d9
mov eax, ecx
mov ecx, dword [esi + 4]
mov dword [esi], ecx
mov dword [esp + edi*4 + 0x40], 1
mov dword [esi + 4], eax
inc edi
add ebx, 0x40
add esi, 0x48
cmp edi, 2
jb 0x41a080
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 0x41a121
push str.Connected_
lea edx, [esp + 0x4c]
mov edi, 0x493940
push edx
jmp 0x41a13a
cmp eax, 2
je 0x41a12b
cmp eax, 3
jne 0x41a14c
push str.Selected_
lea eax, [esp + 0x4c]
mov edi, 0x493698
push eax
mov esi, dword [ebp + 8]
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
call fcn.00416280
add esp, 8
mov ebx, dword [ebp + 8]
add ebx, 8
mov eax, ebx
mov dword [esp + 0x34], ebx
mov esi, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a160
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a170
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.0040aab0
mov esi, dword [ebp + 0xc]
add esp, 8
test esi, esi
je 0x41a1f7
lea edx, [esp + 0xc]
push edx
push 0x2001f
push 0
lea eax, [esp + 0x54]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x41a1e6
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
jne 0x41a7e2
mov ecx, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
add ecx, 0x2c
call fcn.00432bc0
test esi, esi
mov dword [esp + 0x20], 0
je 0x41a299
mov eax, dword [ebp + 0x10]
cmp eax, 2
je 0x41a218
cmp eax, 3
jne 0x41a299
mov edx, dword [esp + 0x14]
lea edi, [edx + 0xe0]
test edi, edi
je 0x41a291
mov al, byte [edi + 8]
test al, al
lea esi, [edi + 8]
je 0x41a291
mov eax, ebx
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x41a256
test cl, cl
je 0x41a252
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x41a256
add eax, 2
add esi, 2
test cl, cl
jne 0x41a232
xor eax, eax
jmp 0x41a25b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x41a291
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x114]
cmp ecx, dword [edi + 0x114]
jne 0x41a291
mov eax, dword [eax + 0x15c]
cmp eax, dword [edi + 0x15c]
jne 0x41a291
test byte [edx + 0x448], 2
je 0x41a299
mov dword [esp + 0x20], 0
jmp 0x41a299
mov dword [esp + 0x20], 2
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x41a2a9
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41a2ae
or dword [esp + 0x20], 1
mov ebx, dword [esp + 0x14]
mov eax, dword [ebp + 8]
lea edi, [ebx + 0xe0]
mov esi, eax
add ebx, 0x2c
mov ecx, 0x68
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebx + 0x41c]
mov ecx, dword [esp + 0x20]
or edx, ecx
xor esi, esi
mov dword [ebx + 0x41c], edx
lea edx, [esp + 0x150]
add eax, 0x138
mov dword [esp + 0x3c], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], eax
jmp 0x41a300
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x2d8]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax - 0x24]
test ecx, ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], 1
mov word [esp + 0x2fc], 0x9c
je 0x41a6dd
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0xc]
call fcn.00437930
cmp eax, 2
je 0x41a357
mov ecx, dword [edi + 0xc]
call fcn.00437930
cmp eax, 3
jne 0x41a3c7
mov ecx, dword [edi + 0xc]
call fcn.00437830
test eax, 0x200000
je 0x41a3c7
cmp dword [edi + 0x45c], 0xb
je 0x41a3c7
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x41a3c7
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.0044ca00
add esp, 0xc
test eax, eax
je 0x41a3c7
test dword [edi + 0xac8], 0x20000
je 0x41a3cf
mov eax, dword [esp + esi*4 + 0x40]
test eax, eax
mov ecx, dword [esp + 0x18]
je 0x41a3bd
test ecx, ecx
je 0x41a3af
cmp ecx, 2
jne 0x41a3b9
mov dword [esp + 0x18], 1
jmp 0x41a3cf
test eax, eax
jne 0x41a3cf
cmp ecx, 1
je 0x41a3c7
cmp ecx, 3
jne 0x41a3cf
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x2d8]
push eax
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
test eax, eax
jne 0x41a3fe
mov edx, dword [esp + 0x10]
push edx
push str.SaveDeviceProfileToReg:_EnumDisplaySettings_failed_for__s
call fcn.0040aab0
add esp, 8
xor edi, edi
jmp 0x41a402
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
push eax
mov ecx, 0x491a60
call fcn.0042d630
push eax
mov ecx, 0x491a60
call fcn.0042e200
test al, 4
je 0x41a42e
push 4
push esi
mov ecx, ebx
call fcn.004324d0
mov dword [esp + 0x3c], esi
test edi, edi
je 0x41a480
mov edx, dword [esp + 0x18]
push edx
push esi
mov ecx, ebx
call fcn.004325a0
mov eax, dword [esp + 0x10]
push eax
push esi
mov ecx, ebx
call fcn.00432430
lea ecx, [esp + 0x2d8]
push ecx
push esi
mov ecx, ebx
call fcn.00432490
call fcn.0044e780
cmp eax, 8
jl 0x41a480
mov edx, dword [esp + 0x14]
cmp dword [edx + 0x45c], 1
jne 0x41a480
mov eax, dword [esp + 0x350]
mov ecx, dword [esp + 0x1c]
mov dword [ecx], eax
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
inc esi
add edx, 0x40
add ecx, 0x48
cmp esi, 2
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
jb 0x41a300
cmp dword [esp + 0x20], 2
mov edi, dword [ebp + 8]
jne 0x41a527
mov eax, dword [edi + 0x114]
test eax, eax
je 0x41a527
mov eax, dword [edi + 0x15c]
test eax, eax
je 0x41a527
mov eax, dword [esp + 0x3c]
lea esi, [eax - 1]
push eax
mov ecx, ebx
and esi, 1
call fcn.00432540
push esi
mov ecx, ebx
mov dword [esp + 0x30], eax
call fcn.00432540
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.00432490
mov esi, dword [esp + 0x14]
test dword [esi + 0x28], 0x2000000
je 0x41a555
lea edx, [esp + 0x150]
push edx
push edi
mov ecx, esi
call fcn.00417f70
test eax, eax
jne 0x41a555
push str.SaveDeviceProfileToReg:_GetMaxResolutions_failed_n
call fcn.0040aab0
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41a88b
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.0040aab0
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.0040aab0
mov edx, dword [esp + 0x34]
add esp, 0x28
push edx
mov ecx, ebx
call fcn.00432a20
cmp dword [ebp + 0x10], 2
jne 0x41a702
test dword [esi + 0x28], 0x100000
je 0x41a702
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x20]
push eax
push 4
push 0
push str.UsedBySelectedProfile
push ecx
mov dword [esp + 0x34], 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 0x41a715
mov esi, dword [esp + 0x34]
push 0x2d
push esi
call fcn.0045f340
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41a6e9
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.00416280
add esp, 8
mov eax, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a663
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a671
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 0x41a715
mov ecx, dword [esp + 0xc]
push 4
lea eax, [esp + 0x20]
push eax
push 4
push esi
push str.UsedBySelectedProfile
push ecx
mov dword [esp + 0x34], 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 0x41a715
mov ecx, dword [esp + 0x10]
mov byte [ecx], 0
jmp 0x41a432
push esi
push str.SaveDeviceProfileToReg._something_really_WRONG._PROFILE_KEY_SEPARATOR_not_find_at_the_end__s
call fcn.0040aab0
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 + 0x14]
test dword [ebx + 0x28], 0x100000
je 0x41a884
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.00416280
mov eax, dword [ebx + 0x9bc]
add esp, 8
cmp eax, 1
je 0x41a76f
mov eax, 0x493ae0
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a757
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a765
jmp 0x41a78c
mov eax, 0x493838
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a776
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a784
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 0x41a7fa
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 0x41a7fa
push str.Failed_to_open_registry_key.
call fcn.0040aab0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [0x472310]
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 [0x472314]
push 0x493838
mov dword [esp + 0x1d8], ecx
mov ecx, dword [0x472318]
push 7
mov dword [esp + 0x1e0], edx
mov dx, word [0x47231c]
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 [0x47231e]
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 + 0xac8], 0x20
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x10