Function at 0x401350
Capabilities:
Create service
Modify service
Persist via windows service
Set registry value
Start service

Disassembly:
sub esp, 0x194
mov eax, dword [0x416b74]
xor eax, esp
mov dword [esp + 0x190], eax
mov eax, dword [esp + 0x19c]
mov dword [esp + 8], eax
xor eax, eax
mov cl, byte [eax + 0x41bfb0]
mov byte [esp + eax + 0xc], cl
add eax, 1
test cl, cl
jne 0x401371
lea eax, [esp + 0xc]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401390
mov ecx, dword [str.Student.exe]
mov edx, dword [0x4103c8]
push ebx
push ebp
push esi
push edi
mov dword [eax], ecx
mov ecx, dword [0x4103cc]
push 2
mov dword [eax + 4], edx
mov dl, byte [0x4103d0]
push str.ServicesActive
mov dword [eax + 8], ecx
push 0
mov byte [eax + 0xc], dl
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlSafeBootNetwork
push reloc.WSOCK32.dll_bind
call esi
test eax, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40144b
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0
push 0xf003f
push 0
push 0x41037d
push 0
push str.LanSchoolStudent
push edx
call ebp
test eax, eax
jne 0x401444
push 8
push str.Service
push 1
push eax
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call ebx
mov edx, dword [esp + 0x14]
push edx
call ebx
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlSafeBootMinimal
push reloc.WSOCK32.dll_bind
call esi
test eax, eax
jne 0x4014ae
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push eax
push 0xf003f
push eax
push 0x41037d
push eax
push str.LanSchoolStudent
push edx
call ebp
test eax, eax
jne 0x4014a7
push 8
push str.Service
push 1
push eax
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call ebx
mov edx, dword [esp + 0x14]
push edx
call ebx
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 8]
push 1
push eax
push str.Channel
call fcn.00402040
push eax
call fcn.00402250
add esp, 0x10
test byte [0x41bda0], 8
je 0x4014ed
mov ecx, dword [esi + 0x14]
push 1
push ecx
push str.PerfCnt
call fcn.00402040
push eax
call fcn.00402250
add esp, 0x10
test edi, edi
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x401591
push 0x41c1b8
lea edx, [esp + 0xa0]
push str._s_Student_Service
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
push 1
push 2
push 0x110
push 0xf01ff
lea ecx, [esp + 0xc4]
push ecx
push str.LanSchoolStudent
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x40158e
push 0xf01ff
push str.LanSchoolStudent
push edi
call ebp
mov esi, eax
test esi, esi
je 0x40158e
lea edx, [esp + 0x9c]
push edx
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x34]
push eax
push 1
push 2
push 0x110
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push esi
call ebx
push edi
call ebx
push 0xf003f
push str.ServicesActive
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x4015ca
push 0x10
push str.LanSchoolStudent
push edi
call ebp
mov esi, eax
test esi, esi
je 0x4015c7
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
call ebx
push edi
call ebx
mov ecx, dword [esp + 0x1a0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040757a
add esp, 0x194
ret