Function at 0x406cf0
Capabilities:
Create service
Persist via run registry key
Persist via windows service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x431c4e
push eax
mov al, byte [0x4442fc]
mov dword fs:[0], esp
sub esp, 0x24c
test al, al
push ebx
push ebp
push esi
push edi
mov ebx, str._service
jne 0x406d22
mov ebx, str._noconsole__service
push 0
lea ecx, [esp + 0x14]
call fcn.0040cc90
mov eax, dword [esp + 0x10]
mov dword [esp + 0x264], 0
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d40
mov ebp, dword [esp + 0x274]
sub eax, edx
xor ecx, ecx
test ebp, ebp
lea esi, [eax + 4]
jle 0x406d82
lea esp, [esp]
mov eax, dword [esp + 0x278]
mov eax, dword [eax + ecx*4]
lea edi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406d70
sub eax, edi
inc ecx
cmp ecx, ebp
lea esi, [esi + eax + 3]
jl 0x406d60
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d87
sub eax, edx
add eax, esi
push eax
call fcn.0042479d
mov ebp, eax
mov dword [esp + 0x54], ebp
mov ecx, dword [esp + 0x14]
push ebx
push ecx
push str.__s___s
push ebp
mov byte [esp + 0x278], 1
call fcn.00424814
mov eax, dword [esp + 0x288]
add esp, 0x14
xor ebx, ebx
test eax, eax
jle 0x406e3e
mov edi, ebp
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406dd0
mov dx, word [0x436e1c]
mov ecx, dword [esp + 0x278]
mov word [edi], dx
mov al, byte [0x436e1e]
mov byte [edi + 2], al
mov eax, dword [ecx + ebx*4]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406df6
mov edi, ebp
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406e04
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]
mov edi, ebp
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406e20
mov eax, dword [esp + 0x274]
mov dx, word [0x436e18]
inc ebx
cmp ebx, eax
mov word [edi], dx
jl 0x406dc7
mov al, byte [0x4442fc]
test al, al
je 0x407065
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [esp + 0x24], eax
test eax, eax
mov byte [esp + 0x264], 2
jne 0x406e8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_open_Service_Control_Manager
lea ecx, [esp + 0x5c]
call fcn.004080dc
push 0x43cf90
lea eax, [esp + 0x58]
push eax
call fcn.0042409a
mov ecx, dword [esp + 0x270]
push 0
mov esi, dword [esp + 0x270]
push 0
push 0
push 0
push 0
push ebp
push 0
push 2
push 0x110
push 0xf003f
push ecx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
mov dword [esp + 0x4c], ebx
test ebx, ebx
mov byte [esp + 0x264], 3
jne 0x406ef1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.unable_to_create_service
lea ecx, [esp + 0x5c]
call fcn.004080dc
push 0x43cf90
lea edx, [esp + 0x58]
push edx
call fcn.0042409a
lea ecx, [esp + 0x38]
call fcn.0040dfa0
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 4
call fcn.0040dfa0
push reloc.WS2_32.dll_bind
lea ecx, [esp + 0x2c]
mov byte [esp + 0x268], 5
call fcn.0040dfb0
push str.SYSTEMCurrentControlSetServicesEventLogApplication
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x26c], 6
call fcn.0040e140
lea ecx, [esp + 0x28]
mov byte [esp + 0x264], 5
call fcn.0040e110
push esi
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x40]
call fcn.0040e140
mov edx, dword [esp + 0x10]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f65
sub eax, esi
test eax, eax
jle 0x406f88
cmp byte [eax + edx], 0x5c
je 0x406f7f
dec eax
test eax, eax
jg 0x406f72
jmp 0x406f88
mov byte [eax + edx + 1], 0
mov edx, dword [esp + 0x10]
mov eax, edx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f90
sub eax, edx
mov edx, eax
mov eax, str.logmessages.dll
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406fa3
sub eax, esi
lea edx, [eax + edx + 1]
push edx
call fcn.0042479d
mov esi, eax
add esp, 4
mov dword [esp + 0x48], esi
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x264], 7
mov edx, esi
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x406fd0
mov edi, esi
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406fe0
mov eax, dword [str.logmessages.dll]
mov dword [edi], eax
mov ecx, dword [0x436df0]
mov dword [edi + 4], ecx
mov edx, dword [0x436df4]
mov dword [edi + 8], edx
mov eax, dword [0x436df8]
push esi
push str.EventMessageFile
lea ecx, [esp + 0x40]
mov dword [edi + 0xc], eax
call fcn.0040dd90
push 5
push str.TypesSupported
lea ecx, [esp + 0x40]
call fcn.0040de70
push esi
call fcn.00424033
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 4
call fcn.0040e110
lea ecx, [esp + 0x38]
mov byte [esp + 0x264], 3
call fcn.0040e110
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
mov ecx, dword [esp + 0x24]
push ecx
call esi
jmp 0x4070d3
lea ecx, [esp + 0x14]
call fcn.0040dfa0
mov bl, 8
push reloc.WS2_32.dll_bind
lea ecx, [esp + 0x2c]
mov byte [esp + 0x268], bl
call fcn.0040dfb0
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x26c], 9
call fcn.0040e140
lea ecx, [esp + 0x28]
mov byte [esp + 0x264], bl
call fcn.0040e110
mov eax, dword [esp + 0x26c]
push ebp
push eax
lea ecx, [esp + 0x1c]
call fcn.0040de00
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 1
call fcn.0040e110
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebp
call fcn.00424033
mov ecx, dword [esp + 0x14]
push ecx
call fcn.00424033
mov ecx, dword [esp + 0x264]
add esp, 8
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x258
ret