Function at 0x40f53e
Capabilities:
Create service
Modify service

Disassembly:
push 0x18
mov eax, 0x456a24
call fcn.0043cc79
mov edi, ecx
mov dword [ebp - 0x10], edi
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], 0x4689e0
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], ebx
test eax, eax
jne 0x40f5bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.00411415
mov al, byte [eax + 0x1c]
test al, al
je 0x40f7b9
call fcn.00411415
test byte [eax + 0x20], 8
je 0x40f7b9
lea ecx, [ebp - 0x10]
call fcn.0041108a
mov esi, eax
lea ecx, [ebp - 0x14]
call fcn.0041108a
mov edi, eax
mov byte [ebp - 4], 2
push str.Unable_to_open_SCM_error_code
jmp 0x40f652
mov ecx, dword [edi + 0x28]
mov esi, ecx
push ebx
push ebx
push ebx
mov eax, dword [ecx]
mov edi, ecx
push ebx
push ebx
call dword [eax + 0xc]
push eax
mov eax, dword [esi]
mov ecx, esi
push 1
push 3
push 0x10
push 0xf01ff
call dword [eax + 4]
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, dword [ebp - 0x10]
mov edi, eax
cmp edi, dword [esi + 4]
je 0x40f604
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov dword [esi + 4], edi
cmp dword [esi + 4], 0
jne 0x40f698
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.00411415
mov al, byte [eax + 0x1c]
test al, al
je 0x40f7b9
call fcn.00411415
test byte [eax + 0x20], 8
je 0x40f7b9
lea ecx, [ebp - 0x10]
call fcn.0041108a
mov esi, eax
lea ecx, [ebp - 0x14]
call fcn.0041108a
mov edi, eax
mov byte [ebp - 4], 4
push str.Create_Service_failed_error_code:
mov ecx, esi
call fcn.00401881
push 0x467a40
mov ecx, edi
call fcn.00401881
push ecx
push ebx
mov ecx, esi
call fcn.004111b0
push eax
push ecx
push edi
call fcn.00411415
mov ecx, eax
call fcn.004114cb
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
jmp 0x40f7b9
call fcn.00411415
mov al, byte [eax + 0x1c]
test al, al
je 0x40f70b
call fcn.00411415
test byte [eax + 0x20], 8
je 0x40f70b
lea ecx, [ebp - 0x1c]
call fcn.0041108a
mov edi, eax
lea ecx, [ebp - 0x18]
call fcn.0041108a
mov esi, eax
push str.CreateService_SUCCESS
mov ecx, edi
mov byte [ebp - 4], 6
call fcn.00401881
push 0x467a40
mov ecx, esi
call fcn.00401881
push ecx
push edi
push ecx
push esi
call fcn.00411415
mov ecx, eax
call fcn.004114cb
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
mov esi, dword [ebp - 0x10]
mov ecx, dword [esi + 0x28]
mov dword [ebp - 0x14], ebx
mov eax, dword [ecx]
call dword [eax + 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 1
push dword [esi + 4]
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x40f7b1
call fcn.00411415
mov al, byte [eax + 0x1c]
test al, al
je 0x40f7b1
call fcn.00411415
test byte [eax + 0x20], 8
je 0x40f7b1
lea ecx, [ebp - 0x18]
call fcn.0041108a
mov esi, eax
lea ecx, [ebp - 0x1c]
call fcn.0041108a
mov edi, eax
push str.Unable_to_set_service_description_error_code:
mov ecx, esi
mov byte [ebp - 4], 8
call fcn.00401881
push 0x467a40
mov ecx, edi
call fcn.00401881
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.004111b0
push eax
push ecx
push edi
call fcn.00411415
mov ecx, eax
call fcn.004114cb
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00401b8a
mov esi, dword [ebp - 0x10]
mov ecx, dword [esi + 0x28]
mov edx, dword [ecx]
call dword [edx + 0x14]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], 0x4689e0
call fcn.004101ab
mov eax, ebx
call fcn.0043cc42
ret 4