Function at 0x40d680
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
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push str.EnumDisplayDevicesA
push ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x9c
mov edi, eax
xor ebx, ebx
lea eax, [esp + 0x24]
push ebx
push eax
call fcn.0045c220
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
push 0xffffffffffffffff
push ebx
mov word [esp + 0x50], 0x9c
mov word [esp + 0x52], bx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
mov ecx, dword [esp + 0x88]
cmp ecx, 8
mov dword [esp + 0x48], 0x1c0020
je 0x40d70a
cmp ecx, 0x10
je 0x40d70a
cmp ecx, 0x20
jne 0x40d9c1
shr ecx, 3
imul ecx, dword [esp + 0x378]
imul ecx, dword [esp + 0x37c]
add ecx, 0xdac4
cmp eax, ebx
mov dword [esi + 0x18], ecx
je 0x40d9c1
push 0x1a8
lea edx, [esp + 0xc0]
push ebx
push edx
call fcn.0045c220
add esp, 0xc
push 0
lea eax, [esp + 0xc0]
push eax
push 0
push 0
mov dword [esp + 0xcc], 0x1a8
mov byte [esp + 0x30], bl
call edi
mov esi, eax
test esi, esi
je 0x40d7c7
lea esp, [esp]
mov edx, dword [str.mv_video_hook_driver2]
lea ecx, [esp + 0xe0]
lea ecx, [ecx]
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40d7a0
test al, al
je 0x40d79c
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40d7a0
add ecx, 2
add edx, 2
test al, al
jne 0x40d780
xor eax, eax
jmp 0x40d7a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40d7c3
push 0
lea ecx, [esp + 0xc0]
push ecx
add ebx, 1
push ebx
push 0
call edi
mov esi, eax
test esi, esi
jne 0x40d770
jmp 0x40d7c7
test esi, esi
jne 0x40d7e2
mov edx, dword [str.mv_video_hook_driver2]
push edx
push str.No__s_found._n
call fcn.0045df62
add esp, 8
test ebp, ebp
jmp 0x40d9c3
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 ebx
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 edi, edi
add esp, 0x24
cmp eax, edi
jne 0x40d849
push str.DEVICE0
push 0x104
lea eax, [esp + 0x26c]
push eax
jmp 0x40d85a
add eax, 1
push eax
push 0x104
lea ecx, [esp + 0x26c]
push ecx
call fcn.0040cbf0
mov esi, 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], edi
call esi
test eax, eax
je 0x40d885
cmp ebp, edi
jmp 0x40d9c3
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x268]
push ecx
push edx
mov dword [esp + 0x1c], edi
call esi
test eax, eax
je 0x40d8a8
cmp ebp, edi
jmp 0x40d9c3
mov ecx, dword [esp + 0x10]
push 4
lea eax, [esp + 0x20]
push eax
push 4
push edi
push str.Attach.ToDesktop
push ecx
mov dword [esp + 0x34], 1
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40d8d5
cmp ebp, edi
jmp 0x40d9c3
push 0x476760
push 0x20
lea edx, [esp + 0x28]
push edx
call fcn.0040cbf0
mov eax, dword [esp + 0x378]
mov ecx, dword [esp + 0x37c]
mov edx, dword [esp + 0x370]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x374]
mov dword [esp + 0x90], ecx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
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
cmp esi, edi
je 0x40d949
push 0x2000000
push edi
push edi
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebp, eax
cmp ebp, edi
je 0x40d94d
push ebp
call ebx
jmp 0x40d94d
mov ebp, dword [esp + 0x1c]
push edi
push 1
push edi
mov edi, dword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0xd0]
push edx
call edi
test eax, eax
je 0x40d975
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d9cc
push eax
jmp 0x40d9c6
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0xd0]
push ecx
call edi
push esi
mov edi, eax
call ebx
push ebp
call dword [sym.imp.USER32.dll_CloseDesktop]
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
test edi, edi
mov eax, dword [esp + 0x18]
jne 0x40d96e
test eax, eax
je 0x40d9bd
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov al, 1
jmp 0x40d9ce
cmp ebp, ebx
je 0x40d9cc
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
mov ecx, dword [esp + 0x368]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0045c20d
add esp, 0x35c
ret 0x10