Function at 0x1004a99
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, 0x23c
mov eax, dword [0x1019008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
cmp byte [0x1019001], bl
je 0x1004b7f
push esi
push edi
lea eax, [ebp - 0x210]
push eax
mov edi, 0x20019
push edi
mov esi, 0x1003c28
push esi
push 0x80000001
mov dword [ebp - 0x230], 0x100
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x20c], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x210], ebx
mov dword [ebp - 0x214], ebx
call fcn.01004bc1
lea eax, [ebp - 0x214]
push eax
push edi
push esi
push 0x80000002
call fcn.01004bc1
cmp byte [ebp + 8], bl
jne 0x1006ba3
push ebx
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1004b90
call fcn.010053b6
test al, al
jne 0x1006bd9
push dword [ebp - 0x220]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x214], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x1004b6d
push dword [ebp - 0x214]
call esi
cmp dword [ebp - 0x210], ebx
je 0x1004b7d
push dword [ebp - 0x210]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.010016d9
leave
ret 8
push 1
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1006d54
call fcn.010053b6
test al, al
je 0x1004b4b
mov dword [ebp - 0x22c], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x1006bed
mov dword [ebp - 0x22c], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x1006d7c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
cmp edi, ebx
je 0x1004b4b
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x1006cc5
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x21c]
push eax
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
lea eax, [ebp - 0x208]
push eax
push ebx
call esi
cmp dword [ebp - 0x218], ebx
jbe 0x1006cc5
cmp dword [ebp - 0x21c], ebx
jbe 0x1006cc5
push dword [ebp - 0x218]
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov dword [ebp - 0x20c], eax
mov eax, dword [ebp - 0x21c]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
pop ecx
lea ecx, [ebp - 0x23c]
push ecx
lea ecx, [ebp - 0x21c]
push ecx
push eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x20c]
lea eax, [ebp - 0x208]
push eax
push ebx
call esi
test eax, eax
jne 0x1006cc5
push dword [ebp - 0x20c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x20c], ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x220]
push eax
call fcn.01004075
mov eax, dword [ebp - 0x220]
cmp eax, ebx
jne 0x1006ce8
mov dword [ebp - 0x238], ebx
xor eax, eax
jmp 0x1006cf7
mov dword [ebp - 0x238], eax
xor eax, eax
mov dword [ebp - 0x234], ebx
inc eax
push ebx
lea ecx, [ebp - 0x238]
push ecx
push ebx
push eax
push dword [ebp - 0x20c]
push dword [ebp - 0x22c]
push ebx
push dword [ebp - 0x228]
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
cmp dword [ebp - 0x20c], ebx
je 0x1006d36
push dword [ebp - 0x20c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x224], ebx
je 0x1004b4b
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1004b4b