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

Disassembly:
test dword [0x4b63ec], 0xffffff80
jne 0x40db28
test dword [0x4b63ec], 0xffffffff
jne 0x40de98
call fcn.00490ee4
jmp fcn.0040db00
push edi
push esi
push ebp
push ebx
sub esp, 0x370
mov dword [esp + 0x364], ecx
mov dword [ecx + 0x20], 1
mov ecx, 0x4a3b98
mov dword [esp + 0x354], ecx
mov dword [esp + 0x358], 0
mov dword [esp + 0x35c], 0x4b8f60
cmp dword [0x4a3ba4], 0
jl 0x40db7f
lea eax, [esp + 0x360]
push eax
push dword [esp + 0x360]
call fcn.0045763c
lea eax, [esp + 0x108]
push 0x9c
push 0
push eax
call fcn.004910c4
add esp, 0xc
mov eax, 0x9c
xor ecx, ecx
lea edx, [esp + 0x108]
mov word [esp + 0x12c], ax
mov word [esp + 0x12e], cx
push edx
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
mov dword [esp + 0x130], 0x1c0000
push 0x4b8adc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push 0x4b8ae4
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push 0x4b8c20
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x368], eax
mov edx, eax
test edx, edx
je 0x40de50
test esi, esi
je 0x40de75
lea edx, [esp + 0x1a8]
push 0x1a8
push 0
push edx
call fcn.004910c4
add esp, 0xc
mov dword [esp + 0x1a8], 0x1a8
xor edx, edx
lea ebp, [esp + 0x1a8]
mov byte [esp + 0x108], dl
push edx
push ebp
push edx
push edx
call esi
test eax, eax
je 0x40dc99
mov dword [esp + 0x36c], ebx
xor ebp, ebp
mov ebx, esi
lea edi, [esp + 0x1cc]
mov esi, 0x4b8ac0
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40dc7c
or dl, dl
je 0x40dc78
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x40dc7c
add edi, 2
add esi, 2
or dl, dl
jne 0x40dc5c
xor eax, eax
jmp 0x40dc81
sbb eax, eax
or eax, 1
test eax, eax
je 0x40dca4
inc ebp
xor ecx, ecx
lea edx, [esp + 0x1a8]
push ecx
push edx
push ebp
push ecx
call ebx
test eax, eax
jne 0x40dc50
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
mov ebx, dword [esp + 0x36c]
lea esi, [esp]
mov edi, 0x4b8ca0
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x40dcb3
mov dword [esp + 0x360], 0
lea edx, [esp + 0x360]
push edx
push 0x4b8d80
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40dcef
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x350], 0
lea ecx, [esp]
lea edx, [esp + 0x350]
push edx
push ecx
push dword [esp + 0x368]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40dd22
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
xor ebp, ebp
mov ecx, 4
lea edx, [esp + 0x1a4]
mov dword [esp + 0x1a4], ebp
push ecx
push edx
push ecx
push ebp
push 0x4b8ec0
push dword [esp + 0x364]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40dd5c
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
lea esi, [esp + 0x108]
mov edi, 0x4b8ed4
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x40dd68
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov esi, eax
test esi, esi
je 0x40dda7
push 0x2000000
xor edx, edx
push edx
push edx
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebp, eax
test ebp, ebp
je 0x40de80
push ebp
call dword [sym.imp.USER32.dll_SetThreadDesktop]
jmp 0x40dda9
xor ebp, ebp
mov edx, dword [esp + 0x364]
cmp dword [edx + 0x24], 0
jne 0x40ddfa
mov ecx, 1
xor edi, edi
mov dword [edx + 0xc], ecx
lea edx, [esp + 0x108]
push edi
push ecx
push edi
push edx
lea edx, [esp + 0x1bc]
push edx
mov edx, dword [esp + 0x37c]
call edx
lea ecx, [esp + 0x108]
xor edx, edx
push edx
push edx
push edx
push ecx
lea edi, [esp + 0x1bc]
push edi
mov edx, dword [esp + 0x37c]
call edx
mov edx, dword [esp + 0x364]
test ebx, ebx
mov dword [edx + 0xc], 0
je 0x40de13
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 + 0x104]
mov dword [esp + 0x104], ecx
push edx
push eax
push edx
push ecx
push 0x4b8ec0
push dword [esp + 0x364]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40de5b
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
push dword [esp + 0x360]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x350]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x1f4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
jmp 0x40dda9
push edi
push esi
push ebp
push ebx
sub esp, 0x370
mov dword [esp + 0x364], ecx
mov dword [ecx + 0x20], 1
mov ecx, 0x4a3b98
mov dword [esp + 0x354], ecx
mov dword [esp + 0x358], 0
mov dword [esp + 0x35c], 0x4b8f60
cmp dword [0x4a3ba4], 0
jl 0x40deef
lea eax, [esp + 0x360]
push eax
push dword [esp + 0x360]
call fcn.0045763c
lea eax, [esp + 0x108]
push 0x9c
push 0
push eax
call fcn.004910c4
add esp, 0xc
mov eax, 0x9c
mov word [esp + 0x12c], ax
xor ecx, ecx
mov word [esp + 0x12e], cx
lea edx, [esp + 0x108]
push edx
push 0xffffffffffffffff
push ecx
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
mov dword [esp + 0x130], 0x1c0000
push 0x4b8adc
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push 0x4b8ae4
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push 0x4b8c20
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 0x368], eax
mov edx, eax
test edx, edx
je 0x40e1cf
test esi, esi
je 0x40e1f4
lea edx, [esp + 0x1a8]
push 0x1a8
push 0
push edx
call fcn.004910c4
add esp, 0xc
mov dword [esp + 0x1a8], 0x1a8
xor edx, edx
mov byte [esp + 0x108], dl
lea edi, [esp + 0x1a8]
push edx
push edi
push edx
push edx
call esi
test eax, eax
je 0x40e01b
xor ebx, ebx
mov dword [esp + 0x36c], ebp
mov ecx, eax
mov ebp, esi
lea edi, [esp + 0x1cc]
mov esi, 0x4b8ac0
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40dfee
or dl, dl
je 0x40dfea
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x40dfee
add edi, 2
add esi, 2
or dl, dl
jne 0x40dfce
xor eax, eax
jmp 0x40dff3
sbb eax, eax
or eax, 1
test eax, eax
je 0x40e012
inc ebx
xor ecx, ecx
lea edx, [esp + 0x1a8]
push ecx
push edx
push ebx
push ecx
call ebp
mov ecx, eax
test ecx, ecx
jne 0x40dfc2
jmp 0x40e214
mov eax, ecx
mov ebp, dword [esp + 0x36c]
test eax, eax
jne 0x40e02a
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
lea esi, [esp]
mov edi, 0x4b8ca0
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x40e032
mov dword [esp + 0x360], 0
lea edx, [esp + 0x360]
push edx
push 0x4b8d80
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40e06e
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x350], 0
lea ecx, [esp]
lea edx, [esp + 0x350]
push edx
push ecx
push dword [esp + 0x368]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x40e0a1
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
xor ebx, ebx
mov dword [esp + 0x1a4], ebx
mov ecx, 4
lea edx, [esp + 0x1a4]
push ecx
push edx
push ecx
push ebx
push 0x4b8ec0
push dword [esp + 0x364]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40e0db
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
lea esi, [esp + 0x108]
mov edi, 0x4b8ed4
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x40e0e7
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_GetThreadDesktop]
mov esi, eax
test esi, esi
je 0x40e126
xor edx, edx
push 0x2000000
push edx
push edx
call dword [sym.imp.USER32.dll_OpenInputDesktop]
mov ebx, eax
test ebx, ebx
je 0x40e1ff
push ebx
call dword [sym.imp.USER32.dll_SetThreadDesktop]
jmp 0x40e128
xor ebx, ebx
mov edx, dword [esp + 0x364]
cmp dword [edx + 0x24], 0
jne 0x40e179
mov ecx, 1
mov dword [edx + 0xc], ecx
lea edx, [esp + 0x108]
xor edi, edi
push edi
push ecx
push edi
push edx
lea edx, [esp + 0x1bc]
push edx
mov edx, dword [esp + 0x37c]
call edx
lea ecx, [esp + 0x108]
xor edx, edx
push edx
push edx
push edx
push ecx
lea edi, [esp + 0x1bc]
push edi
mov edx, dword [esp + 0x37c]
call edx
mov edx, dword [esp + 0x364]
mov dword [edx + 0xc], 0
test ebp, ebp
je 0x40e192
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.USER32.dll_SetThreadDesktop]
push ebx
call dword [sym.imp.USER32.dll_CloseDesktop]
xor ecx, ecx
mov dword [esp + 0x104], ecx
mov edx, 4
lea eax, [esp + 0x104]
push edx
push eax
push edx
push ecx
push 0x4b8ec0
push dword [esp + 0x364]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40e1da
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
push dword [esp + 0x360]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x350]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esp, 0x370
pop ebx
pop ebp
pop esi
pop edi
ret
push 0x1f4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Beep]
jmp 0x40e128
mov eax, ecx
mov ebp, dword [esp + 0x36c]
jmp 0x40e01b