Function at 0x40d4f0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4198d6
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x421018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x208
xor ebx, ebx
lea ecx, [ebp - 0x21a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x21c], ax
call sub.MSVCR100.dll_memset
push 0x208
lea eax, [ebp - 0x426]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x428], dx
call sub.MSVCR100.dll_memset
add esp, 0x18
lea esi, [ebp - 0x21c]
mov edi, str.APPLETSLOCALE
call fcn.00402720
test al, al
jne 0x40d5a4
push 0x41be5c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40d59a
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc0000006
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, 0x501
jmp 0x40d7ac
lea ecx, [ebp - 0x21c]
push ebx
push ecx
call dword [sym.imp.MSVCR100.dll__waccess_s]
add esp, 8
test eax, eax
je 0x40d5f0
push 0x41be5c
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40d5e6
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xc0000008
push ebx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, 0x1000
jmp 0x40d7ac
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x444], dx
mov dword [ebp - 0x430], 7
mov dword [ebp - 0x434], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d612
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x444]
call fcn.0040ba00
mov dword [ebp - 4], ebx
test byte [0x422b68], 1
jne 0x40d658
or dword [0x422b68], 1
call fcn.0040d2d0
push 0x41a960
call fcn.00417dd5
add esp, 4
cmp dword [ebp - 0x434], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jne 0x40d66a
xor al, al
jmp 0x40d699
mov eax, dword [0x422b70]
push 0xffffffffffffffff
push eax
call ebx
push 0
lea ecx, [ebp - 0x444]
push ecx
or eax, 0xffffffff
mov ecx, 0x422b98
call fcn.00401ce0
mov edx, dword [0x422b70]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov al, 1
test al, al
sete byte [ebp - 0x445]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x430], 8
jb 0x40d6c2
mov eax, dword [ebp - 0x444]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
cmp byte [ebp - 0x445], 0
je 0x40d6d5
mov eax, 0x601
jmp 0x40d7ac
lea esi, [ebp - 0x428]
mov edi, str.FILELOCALE
call fcn.00402720
test al, al
jne 0x40d702
push 0xc0000006
push 1
call fcn.0040be90
add esp, 8
mov eax, 0x501
jmp 0x40d7ac
lea ecx, [ebp - 0x428]
push 0
push ecx
call dword [sym.imp.MSVCR100.dll__waccess_s]
add esp, 8
test eax, eax
jne 0x40d6cb
lea eax, [ebp - 0x428]
lea ecx, [ebp - 0x444]
call fcn.0040b900
mov dword [ebp - 4], 1
call fcn.00403810
cmp dword [ebp - 0x434], 0
mov esi, eax
jne 0x40d744
xor bl, bl
jmp 0x40d76a
mov edx, dword [esi]
push 0xffffffffffffffff
push edx
call ebx
push 0
lea eax, [ebp - 0x444]
push eax
lea ecx, [esi + 0xc]
or eax, 0xffffffff
call fcn.00401ce0
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov bl, 1
lea esi, [ebp - 0x444]
call fcn.00401ac0
test bl, bl
je 0x40d6cb
lea esi, [ebp - 0x44c]
mov dword [ebp - 0x44c], 0
call fcn.004027a0
call fcn.00403810
cmp dword [ebp - 0x44c], 1
jne 0x40d7a6
mov byte [eax + 8], 1
jmp 0x40d7aa
mov byte [eax + 8], 0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00417cae
mov esp, ebp
pop ebp
ret