Function at 0x411220
Capabilities:
Continue service
Create service
Modify service
Pause service
Persist via windows service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x670
mov eax, dword [0x445010]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x214]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x41127b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.get_mod_fnameerr0x_08lx
push str.ServiceHelper
push 3
call dword [sym.imp.commutil.dll_void___cdecl_Logger::LogW_int__wchar_t_const___wchar_t_const__]
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004304e8
mov esp, ebp
pop ebp
ret
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 0x65c], ebx
test ebx, ebx
jne 0x4112a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.open_sc_mgrerr0x_08lx
jmp 0x41125a
push 0x437538
lea eax, [ebp - 0x214]
push eax
push str.__s___s
lea eax, [ebp - 0x624]
push 0x208
push eax
call dword [sym.imp.MSVCR120.dll_swprintf_s]
add esp, 0x14
lea eax, [ebp - 0x624]
push 0
push 0
push 0
push 0
push str.COM_Infrastructure
push eax
push 1
push 2
push 0x110
push 4
push 0x437698
push str.GarenaPlatform
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, dword [sym.imp.commutil.dll_void___cdecl_Logger::LogW_int__wchar_t_const___wchar_t_const__]
mov esi, eax
test esi, esi
jne 0x4114f3
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x431
je 0x41132c
call ebx
push eax
push str.create_svcerr0x_08lx
push str.ServiceHelper
push 3
call edi
jmp 0x411506
push str.reconfig_svc
push str.ServiceHelper
push 1
call edi
add esp, 0xc
push 6
push str.GarenaPlatform
push dword [ebp - 0x65c]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x41136a
call ebx
push eax
push str.open_svcerr0x_08lx
push str.ServiceHelper
push 3
jmp 0x411504
push 0x437698
push 0
push 0
push 0
push 0
push str.COM_Infrastructure
lea eax, [ebp - 0x624]
push eax
push 1
push 2
push 0x110
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x4113ab
call ebx
push eax
push str.change_svc_conferr0x_08lx
push str.ServiceHelper
push 3
jmp 0x411504
xorps xmm0, xmm0
mov dword [ebp - 0x670], 0
movdqu xmmword [ebp - 0x66c], xmm0
lea eax, [ebp - 0x63c]
mov dword [ebp - 0x63c], 1
mov dword [ebp - 0x660], eax
lea eax, [ebp - 0x670]
push eax
push 2
push esi
mov dword [ebp - 0x638], 0x493e0
mov dword [ebp - 0x634], 1
mov dword [ebp - 0x630], 0x493e0
mov dword [ebp - 0x62c], 1
mov dword [ebp - 0x628], 0x493e0
mov dword [ebp - 0x664], 3
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
lea eax, [ebp - 0x658]
mov dword [ebp - 0x640], 0
push eax
xorps xmm0, xmm0
push 1
push esi
movdqu xmmword [ebp - 0x658], xmm0
movq qword [ebp - 0x648], xmm0
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4114f3
push str.GarenaPlatform
push str.svc_stoppingname_s
push str.ServiceHelper
push 1
call edi
add esp, 0x10
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x658]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4114b8
lea ebx, [ebx]
mov eax, dword [ebp - 0x654]
cmp eax, 3
jne 0x4114be
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x658]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x411490
mov eax, dword [ebp - 0x654]
cmp eax, 1
jne 0x4114da
push str.GarenaPlatform
push str.svc_stoppedname_s
push str.ServiceHelper
push eax
call edi
add esp, 0x10
jmp 0x4114f3
call ebx
push eax
push str.GarenaPlatform
push str.stop_svc_failedname_s__err0x_08lx
push str.ServiceHelper
push 3
call edi
add esp, 0x14
push str.GarenaPlatform
push str.svc_installedname_s
push str.ServiceHelper
push 1
call edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0x10
push dword [ebp - 0x65c]
call edi
test esi, esi
je 0x41151e
push esi
call edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004304e8
mov esp, ebp
pop ebp
ret