Function at 0x419f90
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.00419990
mov eax, dword [esi + 0x28]
add esp, 0x10
test eax, 0x4000000
je 0x41a01b
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 0x41a049
mov cl, byte [esi + 0x9c0]
add esi, 0x9c0
test cl, cl
je 0x41a049
cmp dword [ebp + 0x10], eax
jne 0x41a049
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 0x41a070
mov eax, dword [esi]
test eax, eax
je 0x41a0c9
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.00422ae0
mov eax, dword [esp + 0x44]
add esp, 0x14
test eax, eax
jne 0x41a0d5
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x41a0d5
mov edx, dword [esp + 0x14]
test dword [edx + 0xac8], 0x20000
je 0x41a0c9
mov eax, dword [esi + 4]
mov ecx, dword [esi]
cmp eax, ecx
jbe 0x41a0c9
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 0x41a070
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 0x41a111
push str.Connected_
lea edx, [esp + 0x4c]
mov edi, 0x493940
push edx
jmp 0x41a12a
cmp eax, 2
je 0x41a11b
cmp eax, 3
jne 0x41a13c
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.00416270
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 0x41a150
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a160
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 0x41a1e7
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 0x41a1d6
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 0x41a7d2
mov ecx, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
add ecx, 0x2c
call fcn.004326c0
test esi, esi
mov dword [esp + 0x20], 0
je 0x41a289
mov eax, dword [ebp + 0x10]
cmp eax, 2
je 0x41a208
cmp eax, 3
jne 0x41a289
mov edx, dword [esp + 0x14]
lea edi, [edx + 0xe0]
test edi, edi
je 0x41a281
mov al, byte [edi + 8]
test al, al
lea esi, [edi + 8]
je 0x41a281
mov eax, ebx
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x41a246
test cl, cl
je 0x41a242
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x41a246
add eax, 2
add esi, 2
test cl, cl
jne 0x41a222
xor eax, eax
jmp 0x41a24b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x41a281
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x114]
cmp ecx, dword [edi + 0x114]
jne 0x41a281
mov eax, dword [eax + 0x15c]
cmp eax, dword [edi + 0x15c]
jne 0x41a281
test byte [edx + 0x448], 2
je 0x41a289
mov dword [esp + 0x20], 0
jmp 0x41a289
mov dword [esp + 0x20], 2
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x41a299
mov eax, dword [esp + 0x28]
test eax, eax
je 0x41a29e
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 0x41a2f0
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 0x41a6cd
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0xc]
call fcn.00437430
cmp eax, 2
je 0x41a347
mov ecx, dword [edi + 0xc]
call fcn.00437430
cmp eax, 3
jne 0x41a3b7
mov ecx, dword [edi + 0xc]
call fcn.00437330
test eax, 0x200000
je 0x41a3b7
cmp dword [edi + 0x45c], 0xb
je 0x41a3b7
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x41a3b7
mov edx, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.0044c500
add esp, 0xc
test eax, eax
je 0x41a3b7
test dword [edi + 0xac8], 0x20000
je 0x41a3bf
mov eax, dword [esp + esi*4 + 0x40]
test eax, eax
mov ecx, dword [esp + 0x18]
je 0x41a3ad
test ecx, ecx
je 0x41a39f
cmp ecx, 2
jne 0x41a3a9
mov dword [esp + 0x18], 1
jmp 0x41a3bf
test eax, eax
jne 0x41a3bf
cmp ecx, 1
je 0x41a3b7
cmp ecx, 3
jne 0x41a3bf
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 0x41a3ee
mov edx, dword [esp + 0x10]
push edx
push str.SaveDeviceProfileToReg:_EnumDisplaySettings_failed_for__s
call fcn.0040aab0
add esp, 8
xor edi, edi
jmp 0x41a3f2
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
push eax
mov ecx, 0x491a60
call fcn.0042d130
push eax
mov ecx, 0x491a60
call fcn.0042dd00
test al, 4
je 0x41a41e
push 4
push esi
mov ecx, ebx
call fcn.00431fd0
mov dword [esp + 0x3c], esi
test edi, edi
je 0x41a470
mov edx, dword [esp + 0x18]
push edx
push esi
mov ecx, ebx
call fcn.004320a0
mov eax, dword [esp + 0x10]
push eax
push esi
mov ecx, ebx
call fcn.00431f30
lea ecx, [esp + 0x2d8]
push ecx
push esi
mov ecx, ebx
call fcn.00431f90
call fcn.0044e280
cmp eax, 8
jl 0x41a470
mov edx, dword [esp + 0x14]
cmp dword [edx + 0x45c], 1
jne 0x41a470
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 0x41a2f0
cmp dword [esp + 0x20], 2
mov edi, dword [ebp + 8]
jne 0x41a517
mov eax, dword [edi + 0x114]
test eax, eax
je 0x41a517
mov eax, dword [edi + 0x15c]
test eax, eax
je 0x41a517
mov eax, dword [esp + 0x3c]
lea esi, [eax - 1]
push eax
mov ecx, ebx
and esi, 1
call fcn.00432040
push esi
mov ecx, ebx
mov dword [esp + 0x30], eax
call fcn.00432040
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.00431f90
mov esi, dword [esp + 0x14]
test dword [esi + 0x28], 0x2000000
je 0x41a545
lea edx, [esp + 0x150]
push edx
push edi
mov ecx, esi
call fcn.00417f60
test eax, eax
jne 0x41a545
push str.SaveDeviceProfileToReg:_GetMaxResolutions_failed_n
call fcn.0040aab0
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41a87b
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.00432520
cmp dword [ebp + 0x10], 2
jne 0x41a6f2
test dword [esi + 0x28], 0x100000
je 0x41a6f2
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 0x41a705
mov esi, dword [esp + 0x34]
push 0x2d
push esi
call fcn.0045ee10
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x41a6d9
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.00416270
add esp, 8
mov eax, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a653
lea edi, [esp + 0x48]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a661
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 0x41a705
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 0x41a705
mov ecx, dword [esp + 0x10]
mov byte [ecx], 0
jmp 0x41a422
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 0x41a874
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.00416270
mov eax, dword [ebx + 0x9bc]
add esp, 8
cmp eax, 1
je 0x41a75f
mov eax, 0x493ae0
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a747
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a755
jmp 0x41a77c
mov eax, 0x493838
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41a766
lea edi, [esp + 0x48]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41a774
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 0x41a7ea
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 0x41a7ea
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 [0x4722e0]
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 [0x4722e4]
push 0x493838
mov dword [esp + 0x1d8], ecx
mov ecx, dword [0x4722e8]
push 7
mov dword [esp + 0x1e0], edx
mov dx, word [0x4722ec]
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 [0x4722ee]
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