Function at 0x100386a
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 [0x1017004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
cmp byte [0x1017001], bl
je 0x1003950
push esi
push edi
lea eax, [ebp - 0x210]
push eax
mov edi, 0x20019
push edi
mov esi, 0x1003130
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.01003415
lea eax, [ebp - 0x214]
push eax
push edi
push esi
push 0x80000002
call fcn.01003415
cmp byte [ebp + 8], bl
jne 0x10081f9
push ebx
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x1003960
call fcn.01003249
test al, al
jne 0x100822f
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 0x100393e
push dword [ebp - 0x214]
call esi
cmp dword [ebp - 0x210], ebx
je 0x100394e
push dword [ebp - 0x210]
call esi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.01001335
leave
ret 8
push 1
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push 0x10083ac
call fcn.01003249
test al, al
je 0x100391c
mov dword [ebp - 0x22c], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x1008243
mov dword [ebp - 0x22c], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x10083d4
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
cmp edi, ebx
je 0x100391c
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x100831b
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 0x100831b
cmp dword [ebp - 0x21c], ebx
jbe 0x100831b
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 0x100831b
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.01003a91
mov eax, dword [ebp - 0x220]
cmp eax, ebx
jne 0x100833e
mov dword [ebp - 0x238], ebx
xor eax, eax
jmp 0x100834d
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 0x100838c
push dword [ebp - 0x20c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0x224], ebx
je 0x100391c
push dword [ebp - 0x224]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x100391c