Function at 0x12cb903
Capabilities:
Access the windows event log
Get session user name
Get user security identifier

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x12d8140]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x12d8489], 0
mov dword [ebp - 0x238], edx
mov byte [ebp - 0x209], cl
je 0x12cbb81
push ebx
xor eax, eax
mov dword [ebp - 0x230], 0x100
push esi
push edi
mov edi, eax
mov dword [ebp - 0x218], eax
mov ebx, eax
mov dword [ebp - 0x21c], eax
mov esi, eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], eax
mov edx, 0x12c3e28
lea eax, [ebp - 0x214]
mov dword [ebp - 0x220], edi
push eax
push ecx
mov ecx, 0x80000001
call fcn.012d596d
lea eax, [ebp - 0x210]
mov edx, 0x12c3e28
push eax
push ecx
mov ecx, 0x80000002
call fcn.012d596d
mov edx, dword [ebp - 0x214]
cmp byte [ebp - 0x209], bl
je 0x12cb9d0
push 1
push dword [ebp - 0x210]
mov ecx, 0x12c3f54
call fcn.012cb88a
test al, al
je 0x12cbb4d
mov dword [ebp - 0x224], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x12cb9fe
push 0
push dword [ebp - 0x210]
mov ecx, 0x12c3f00
call fcn.012cb88a
test al, al
je 0x12cbb4d
mov dword [ebp - 0x224], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x12c3e88
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x12cbb4d
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x12cbad1
lea eax, [ebp - 0x234]
xor edi, edi
push eax
lea eax, [ebp - 0x218]
push eax
push edi
lea eax, [ebp - 0x21c]
push eax
push edi
lea eax, [ebp - 0x208]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp dword [ebp - 0x21c], ebx
jbe 0x12cbad1
cmp dword [ebp - 0x218], ebx
jbe 0x12cbad1
push dword [ebp - 0x21c]
call fcn.012d79f2
mov esi, eax
xor ecx, ecx
mov eax, dword [ebp - 0x218]
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.012d79f2
mov ebx, eax
pop ecx
pop ecx
test esi, esi
je 0x12cbad1
test ebx, ebx
je 0x12cbac8
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x218]
push eax
push ebx
lea eax, [ebp - 0x21c]
push eax
push esi
lea eax, [ebp - 0x208]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x12cbad1
push esi
call fcn.012d7a1b
mov esi, edi
pop ecx
mov edx, dword [ebp - 0x238]
lea ecx, [ebp - 0x220]
call fcn.012d510b
mov edi, dword [ebp - 0x220]
xor edx, edx
test edi, edi
jne 0x12cbaf8
mov dword [ebp - 0x240], edx
mov eax, edx
jmp 0x12cbb07
xor eax, eax
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x23c], edx
inc eax
push edx
lea ecx, [ebp - 0x240]
push ecx
push edx
push eax
push esi
push dword [ebp - 0x224]
push edx
push dword [ebp - 0x228]
push dword [ebp - 0x22c]
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push dword [ebp - 0x22c]
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
test esi, esi
je 0x12cbb42
push esi
call fcn.012d7a1b
pop ecx
test ebx, ebx
je 0x12cbb4d
push ebx
call fcn.012d7a1b
pop ecx
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x210], 0
pop edi
pop esi
pop ebx
je 0x12cbb6c
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x214], 0
je 0x12cbb81
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.012d7a50
mov esp, ebp
pop ebp
ret