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

Disassembly:
sub esp, 0x494
push ebp
push esi
push edi
lea eax, [esp + 0x20]
push 0x200
push eax
push 0
mov dword [esp + 0x24], 0x80
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1a0]
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.0041fcd0
add esp, 8
test eax, eax
jne 0x403165
lea edx, [esp + 0x20]
push 9
push edx
call fcn.0041fcd0
add esp, 8
test eax, eax
je 0x4031e7
call fcn.0041bb10
cmp eax, 4
lea edi, [esp + 0x20]
jb 0x4031b6
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 + 0x1a0]
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.0041ecde
add esp, 0xc
jmp 0x4031e7
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 0x403206
pop edi
pop esi
pop ebp
add esp, 0x494
ret
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x1b0]
push 0
push ecx
push 1
push 2
push 0x110
push 0xf01ff
push str.Sentinel_Protection_Server
push str.SentinelProtectionServer
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
jne 0x403250
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x494
ret
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40328a
push str.ChangeServiceConfig2A
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40328a
lea edx, [esp + 0x10]
mov dword [esp + 0x10], str.Manages_Sentinel_SuperPro_and_UltraPro_keys_attached_to_this_computer
push edx
push 1
push esi
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
push str.SentinelProtectionServer
lea eax, [esp + 0x2a8]
push str.SystemCurrentControlSetServicesEventLogApplication_s
push eax
call fcn.0041ecde
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x2a4]
push ecx
push 0xf003f
push 0
push edx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40332b
lea eax, [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0
lea edx, [esp + 0x2bc]
push 0
push edx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40332b
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.EventMessageFile
push ecx
call ebx
test eax, eax
je 0x40332b
mov dword [esp + 0x18], 7
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push 4
push edx
push 4
push 0
push str.TypesSupported
push eax
call ebx
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x124]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
jne 0x403383
lea edi, [esp + 0x124]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x124]
push ecx
mov ecx, dword [esp + 0x14]
push eax
push 1
push 0
push str.UserLogin
push ecx
call ebx
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x494
ret