Function at 0x403b0e
Capabilities:
Create service
Persist via windows service
Query service status
Start service

Disassembly:
sub esp, 0x130
push ebx
push ebp
push 0x22
pop eax
push 0x102
mov word [esp + 0x38], ax
xor ebp, ebp
lea eax, [esp + 0x3a]
mov dword [esp + 0x10], edx
push ebp
push eax
mov ebx, ecx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x35]
push 0x103
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403b66
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Cannot_install_service___d__n
call fcn.0040408b
pop ecx
pop ecx
jmp 0x403eb1
push edi
lea edi, [esp + 0x38]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403b6c
mov ax, word [0x407afc]
push esi
xor esi, esi
mov word [edi], ax
inc esi
mov dword [esp + 0x10], esi
cmp dword [0x40ab3c], esi
jle 0x403cb6
mov edi, dword [0x40ab38]
push 3
push 0x407b20
push dword [edi + esi*4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x403ca5
push 3
push 0x407b24
push dword [edi + esi*4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x403ca4
push 3
push 0x407b28
push dword [edi + esi*4]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x403ca4
lea edi, [esp + 0x3c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403bea
mov edx, dword [0x40ab38]
mov ax, word [0x407b2c]
mov word [edi], ax
push 0x20
push dword [edx + esi*4]
call dword [sym.imp.msvcrt.dll_strchr]
pop ecx
pop ecx
test eax, eax
je 0x403c69
lea edi, [esp + 0x3c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403c17
mov edx, dword [0x40ab38]
mov ax, word [0x407afc]
mov word [edi], ax
mov edx, dword [edx + esi*4]
mov esi, edx
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403c33
lea edi, [esp + 0x3c]
sub edx, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403c41
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x3c]
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403c5c
mov word [edi], ax
jmp 0x403c98
mov edx, dword [0x40ab38]
mov edx, dword [edx + esi*4]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x403c74
lea edi, [esp + 0x3c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403c82
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov edi, dword [0x40ab38]
jmp 0x403ca5
inc esi
inc esi
mov dword [esp + 0x10], esi
cmp esi, dword [0x40ab3c]
jl 0x403b97
lea edx, [esp + 0x10]
lea ecx, [esp + 0x18]
call fcn.00403a22
test al, al
jne 0x403cdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Service_removal_failed___d__n
call fcn.0040408b
pop ecx
pop ecx
jmp 0x403eaf
test ebx, ebx
je 0x403d7f
mov esi, dword [sym.imp.msvcrt.dll__stricmp]
push 0x407b50
push ebx
call esi
test eax, eax
mov edi, str.NT_AUTHORITYLocalService
push 0x407b70
cmovne edi, ebx
push edi
call esi
test eax, eax
mov ebx, str.NT_AUTHORITYNetworkService
push 0x5c
cmovne ebx, edi
push ebx
call dword [sym.imp.msvcrt.dll_strchr]
add esp, 0x18
test eax, eax
jne 0x403d7f
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403d26
sub ecx, edx
lea eax, [ecx + 3]
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebp, eax
pop ecx
test ebp, ebp
jne 0x403d47
call fcn.00401dca
mov ebp, eax
mov ax, word [0x407b90]
mov esi, ebx
mov word [ebp], ax
mov al, byte [0x407b92]
mov byte [ebp + 2], al
mov al, byte [ebx]
inc ebx
test al, al
jne 0x403d5b
sub ebx, esi
lea edi, [ebp - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403d67
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push dword [esp + 0x14]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x40]
push ebx
push str.tcpip
xor ebx, ebx
mov dword [esp + 0x28], esi
push ebx
push ebx
push eax
push 1
push 2
push 0x10
push 0xf01ff
push str.Key_Management_Server
push str.vlmcsd
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edx, dword [esp + 0x14]
mov edi, eax
lea eax, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x403dbf
sub edx, eax
je 0x403dd4
mov eax, dword [esp + 0x14]
mov byte [eax], bl
inc eax
dec edx
jne 0x403dce
test ebp, ebp
je 0x403de0
push ebp
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test edi, edi
jne 0x403e03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateService_failed___u__n
call fcn.0040408b
pop ecx
pop ecx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x403eaf
push str.Service_installed_successfully_n
call fcn.0040408b
cmp dword [esp + 0x1c], 4
pop ecx
jne 0x403ea0
mov esi, dword [sym.imp.msvcrt.dll_printf]
push str.Restarting_vlmcsd_service__
call esi
pop ecx
push ebx
push ebx
push edi
mov dword [esp + 0x30], 1
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x403e8d
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x403e63
mov eax, dword [esp + 0x24]
cmp eax, 2
jne 0x403e67
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0xa
jl 0x403e3c
mov eax, dword [esp + 0x24]
cmp eax, 4
jne 0x403e75
push str.Success_n
call esi
jmp 0x403e9f
cmp eax, 2
jne 0x403e81
push str.Not_ready_within_a_second_n
jmp 0x403e71
push str.Error_n
call fcn.0040408b
jmp 0x403e9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_n
call fcn.0040408b
pop ecx
pop ecx
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
push dword [esp + 0x1c]
call esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x130
ret