Function at 0x402310
Capabilities:
Create service
Get session user name
Persist via windows service
Set registry value
Start service

Disassembly:
sub esp, 0x490
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x20]
push 0x200
push eax
push 0
mov dword [esp + 0x20], 0x80
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2a0]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x20
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
push ecx
call fcn.00413e60
add esp, 8
test eax, eax
jne 0x402386
lea edx, [esp + 0x20]
push 9
push edx
call fcn.00413e60
add esp, 8
test eax, eax
je 0x402408
call fcn.0040fd90
cmp eax, 4
lea edi, [esp + 0x20]
jb 0x4023d7
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x3a0]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x2a0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x3a0]
push ecx
push str.__s_
push edx
call fcn.00413de0
add esp, 0xc
jmp 0x402408
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x21]
lea edx, [esp + 0x20]
mov byte [esp + ecx + 0x1f], al
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
jne 0x402428
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x490
ret
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x2b0]
push 0
push ecx
push 1
push 2
push 0x110
push 0xf01ff
push str.SuperProServer
push str.SuperProServer
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, eax
test ebx, ebx
jne 0x402473
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x490
ret
push str.SuperProServer
lea edx, [esp + 0x1a4]
push str.SystemCurrentControlSetServicesEventLogApplication_s
push edx
call fcn.00413de0
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1a0]
push eax
push 0xf003f
push 0
push ecx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x402512
lea edx, [esp + 0x1c]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push 0xf003f
push 0
push 0
lea ecx, [esp + 0x1b8]
push 0
push ecx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x402512
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
push str.EventMessageFile
push eax
call esi
test eax, eax
je 0x402512
mov dword [esp + 0x18], 7
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push 4
push ecx
push 4
push 0
push str.TypesSupported
push edx
call esi
lea eax, [esp + 0x14]
lea ecx, [esp + 0x120]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
jne 0x402569
lea edi, [esp + 0x120]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x120]
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
mov eax, dword [esp + 0x20]
push str.UserLogin
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x490
ret