Function at 0x40c4dd
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 [0x41a140]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x41a62d], 0
mov dword [ebp - 0x238], edx
mov byte [ebp - 0x209], cl
je 0x40c75b
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, 0x402678
lea eax, [ebp - 0x214]
mov dword [ebp - 0x220], edi
push eax
push ecx
mov ecx, SysReAllocString
call fcn.0041767c
lea eax, [ebp - 0x210]
mov edx, 0x402678
push eax
push ecx
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
call fcn.0041767c
mov edx, dword [ebp - 0x214]
cmp byte [ebp - 0x209], bl
je 0x40c5aa
push 1
push dword [ebp - 0x210]
mov ecx, 0x4027a4
call fcn.0040c460
test al, al
je 0x40c727
mov dword [ebp - 0x224], 0xc0ff03e8
mov dword [ebp - 0x228], 0x10
jmp 0x40c5d8
push 0
push dword [ebp - 0x210]
mov ecx, 0x402750
call fcn.0040c460
test al, al
je 0x40c727
mov dword [ebp - 0x224], 0xff03e9
mov dword [ebp - 0x228], 8
push 0x4026d8
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x40c727
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x40c6ab
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 0x40c6ab
cmp dword [ebp - 0x218], ebx
jbe 0x40c6ab
push dword [ebp - 0x21c]
call fcn.004195a6
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.004195a6
mov ebx, eax
pop ecx
pop ecx
test esi, esi
je 0x40c6ab
test ebx, ebx
je 0x40c6a2
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 0x40c6ab
push esi
call fcn.004195d5
mov esi, edi
pop ecx
mov edx, dword [ebp - 0x238]
lea ecx, [ebp - 0x220]
call fcn.00416dff
mov edi, dword [ebp - 0x220]
xor edx, edx
test edi, edi
jne 0x40c6d2
mov dword [ebp - 0x240], edx
mov eax, edx
jmp 0x40c6e1
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 0x40c71c
push esi
call fcn.004195d5
pop ecx
test ebx, ebx
je 0x40c727
push ebx
call fcn.004195d5
pop ecx
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [ebp - 0x210], 0
pop edi
pop esi
pop ebx
je 0x40c746
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x214], 0
je 0x40c75b
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419610
leave
ret