Function at 0x411e50
Capabilities:
Access the windows event log
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b6a83
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
mov eax, dword [0x506054]
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
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
push 0xf003f
push 0
push 0
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xb4], edx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0xbc], eax
test eax, eax
jne 0x411f97
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xc4]
push str.OpenSCManager_failed_with_error__d
push eax
call fcn.0040b570
mov esi, dword [ebp - 0xc4]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x411f0c
push dword [esi - 0xc]
lea ecx, [ebp - 0xc4]
call fcn.0040b4a0
mov esi, dword [ebp - 0xc4]
push 0x4ede8c
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x411f6f
push esi
push 0x4ed750
lea eax, [ebp - 0xb0]
push 0x50
push eax
call fcn.00410230
add esp, 0x10
mov dword [ebp - 0xbc], 0x4ede8c
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc0]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x412479
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x412479
push 0x2c
push 0x4ede8c
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x412082
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xc4]
push str.OpenService_failed_with_error__d
push eax
call fcn.0040b570
mov esi, dword [ebp - 0xc4]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x41200e
push dword [esi - 0xc]
lea ecx, [ebp - 0xc4]
call fcn.0040b4a0
mov esi, dword [ebp - 0xc4]
push 0x4ede8c
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x412071
push esi
push 0x4ed750
lea eax, [ebp - 0xb0]
push 0x50
push eax
call fcn.00410230
add esp, 0x10
mov dword [ebp - 0xb4], 0x4ede8c
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb8]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push dword [ebp - 0xbc]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x411f6f
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
lea eax, [ebp - 0xc8]
push eax
push 0x24
lea eax, [ebp - 0xec]
push eax
push 0
push ebx
call esi
test eax, eax
jne 0x4120ca
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 2
jmp 0x4123af
mov eax, dword [ebp - 0xe8]
cmp eax, 1
jne 0x4121a1
call fcn.0040bd30
test eax, eax
je 0x412495
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov eax, str.Service_has_stopped
mov dword [ebp - 4], 3
lea ecx, [ebp - 0xc4]
test eax, 0xffff0000
jne 0x41211a
movzx eax, ax
push eax
call fcn.0040b200
jmp 0x412126
push 0x13
push str.Service_has_stopped
call fcn.0040b8e0
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0xc4]
cmp dword [esi - 4], 1
jle 0x41214d
push dword [esi - 0xc]
lea ecx, [ebp - 0xc4]
call fcn.0040b4a0
mov esi, dword [ebp - 0xc4]
push 0x4ede8c
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x41244d
push esi
push 0x4ed750
lea eax, [ebp - 0xb0]
push 0x50
push eax
call fcn.00410230
add esp, 0x10
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb8]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 4
jmp 0x412435
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp eax, 3
jne 0x41224c
mov ecx, 0x2710
nop word [eax + eax]
mov eax, 0xcccccccd
mul dword [ebp - 0xd4]
shr edx, 3
cmp edx, 0x3e8
jae 0x4121dd
mov edx, 0x3e8
jmp 0x4121e6
cmp edx, 0x2710
cmova edx, ecx
push edx
call edi
lea eax, [ebp - 0xc8]
push eax
push 0x24
lea eax, [ebp - 0xec]
push eax
push 0
push ebx
call esi
test eax, eax
je 0x4122f2
cmp dword [ebp - 0xe8], 1
je 0x412299
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub eax, dword [ebp - 0xc4]
sbb edx, dword [ebp - 0xb4]
test edx, edx
ja 0x412468
jb 0x41223a
cmp eax, 0x7530
ja 0x412468
cmp dword [ebp - 0xe8], 3
mov ecx, 0x2710
je 0x4121c0
lea eax, [ebp - 0xec]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x41231b
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ControlService_failed_with_error__d
jmp 0x4123bb
call fcn.0040bd30
test eax, eax
je 0x412495
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov eax, str.Service_has_stopped
mov dword [ebp - 4], 6
lea ecx, [ebp - 0xc4]
test eax, 0xffff0000
jne 0x4122da
movzx eax, ax
push eax
call fcn.0040b200
jmp 0x4122e6
push 0x13
push str.Service_has_stopped
call fcn.0040b8e0
mov dword [ebp - 4], 7
jmp 0x41212d
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 5
jmp 0x4123af
cmp dword [ebp - 0xe8], 1
je 0x412468
push dword [ebp - 0xd4]
call edi
lea eax, [ebp - 0xc8]
push eax
push 0x24
lea eax, [ebp - 0xec]
push eax
push 0
push ebx
call esi
test eax, eax
je 0x41238b
cmp dword [ebp - 0xe8], 1
je 0x412468
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
sub eax, dword [ebp - 0xc4]
sbb edx, dword [ebp - 0xb4]
test edx, edx
ja 0x412468
jb 0x41237d
cmp eax, 0x7530
ja 0x412468
cmp dword [ebp - 0xe8], 1
jne 0x412328
jmp 0x412468
call fcn.0040bd30
mov ecx, eax
test ecx, ecx
je 0x412495
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xc4], eax
mov dword [ebp - 4], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.QueryServiceStatusEx_failed_with_error__d
lea eax, [ebp - 0xc4]
push eax
call fcn.0040b570
mov esi, dword [ebp - 0xc4]
add esp, 0xc
cmp dword [esi - 4], 1
jle 0x4123ea
push dword [esi - 0xc]
lea ecx, [ebp - 0xc4]
call fcn.0040b4a0
mov esi, dword [ebp - 0xc4]
push 0x4ede8c
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
test edi, edi
je 0x41244d
push esi
push 0x4ed750
lea eax, [ebp - 0xb0]
push 0x50
push eax
call fcn.00410230
add esp, 0x10
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xb8]
push 0
push eax
push 0
push 2
push 0
push 0
push 0
push 1
push edi
mov dword [ebp - 0xb4], 0x4ede8c
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
or eax, 0xffffffff
add esi, 0xfffffff0
mov dword [ebp - 4], eax
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x412468
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push dword [ebp - 0xbc]
call esi
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.004364d3
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040bb00
int3