Function at 0x1004ca1
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 [0x1019004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
cmp byte [0x1019001], bl
je 0x1004d87
push esi
push edi
lea eax, [ebp - 0x210]
push eax
mov edi, 0x20019
push edi
mov esi, 0x1003ce0
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.010033e6
lea eax, [ebp - 0x214]
push eax
push edi
push esi
push 0x80000002
call fcn.010033e6
cmp byte [ebp + 8], bl
jne 0x1006bdd
push ebx
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1004d98
call fcn.01004dc9
test al, al
jne 0x1006c13
push dword [ebp - 0x220]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x214], ebx
je 0x1004d75
push dword [ebp - 0x214]
call esi
cmp dword [ebp - 0x210], ebx
je 0x1004d85
push dword [ebp - 0x210]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001375
leave
ret 8
push 1
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1006d90
call fcn.01004dc9
test al, al
je 0x1004d53
mov dword [ebp - 0x22c], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x1006c27
mov dword [ebp - 0x22c], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x1006db8
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
cmp edi, ebx
je 0x1004d53
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x1006cff
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 0x1006cff
cmp dword [ebp - 0x21c], ebx
jbe 0x1006cff
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 0x1006cff
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.01004043
mov eax, dword [ebp - 0x220]
cmp eax, ebx
jne 0x1006d22
mov dword [ebp - 0x238], ebx
xor eax, eax
jmp 0x1006d31
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 0x1006d70
push dword [ebp - 0x20c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x224], ebx
je 0x1004d53
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1004d53