Function at 0x104a6c7
Capabilities:
Access the windows event log

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x10ed030]
mov edi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
mov esi, 0x10ed030
cmp eax, esi
je 0x104a719
test byte [eax + 0x1c], 1
je 0x104a719
cmp byte [eax + 0x19], 5
jb 0x104a719
movzx ecx, word [ebp + 0xc]
push edi
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
push dword [ebp + 8]
push 0x1004d5c
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0104a4c4
mov eax, dword [0x10ed030]
and dword [ebp + 0x1c], 0
cmp dword [ebp + 8], 0
jne 0x104a756
cmp eax, esi
je 0x104a74a
test byte [eax + 0x1c], 2
je 0x104a74a
cmp byte [eax + 0x19], 2
jb 0x104a74a
push 0x1004d5c
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027e15
mov eax, dword [0x10ed030]
mov dword [ebp + 0x1c], 0x80004003
jmp 0x104a88b
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edi
cmp eax, esi
je 0x104a787
test byte [eax + 0x1c], 2
je 0x104a787
cmp byte [eax + 0x19], 4
jb 0x104a787
mov edi, 0x1004d5c
push edi
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027e15
jmp 0x104a78c
mov edi, 0x1004d5c
xor eax, eax
mov dword [ebp + 0x14], eax
movzx ecx, word [ebp + 0x14]
cmp dword [ebp + ecx*4 - 0xc], eax
je 0x104a7a5
inc dword [ebp + 0x14]
cmp word [ebp + 0x14], 3
jb 0x104a791
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
xor ebx, ebx
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x104a845
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a7df
test byte [eax + 0x1c], 2
je 0x104a7df
cmp byte [eax + 0x19], 4
jb 0x104a7df
push edi
push 0x16
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027e15
push ebx
lea eax, [ebp - 0xc]
push eax
push ebx
push dword [ebp + 0x14]
push ebx
push dword [ebp + 0x10]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
test eax, eax
jne 0x104a83a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x104a811
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a83a
test byte [eax + 0x1c], 2
je 0x104a83a
cmp byte [eax + 0x19], 2
jb 0x104a83a
push dword [ebp + 0x1c]
push edi
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027ecb
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x104a886
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x104a859
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a8c0
test byte [eax + 0x1c], 2
je 0x104a88b
cmp byte [eax + 0x19], 2
jb 0x104a88b
push dword [ebp + 0x1c]
push 0x1004d5c
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027ecb
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a8c0
test byte [eax + 0x1c], 1
je 0x104a8c0
movzx ecx, byte [eax + 0x19]
xor edx, edx
cmp dword [ebp + 0x1c], edx
setl dl
dec edx
and edx, 3
inc edx
inc edx
cmp ecx, edx
jl 0x104a8c0
push dword [ebp + 0x1c]
push 0x1004d5c
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027ecb
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0x18