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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x364
mov dword [esp], ecx
mov dword [ecx + 0x20], 1
push 0x4979c0
push 0
push 0x481eac
call fcn.00407ffc
lea eax, [esp + 0x18]
push 0x9c
push 0
push eax
call fcn.0046e690
add esp, 0x18
mov eax, 0x9c
xor ecx, ecx
lea edx, [esp + 0xc]
mov word [esp + 0x30], ax
mov word [esp + 0x32], cx
push edx
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
mov dword [esp + 0x34], 0x1c0000
push 0x4977bc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push 0x4977c4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push 0x497900
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 4], eax
mov edx, eax
test edx, edx
je 0x409540
test esi, esi
je 0x409565
lea edx, [esp + 0xa8]
push 0x1a8
push 0
push edx
call fcn.0046e690
add esp, 0xc
mov dword [esp + 0xa8], 0x1a8
xor edx, edx
xor ebp, ebp
mov byte [esp + 0xc], dl
lea ecx, [esp + 0xa8]
push edx
push ecx
push edx
push edx
call esi
test eax, eax
je 0x40939f
mov dword [esp + 8], ebx
mov ebx, esi
lea edi, [esp + 0xcc]
mov esi, 0x4977a0
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x409382
or dl, dl
je 0x40937e
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x409382
add edi, 2
add esi, 2
or dl, dl
jne 0x409362
xor eax, eax
jmp 0x409387
sbb eax, eax
or eax, 1
test eax, eax
je 0x4093aa
inc ebp
xor ecx, ecx
lea edx, [esp + 0xa8]
push ecx
push edx
push ebp
push ecx
call ebx
test eax, eax
jne 0x409356
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
mov ebx, dword [esp + 8]
lea esi, [esp + 0x250]
mov edi, 0x49792c
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x4093ba
mov dword [esp + 0x354], 0
lea edx, [esp + 0x354]
push edx
push 0x497940
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4093f6
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x358], 0
lea ecx, [esp + 0x250]
lea edx, [esp + 0x358]
push edx
push ecx
push dword [esp + 0x35c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40942d
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
xor ebp, ebp
mov ecx, 4
lea edx, [esp + 0x35c]
mov dword [esp + 0x35c], ebp
push ecx
push edx
push ecx
push ebp
push 0x4979a0
push dword [esp + 0x36c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x409467
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
lea esi, [esp + 0xc]
mov edi, 0x4979b4
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x409470
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov esi, eax
test esi, esi
je 0x4094ad
xor edx, edx
push 0x2000000
push edx
push edx
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebp, eax
test ebp, ebp
je 0x409570
push ebp
call dword [sym.imp.USER32.dll_SetThreadDesktop]
mov edx, dword [esp]
cmp dword [edx + 0x24], 0
jne 0x4094ee
mov ecx, 1
xor edi, edi
mov dword [edx + 0xc], ecx
lea edx, [esp + 0xc]
push edi
push ecx
push edi
push edx
lea edx, [esp + 0xbc]
push edx
mov edx, dword [esp + 0x18]
call edx
lea ecx, [esp + 0xc]
xor edx, edx
push edx
push edx
push edx
push ecx
lea edi, [esp + 0xbc]
push edi
mov edx, dword [esp + 0x18]
call edx
mov edx, dword [esp]
test ebx, ebx
mov dword [edx + 0xc], 0
je 0x409503
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
push ebp
call dword [sym.imp.USER32.dll_CloseDesktop]
xor ecx, ecx
mov edx, 4
lea eax, [esp + 0x360]
mov dword [esp + 0x360], ecx
push edx
push eax
push edx
push ecx
push 0x4979a0
push dword [esp + 0x36c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40954b
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
push dword [esp + 0x354]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x358]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x364
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x1f4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
jmp 0x4094ad