Function at 0x402870
Capabilities:
Listen for remote procedure calls

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
test byte [0x4081a0], 8
jne 0x402aa0
mov eax, dword [0x4081e0]
mov dword [ebp - 0x28], eax
mov eax, dword [0x408220]
mov dword [ebp - 0x24], eax
mov eax, dword [0x408254]
mov dword [ebp - 0x20], eax
mov esi, dword [sym.imp.rpcrt4.dll_RpcServerRegisterIf]
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + edi*4 - 0x28]
mov dword [esp], eax
call esi
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x402b18
add edi, 1
cmp edi, 3
jne 0x4028a6
mov esi, dword [sym.imp.rpcrt4.dll_RpcServerUseProtseqEpW]
mov eax, dword [ebx*8 + 0x4093a4]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0xa
mov dword [esp + 8], eax
mov eax, dword [ebx*8 + 0x4093a0]
mov dword [esp], eax
call esi
sub esp, 0x10
test eax, eax
jne 0x402a30
add ebx, 1
cmp ebx, 4
jne 0x4028da
mov dword [esp + 8], 1
mov dword [esp + 4], 0x4d2
mov dword [esp], 1
call dword [sym.imp.rpcrt4.dll_RpcServerListen]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x402a32
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov dword [0x40c00c], eax
mov dword [esp + 8], 0
mov dword [esp + 4], sym._service_handler_16
mov dword [esp], str.RpcSs
call dword [sym.imp.advapi32.dll_RegisterServiceCtrlHandlerExW]
mov dword [0x40c008], eax
sub esp, 0xc
test eax, eax
je 0x402a26
lea edx, [ebp - 0x28]
mov dword [ebp - 0x28], 0x30
mov ebx, dword [sym.imp.advapi32.dll_SetServiceStatus]
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x20], 5
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0x2710
mov dword [esp + 4], edx
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [esp + 4], 0xffffffff
mov eax, dword [0x40c00c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x24], 1
sub esp, 8
mov dword [ebp - 0x20], 0
mov dword [esp + 4], eax
mov eax, dword [0x40c008]
mov dword [esp], eax
call ebx
sub esp, 8
test byte [0x4081a0], 8
jne 0x402b38
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov ebx, eax
lea esi, [ebp - 0x28]
lea edi, [esi + edi*4]
mov dword [esp + 8], 0
add esi, 4
mov dword [esp + 4], 0
mov eax, dword [esi - 4]
mov dword [esp], eax
call dword [sym.imp.rpcrt4.dll_RpcServerUnregisterIf]
sub esp, 0xc
cmp esi, edi
jne 0x402a38
test byte [0x4081a0], 4
je 0x402a26
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.Failed_to_initialize_rpc_interfaces__status__ld._n
mov dword [esp + 8], str.ServiceMain
mov dword [esp + 4], 0x4081a0
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_2
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8
mov dword [esp + 0xc], str.starting_service_n
mov dword [esp + 8], str.ServiceMain
mov dword [esp + 4], 0x4081a0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
mov eax, dword [0x4081e0]
mov dword [ebp - 0x28], eax
mov eax, dword [0x408220]
mov dword [ebp - 0x24], eax
mov eax, dword [0x408254]
mov dword [ebp - 0x20], eax
test byte [0x4081a0], 8
je 0x40289e
mov dword [esp + 0xc], 0x409332
mov dword [esp + 8], str.RPCSS_Initialize
mov dword [esp + 4], 0x4081a0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40289e
test edi, edi
jne 0x402a32
test byte [0x4081a0], 4
je 0x402a26
jmp 0x402a67
mov dword [esp + 0xc], str.service_stopped_n
mov dword [esp + 8], str.ServiceMain
mov dword [esp + 4], 0x4081a0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 8