Function at 0x40d310
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x35c
mov eax, dword [0x48ea40]
xor eax, esp
mov dword [esp + 0x358], eax
push ebx
push ebp
push esi
push edi
push str.USER32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push str.EnumDisplayDevicesA
push ebp
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x9c
mov ebx, eax
xor edi, edi
lea eax, [esp + 0x24]
push edi
push eax
call fcn.0045c220
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push 0xffffffffffffffff
push edi
mov word [esp + 0x50], 0x9c
mov word [esp + 0x52], di
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
cmp eax, edi
mov dword [esp + 0x48], 0x1c0000
je 0x40d651
push 0x1a8
lea edx, [esp + 0xc0]
push edi
push edx
call fcn.0045c220
add esp, 0xc
push edi
lea eax, [esp + 0xc0]
push eax
push edi
push edi
mov dword [esp + 0xcc], 0x1a8
mov byte [esp + 0x30], 0
call ebx
mov esi, eax
test esi, esi
je 0x40d417
nop
mov edx, dword [str.mv_video_hook_driver2]
lea ecx, [esp + 0xe0]
lea ecx, [ecx]
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40d3f0
test al, al
je 0x40d3ec
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40d3f0
add ecx, 2
add edx, 2
test al, al
jne 0x40d3d0
xor eax, eax
jmp 0x40d3f5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40d413
push 0
lea ecx, [esp + 0xc0]
push ecx
add edi, 1
push edi
push 0
call ebx
mov esi, eax
test esi, esi
jne 0x40d3c0
jmp 0x40d417
test esi, esi
jne 0x40d430
mov edx, dword [str.mv_video_hook_driver2]
push edx
push str.No__s_found._n
call fcn.0045df62
add esp, 8
jmp 0x40d651
lea eax, [esp + 0x1e4]
push eax
lea ecx, [esp + 0x168]
push ecx
lea edx, [esp + 0xe8]
push edx
lea eax, [esp + 0xcc]
push eax
push edi
push str.DevNum:_d_nName:_s_nString:_s_nID:_s_nKey:_s_n_n
call fcn.0045df62
lea ecx, [esp + 0x1fc]
push ecx
call fcn.0045df00
lea edx, [esp + 0x200]
push str.DEVICE
push edx
call fcn.0045db10
xor esi, esi
add esp, 0x24
cmp eax, esi
jne 0x40d497
push str.DEVICE0
push 0x104
lea eax, [esp + 0x26c]
push eax
jmp 0x40d4a8
add eax, 1
push eax
push 0x104
lea ecx, [esp + 0x26c]
push ecx
call fcn.0040cbf0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
lea edx, [esp + 0x14]
push edx
push str.SYSTEMCurrentControlSetHardware_ProfilesCurrentSystemCurrentControlSetServicesmv2
push reloc.WSOCK32.dll_bind
mov dword [esp + 0x20], esi
call edi
test eax, eax
je 0x40d4d3
cmp ebp, esi
jmp 0x40d653
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x268]
push ecx
push edx
mov dword [esp + 0x1c], esi
call edi
test eax, eax
je 0x40d4f6
cmp ebp, esi
jmp 0x40d653
mov ecx, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push esi
push str.Attach.ToDesktop
push ecx
mov dword [esp + 0x30], esi
call ebx
test eax, eax
je 0x40d521
cmp ebp, esi
jmp 0x40d653
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
lea ecx, [esp + 0x1e4]
push str.SYSTEM
push ecx
call fcn.0045db10
add esp, 8
lea edx, [esp + 0x10]
push edx
push str.SYSTEMCurrentControlSetHardware_ProfilesCurrent
push reloc.WSOCK32.dll_bind
mov ebp, eax
mov dword [esp + 0x1c], 0
call edi
test eax, eax
je 0x40d57b
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40d65c
push eax
jmp 0x40d656
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ebp
push ecx
mov dword [esp + 0x20], 0
call edi
test eax, eax
jne 0x40d569
push 4
lea edx, [esp + 0x1c]
push edx
push 4
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
push str.Attach.ToDesktop
push eax
call ebx
test eax, eax
jne 0x40d569
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
push 0x476760
push 0x20
lea eax, [esp + 0x28]
push eax
call fcn.0040cbf0
mov dword [esp + 0x88], 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov ebx, dword [sym.imp.USER32.dll_SetThreadDesktop]
mov esi, eax
test esi, esi
je 0x40d60f
push 0x2000000
push 0
push 0
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebp, eax
test ebp, ebp
je 0x40d613
push ebp
call ebx
jmp 0x40d613
mov ebp, dword [esp + 0x18]
mov edi, dword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
push 0
push 1
push 0
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0xd0]
push edx
call edi
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0xd0]
push ecx
call edi
push esi
call ebx
push ebp
call dword [sym.imp.USER32.dll_CloseDesktop]
mov ebp, dword [esp + 0x1c]
test ebp, ebp
je 0x40d65c
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x368]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045c20d
add esp, 0x35c
ret