Function at 0x405ab0
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 [0x41b140]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x41b514], 0
push ebx
push esi
push edi
mov edi, edx
mov bl, cl
je 0x405bad
lea eax, [ebp - 0x214]
mov dword [ebp - 0x230], 0x100
push eax
xor esi, esi
mov dword [ebp - 0x228], 0
push 0x20019
push esi
push 0x401d88
push SysReAllocString
mov dword [ebp - 0x210], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], esi
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x20c], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp byte [0x41b514], 0
je 0x411ca1
lea eax, [ebp - 0x20c]
push eax
push 0x20019
push esi
push 0x401d88
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x214]
test bl, bl
jne 0x411d20
push 0
push dword [ebp - 0x20c]
mov ecx, 0x401e78
call fcn.00405710
test al, al
jne 0x411d50
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x20c]
test eax, eax
je 0x405b9c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x405bad
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esp, [ebp - 0x248]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b820
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x401d88
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x21c], eax
test eax, eax
je 0x411d15
call fcn.00410060
mov eax, esp
push 0
push 0
push dword [ebp - 0x21c]
mov dword [ebp - 0x218], eax
push eax
push 0xffffffffffffffff
push 0x401d88
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x411d15
lea eax, [ebp - 0x20c]
push eax
push 0x20019
push 0
push dword [ebp - 0x218]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
jmp 0x405b5c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405b5c
push 1
push dword [ebp - 0x20c]
mov ecx, 0x4028d8
call fcn.00405710
test al, al
je 0x405b84
mov dword [ebp - 0x218], 0xc0ff03e8
mov dword [ebp - 0x21c], 0x10
jmp 0x411d64
mov dword [ebp - 0x218], 0xff03e9
mov dword [ebp - 0x21c], 8
push 0x4028b0
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x405b84
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x411e3d
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x210]
push eax
push 0
lea eax, [ebp - 0x220]
push eax
push 0
lea eax, [ebp - 0x208]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x411e3d
cmp dword [ebp - 0x210], esi
jbe 0x411e3d
push eax
call fcn.0040b7e3
mov ebx, eax
xor ecx, ecx
mov eax, dword [ebp - 0x210]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b7e3
add esp, 8
mov dword [ebp - 0x228], eax
test ebx, ebx
je 0x411e3f
test eax, eax
je 0x411e34
lea ecx, [ebp - 0x234]
push ecx
lea ecx, [ebp - 0x210]
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push ebx
lea eax, [ebp - 0x208]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x411e3f
push ebx
call fcn.0040b812
add esp, 4
xor ebx, ebx
mov edx, edi
lea ecx, [ebp - 0x224]
call fcn.00408697
mov esi, dword [ebp - 0x224]
test esi, esi
jne 0x411e60
mov dword [ebp - 0x23c], esi
xor eax, eax
jmp 0x411e75
mov dword [ebp - 0x23c], esi
mov eax, 1
mov dword [ebp - 0x238], 0
mov edi, dword [ebp - 0x22c]
lea ecx, [ebp - 0x23c]
push 0
push ecx
push 0
push eax
push ebx
push dword [ebp - 0x218]
push 0
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
test ebx, ebx
je 0x411eb1
push ebx
call fcn.0040b812
add esp, 4
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x405b84
push eax
call fcn.0040b812
add esp, 4
jmp 0x405b84