Function at 0x402470
Capabilities:
Access the windows event log

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x18
push eax
push ecx
call fcn.00402730
mov cl, byte [0x40ebd4]
add esp, 8
test cl, cl
je 0x4025bd
test al, al
jne 0x4024a8
call fcn.00402e40
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
mov eax, dword [0x40ebd8]
test eax, eax
je 0x40266a
mov eax, dword [0x40ebdc]
test eax, eax
je 0x40266a
mov eax, dword [0x40ebe8]
test eax, eax
je 0x40266a
lea edx, [esp + 0x20]
mov byte [esp + 0x20], 0
push edx
call fcn.00402fe0
add esp, 4
test eax, eax
je 0x402530
push 0
lea eax, [esp + 0x20]
push 0
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x1c]
push ecx
push str.Error_while_checking_to_see_if_service_is_installed:__s_n
call fcn.00404d79
mov edx, dword [esp + 0x24]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
mov al, byte [esp + 0x20]
test al, al
je 0x402551
push str.The_service_is_already_installed.
call fcn.00404d79
add esp, 4
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
call fcn.00403050
test eax, eax
je 0x4025a5
push 0
lea eax, [esp + 0x20]
push 0
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x1c]
push ecx
push str.Error_while_installing_the_service:__s_n
call fcn.00404d79
mov edx, dword [esp + 0x24]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
push str.The_service_was_successfully_installed.
call fcn.00404d79
add esp, 4
call fcn.00402fa0
xor eax, eax
add esp, 0x18
ret
mov cl, byte [0x40ebd5]
test cl, cl
je 0x402666
test al, al
jne 0x4025e0
call fcn.00402e40
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
mov eax, dword [0x40ebd8]
test eax, eax
jne 0x4025fa
call fcn.00402e40
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
call fcn.004037a0
test eax, eax
je 0x40264e
push 0
lea eax, [esp + 0x24]
push 0
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [esp + 0x20]
push ecx
push str.Error_while_uninstalling_the_service:__s_n
call fcn.00404d79
mov edx, dword [esp + 0x28]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
push str.The_service_was_successfully_uninstalled.
call fcn.00404d79
add esp, 4
call fcn.00402fa0
xor eax, eax
add esp, 0x18
ret
test al, al
jne 0x40267b
call fcn.00402e40
call fcn.00402fa0
or eax, 0xffffffff
add esp, 0x18
ret
lea eax, [esp + 8]
push esi
push eax
mov dword [esp + 0x10], 0x40b9a0
mov dword [esp + 0x14], 0x403810
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x402716
push 0x40b9a0
push eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov esi, eax
test esi, esi
je 0x402716
push 0
lea ecx, [esp + 0xc]
push 0
push ecx
push 0x400
mov dword [esp + 0x14], str.StartServiceCtrlDispatcher
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea edx, [esp + 4]
push 0
push edx
push 0
push 2
push 0
push 0xc0001001
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
call fcn.00402fa0
xor eax, eax
pop esi
add esp, 0x18
ret