Function at 0x1004f55
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 0x100503b
push esi
push edi
lea eax, [ebp - 0x210]
push eax
mov edi, 0x20019
push edi
mov esi, 0x1004178
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.0100507d
lea eax, [ebp - 0x214]
push eax
push edi
push esi
push 0x80000002
call fcn.0100507d
cmp byte [ebp + 8], bl
jne 0x1006bf3
push ebx
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x100504c
call fcn.010055f5
test al, al
jne 0x1006c29
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 0x1005029
push dword [ebp - 0x214]
call esi
cmp dword [ebp - 0x210], ebx
je 0x1005039
push dword [ebp - 0x210]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001508
leave
ret 8
push 1
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1006da4
call fcn.010055f5
test al, al
je 0x1005007
mov dword [ebp - 0x22c], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x1006c3d
mov dword [ebp - 0x22c], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x1006dcc
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
cmp edi, ebx
je 0x1005007
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x1006d15
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 0x1006d15
cmp dword [ebp - 0x21c], ebx
jbe 0x1006d15
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 0x1006d15
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.0100458d
mov eax, dword [ebp - 0x220]
cmp eax, ebx
jne 0x1006d38
mov dword [ebp - 0x238], ebx
xor eax, eax
jmp 0x1006d47
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 0x1006d86
push dword [ebp - 0x20c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x224], ebx
je 0x1005007
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1005007