Function at 0x104a2d1
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 0x104a323
test byte [eax + 0x1c], 1
je 0x104a323
cmp byte [eax + 0x19], 5
jb 0x104a323
movzx ecx, word [ebp + 0xc]
push edi
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ecx
push dword [ebp + 8]
push 0x1004e44
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0104a0ce
mov eax, dword [0x10ed030]
and dword [ebp + 0x1c], 0
cmp dword [ebp + 8], 0
jne 0x104a360
cmp eax, esi
je 0x104a354
test byte [eax + 0x1c], 2
je 0x104a354
cmp byte [eax + 0x19], 2
jb 0x104a354
push 0x1004e44
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027e15
mov eax, dword [0x10ed030]
mov dword [ebp + 0x1c], 0x80004003
jmp 0x104a495
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edi
cmp eax, esi
je 0x104a391
test byte [eax + 0x1c], 2
je 0x104a391
cmp byte [eax + 0x19], 4
jb 0x104a391
mov edi, 0x1004e44
push edi
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01027e15
jmp 0x104a396
mov edi, 0x1004e44
xor eax, eax
mov dword [ebp + 0x14], eax
movzx ecx, word [ebp + 0x14]
cmp dword [ebp + ecx*4 - 0xc], eax
je 0x104a3af
inc dword [ebp + 0x14]
cmp word [ebp + 0x14], 3
jb 0x104a39b
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 0x104a44f
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a3e9
test byte [eax + 0x1c], 2
je 0x104a3e9
cmp byte [eax + 0x19], 4
jb 0x104a3e9
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 0x104a444
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x104a41b
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a444
test byte [eax + 0x1c], 2
je 0x104a444
cmp byte [eax + 0x19], 2
jb 0x104a444
push dword [ebp + 0x1c]
push edi
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010294b2
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x104a490
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x104a463
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp + 0x1c], eax
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a4ca
test byte [eax + 0x1c], 2
je 0x104a495
cmp byte [eax + 0x19], 2
jb 0x104a495
push dword [ebp + 0x1c]
push 0x1004e44
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010294b2
mov eax, dword [0x10ed030]
cmp eax, esi
je 0x104a4ca
test byte [eax + 0x1c], 1
je 0x104a4ca
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 0x104a4ca
push dword [ebp + 0x1c]
push 0x1004e44
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010294b2
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0x18