Function at 0x40d870
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bddf
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x425018]
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.00402700
test al, al
jne 0x40d924
push 0x41ef14
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40d91a
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 0x40dad3
lea ecx, [ebp - 0x21c]
push ebx
push ecx
call dword [sym.imp.MSVCR100.dll__waccess_s]
add esp, 8
test eax, eax
je 0x40d970
push 0x41ef14
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
cmp esi, ebx
je 0x40d966
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 0x40dad3
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x448], dx
mov dword [ebp - 0x434], 7
mov dword [ebp - 0x438], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d992
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
lea esi, [ebp - 0x448]
call fcn.00404220
mov dword [ebp - 4], ebx
test byte [0x425c0c], 1
jne 0x40d9dc
or dword [0x425c0c], 1
mov byte [ebp - 4], 1
call fcn.0040d580
push 0x41cf70
call fcn.00419c3d
add esp, 4
mov dword [ebp - 4], 2
mov eax, dword [0x425c10]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
lea ecx, [ebp - 0x448]
push ecx
or eax, 0xffffffff
mov ecx, 0x425c34
call fcn.00401d50
mov edx, dword [0x425c10]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x434], 8
jb 0x40da33
mov eax, dword [ebp - 0x448]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
lea esi, [ebp - 0x428]
mov edi, str.FILELOCALE
call fcn.00402700
test al, al
jne 0x40da5d
push 0xc0000006
push 1
call fcn.0040c2a0
add esp, 8
mov eax, 0x501
jmp 0x40dad3
lea ecx, [ebp - 0x428]
push ebx
push ecx
call dword [sym.imp.MSVCR100.dll__waccess_s]
add esp, 8
test eax, eax
je 0x40da79
mov eax, 0x601
jmp 0x40dad3
sub esp, 0x1c
lea eax, [ebp - 0x428]
mov ecx, esp
mov dword [ebp - 0x44c], esp
call fcn.00403dc0
mov dword [ebp - 4], 3
call fcn.00403e40
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.0040d770
lea esi, [ebp - 0x42c]
mov dword [ebp - 0x42c], ebx
call fcn.00402780
call fcn.00403e40
cmp dword [ebp - 0x42c], 1
jne 0x40dace
mov byte [eax + 5], 1
jmp 0x40dad1
mov byte [eax + 5], bl
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.00419b16
mov esp, ebp
pop ebp
ret