Function at 0x4028c8
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
push edi
push ebx
sub esp, 0xc94
mov edi, edx
mov esi, eax
lea ecx, [esp + 0x45c]
push 0x402
push 0
push ecx
call fcn.0040a820
add esp, 0xc
mov eax, dword [section..data]
xor ebx, ebx
push 0x413500
mov dword [0x413514], eax
inc eax
mov dword [0x413508], ebx
mov dword [0x413504], 2
mov dword [0x41350c], ebx
mov dword [0x413518], 0xbb8
mov dword [section..data], eax
push dword [0x4134e0]
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
je 0x402b41
push 0x200
lea eax, [esp + 0x460]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402c81
lea eax, [esp + 0x45c]
push eax
call fcn.0040314c
add esp, 4
lea edx, [esp + 0x45c]
lea eax, [edx + eax*2 - 2]
cmp eax, edx
jb 0x402993
lea ecx, [esp + 0x45c]
movzx edx, word [eax]
cmp edx, 0x5c
je 0x402ced
add eax, 0xfffffffe
cmp eax, ecx
jae 0x402980
lea eax, [esp + 0x45c]
push eax
call fcn.00403165
add esp, 4
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x4125e0], eax
test eax, eax
je 0x402c91
push 0x413500
mov dword [0x4125ec], 1
mov dword [0x413508], 5
mov dword [0x413504], 4
mov dword [0x41350c], ebx
mov dword [0x413518], ebx
mov dword [0x413514], ebx
push dword [0x4134e0]
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
je 0x402a1a
push edi
push esi
call fcn.00401060
add esp, 8
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402c81
mov eax, 0x200
mov word [esp + 0x220], bx
mov edx, eax
pxor xmm0, xmm0
movaps xmmword [esp + eax + 0x10], xmm0
movaps xmmword [esp + eax], xmm0
movaps xmmword [esp + eax - 0x10], xmm0
movaps xmmword [esp + eax - 0x20], xmm0
sub eax, 0x40
jne 0x402a2d
mov word [esp + 0x430], bx
movaps xmmword [esp + edx + 0x220], xmm0
movaps xmmword [esp + edx + 0x210], xmm0
movaps xmmword [esp + edx + 0x200], xmm0
movaps xmmword [esp + edx + 0x1f0], xmm0
sub edx, 0x40
jne 0x402a4d
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x1c]
push ebx
push ebx
push edx
push ebx
push eax
push ebx
push 0x3100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x402aa4
cmp eax, 0xf2
jle 0x402c9e
mov word [esp + 0x230], bx
lea edi, [esp + 0x230]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x402ac2
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push section..data1
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
mov edx, 0x415100
lea eax, [esp + 0x44c]
mov dword [esp + 0x448], edx
mov dword [esp + 0x44c], 0x415000
mov dword [esp + 0x450], edi
lea edi, [esp + 0x20]
push eax
push 0
push edx
push 0x100
push edi
call fcn.0040302b
add esp, 0x14
mov dword [esp + 0x14], 0x4155a0
test esi, esi
mov dword [esp + 0x18], edi
je 0x402c81
lea eax, [esp + 0x14]
push ebx
push eax
push ebx
push 2
push ebx
push ebx
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x402c81
mov eax, 0x200
mov word [esp + 0xa60], bx
mov edx, eax
pxor xmm0, xmm0
movaps xmmword [esp + eax + 0x850], xmm0
movaps xmmword [esp + eax + 0x840], xmm0
movaps xmmword [esp + eax + 0x830], xmm0
movaps xmmword [esp + eax + 0x820], xmm0
sub eax, 0x40
jne 0x402b54
mov word [esp + 0xc70], bx
movaps xmmword [esp + edx + 0xa60], xmm0
movaps xmmword [esp + edx + 0xa50], xmm0
movaps xmmword [esp + edx + 0xa40], xmm0
movaps xmmword [esp + edx + 0xa30], xmm0
sub edx, 0x40
jne 0x402b81
mov dword [esp + 0x22c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [esp + 0x22c]
push ebx
push ebx
push edx
push ebx
push eax
push ebx
push 0x3100
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x402bde
cmp eax, 0xf2
jle 0x402cf5
mov word [esp + 0xa70], bx
lea edi, [esp + 0xa70]
mov eax, dword [esp + 0x22c]
test eax, eax
je 0x402bff
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push section..data1
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
mov edx, 0x415100
lea eax, [esp + 0xc78]
mov dword [esp + 0xc74], edx
mov dword [esp + 0xc78], 0x415000
mov dword [esp + 0xc7c], edi
lea edi, [esp + 0x860]
push eax
push 0
push edx
push 0x100
push edi
call fcn.0040302b
add esp, 0x14
mov dword [esp + 0x224], 0x4155a0
test esi, esi
mov dword [esp + 0x228], edi
je 0x402c81
lea eax, [esp + 0x224]
push ebx
push eax
push ebx
push 2
push ebx
push ebx
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [0x4125e0]
test eax, eax
je 0x402c91
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc94
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x1c]
mov word [edx + eax*2 - 4], bx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0x1c]
mov edx, 0x41501c
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov dword [esp], edx
mov dword [esp + 4], edi
lea edi, [esp + 0x230]
push eax
push 0
push edx
push 0x100
push edi
call fcn.0040302b
add esp, 0x14
jmp 0x402ab3
mov word [eax], bx
jmp 0x402993
push dword [esp + 0x22c]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x22c]
mov word [edx + eax*2 - 4], bx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 0x22c]
mov edx, 0x41501c
mov dword [esp + 0x43c], eax
lea eax, [esp + 0x438]
mov dword [esp + 0x434], edx
mov dword [esp + 0x438], edi
lea edi, [esp + 0xa70]
push eax
push 0
push edx
push 0x100
push edi
call fcn.0040302b
add esp, 0x14
jmp 0x402bed