Function at 0x4cbc60
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59738c
mov eax, dword fs:[0]
push eax
sub esp, 0x280
mov eax, dword [0x5fae30]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xf003f
xor edi, edi
push edi
push edi
mov ebx, ecx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x4cbcd1
push 1
lea eax, [ebx + 0x30]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
je 0x4cbcc2
push eax
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x4cbf02
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x4cbd46
push 0x1d
push str.Couldnt_open_service_manager
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], edi
mov byte [ebp - 0x234], 0
call fcn.00402a36
push 1
lea ecx, [ebp - 0x234]
push ecx
mov ecx, 0x5fda4c
mov dword [ebp - 4], edi
call fcn.005383c0
cmp dword [ebp - 0x220], 0x10
jb 0x4cbd3f
mov edx, dword [ebp - 0x234]
push edx
call fcn.0053ed60
add esp, 4
xor eax, eax
jmp 0x4cbf07
push 0x104
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp byte [ebp + 8], 0
mov eax, 3
je 0x4cbd69
mov eax, 2
push 0
push 0
push str.RPCSS
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
push 1
push eax
push 0x10
push 0xf01ff
push 0x5bb1cc
lea edi, [ebx + 0x30]
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebx, eax
test ebx, ebx
jne 0x4cbe7b
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
lea ecx, [ebp - 0x288]
call fcn.00406802
lea edx, [ebp - 0x288]
push edx
lea eax, [ebp - 0x26c]
push eax
mov dword [ebp - 4], 1
call fcn.00406569
push eax
lea ecx, [ebp - 0x234]
push str.Couldnt_create_service:
push ecx
mov byte [ebp - 4], 2
call fcn.0040367f
add esp, 0x14
push 1
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 3
call fcn.005383c0
mov esi, 0x10
cmp dword [ebp - 0x220], esi
jb 0x4cbe14
mov edx, dword [ebp - 0x234]
push edx
call fcn.0053ed60
add esp, 4
xor edi, edi
mov ebx, 0xf
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], edi
mov byte [ebp - 0x234], 0
cmp dword [ebp - 0x258], esi
jb 0x4cbe45
mov eax, dword [ebp - 0x26c]
push eax
call fcn.0053ed60
add esp, 4
cmp dword [ebp - 0x274], 8
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x25c], edi
mov byte [ebp - 0x26c], 0
jb 0x4cbd3f
mov ecx, dword [ebp - 0x288]
push ecx
call fcn.0053ed60
add esp, 4
xor eax, eax
jmp 0x4cbf07
push 0x1a
push str.Astrill_Redirector_service
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x23c], 0xf
mov dword [ebp - 0x240], 0
mov byte [ebp - 0x250], 0
call fcn.00402a36
mov edi, 0x10
cmp dword [ebp - 0x23c], edi
jb 0x4cbec3
mov edx, dword [ebp - 0x250]
mov dword [ebp - 0x28c], edx
jmp 0x4cbecf
lea eax, [ebp - 0x250]
mov dword [ebp - 0x28c], eax
lea ecx, [ebp - 0x28c]
push ecx
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call ebx
push esi
call ebx
cmp dword [ebp - 0x23c], edi
jb 0x4cbf02
mov edx, dword [ebp - 0x250]
push edx
call fcn.0053ed60
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053fd20
mov esp, ebp
pop ebp
ret 4