Function at 0x402a85
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
push edi
lea eax, [ebp - 4]
push eax
call sub.MSVCRT.dll_time
add esp, 4
lea ecx, [ebp - 4]
push ecx
call sub.MSVCRT.dll_localtime
add esp, 4
mov dword [ebp - 0x90], eax
mov edx, dword [0x4054fc]
mov dword [ebp - 0x8c], edx
mov eax, dword [ebp - 0x8c]
cmp dword [eax + 0x4c], 0
je 0x402ad6
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ecx + 0x4c]
mov dword [ebp - 0x8c], edx
jmp 0x402ab9
push 0x50
call sub.MSVCRT.dll_malloc
add esp, 4
mov dword [ebp - 8], eax
mov ecx, 0x14
xor eax, eax
mov edi, dword [ebp - 8]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x90]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 8]
push eax
push str._.2d:_.2d
mov ecx, dword [ebp - 8]
add ecx, 0x32
push ecx
call sub.MSVCRT.dll_sprintf
add esp, 0x10
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0x14]
cdq
mov ecx, 0x64
idiv ecx
push edx
mov edx, dword [ebp - 0x90]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x10]
add edx, 1
push edx
push str._.2d__.2d__.2d
mov eax, dword [ebp - 8]
add eax, 0x19
push eax
call sub.MSVCRT.dll_sprintf
add esp, 0x14
cmp dword [ebp + 8], 0xfa
jl 0x402bad
cmp dword [ebp + 8], 0x118
jg 0x402bad
push 0x19
lea ecx, [ebp - 0x88]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [0x4054f4]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea ecx, [ebp - 0x88]
push ecx
push 0x405338
mov edx, dword [ebp - 8]
push edx
call sub.MSVCRT.dll_sprintf
add esp, 0xc
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ebp - 8]
mov dword [ecx + 0x4c], edx
xor eax, eax
mov ax, word [0x405030]
cmp eax, 1
jne 0x402d4c
push str.InterBase_Guardian
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
jne 0x402bec
push str.Error_opening_Windows_NT_Event_Log
call sub.gds32.dll_Ordinal_42
add esp, 4
jmp 0x402d4c
push 0x80
call sub.MSVCRT.dll_malloc
add esp, 4
mov dword [ebp - 0x94], eax
push 0x80
lea ecx, [ebp - 0x88]
push ecx
mov edx, dword [ebp + 8]
add edx, 1
push edx
mov eax, dword [0x4054f4]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov ecx, dword [ebp + 0xc]
push ecx
push 0x405374
mov edx, dword [ebp - 0x94]
push edx
call sub.MSVCRT.dll_sprintf
add esp, 0xc
lea eax, [ebp - 0x94]
push eax
push 0
lea ecx, [ebp - 0xa0]
push ecx
push 0
push 0
lea edx, [ebp - 0x88]
push edx
push 0x2500
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edi, dword [ebp - 0xa0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
push ecx
mov eax, dword [ebp - 0xa0]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
call sub.MSVCRT.dll_strncpy
add esp, 0xc
mov edx, dword [ebp - 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xa4], 0xfa
je 0x402cb5
cmp dword [ebp - 0xa4], 0x104
je 0x402cb5
jmp 0x402cc0
mov word [ebp - 0x9c], 4
jmp 0x402cc9
mov word [ebp - 0x9c], 1
push 0
lea ecx, [ebp - 0x94]
push ecx
push 0
push 1
push 0
mov edx, dword [ebp + 8]
add edx, 1
push edx
push 0
mov ax, word [ebp - 0x9c]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
test eax, eax
jne 0x402d3f
push 0
push 0
lea edx, [ebp - 0xa0]
push edx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [ebp - 0xa0]
push eax
push str.Unable_to_update_NT_Event_Log._n_tOS_Message:__s
call sub.gds32.dll_Ordinal_42
add esp, 8
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x98]
push edx
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
test ecx, ecx
je 0x402d62
mov edx, dword [ebp + 0xc]
push edx
call sub.gds32.dll_Ordinal_42
add esp, 4
pop edi
mov esp, ebp
pop ebp
ret