Function at 0x45f480
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x589098
push eax
mov dword fs:[0], esp
sub esp, 0x228
push ebx
push esi
xor esi, esi
push edi
cmp dword [ebp + 0x18], esi
jne 0x45f4f8
push 0x104
lea eax, [ebp - 0x234]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x45f4ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jle 0x45f4d3
and eax, 0xffff
or eax, 0x80070000
push str.::GetModuleFileNameW__0__awcBuffer__dwLength_
push eax
lea ecx, [ebp - 0x28]
call fcn.00434a80
push 0x5cc0a0
lea ecx, [ebp - 0x28]
push ecx
call fcn.00554cbc
lea edx, [ebp - 0x234]
mov dword [ebp + 0x18], edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
mov edi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], esi
lea ebx, [ebx]
mov eax, dword [0x5f5774]
mov edx, dword [eax + 0xc]
mov ecx, 0x5f5774
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
test edi, edi
je 0x45f553
test edi, 0xffff0000
jne 0x45f553
movzx esi, di
push 0
push esi
call fcn.004013d0
add esp, 8
test eax, eax
je 0x45f55c
push esi
push eax
lea ecx, [ebp - 0x10]
call fcn.00412bd0
jmp 0x45f55c
push edi
lea ecx, [ebp - 0x10]
call fcn.00412df0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x10]
push 0xf003f
push 0
push eax
call fcn.00505a30
movzx ecx, al
add esp, 4
neg ecx
sbb ecx, ecx
not ecx
and ecx, edi
push ecx
call ebx
mov esi, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45f5a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x18], esi
test esi, esi
jne 0x45f5e6
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0x14
jl 0x45f510
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x45f5dc
and eax, 0xffff
or eax, 0x80070000
push str.hSCM
jmp 0x45f4d8
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
push 0
push 0
push edx
push 0
push 0
push eax
mov eax, dword [ebp + 8]
push 1
push 3
push ecx
push 0xf01ff
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 4
test edi, edi
jne 0x45f67b
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x431
jne 0x45f64f
mov dword [ebp - 4], 0xffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
call edi
test eax, eax
jle 0x45f65f
and eax, 0xffff
or eax, 0x80070000
push str.hService
push eax
lea ecx, [ebp - 0x28]
call fcn.00434a80
push 0x5cc0a0
lea edx, [ebp - 0x28]
push edx
jmp 0x45f4ea
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x45f692
mov dword [ebp + 0x18], eax
lea eax, [ebp + 0x18]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov byte [ebp - 4], 0
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
mov dword [ebp - 4], 0xffffffff
push esi
call edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret