Function at 0x476b00
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4f4
mov eax, dword [0x61b000]
xor eax, ebp
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x4e4], ecx
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 0x5e5234
push 0
call dword [sym.imp.ADVAPI32.dll_OpenEventLogW]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 8], 0
jne 0x476b63
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_OpenEventLogW_err_d__OUT__n
push 0x5e529c
call fcn.0040c230
add esp, 0xc
mov eax, dword [ebp - 0x14]
jmp 0x47728d
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
push ecx
mov ecx, dword [ebp - 0x4e4]
call fcn.004767b0
test eax, eax
je 0x476bdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WARR:_SeekToLastRecord_err_d__will_reopen_event_handle__n
push 0x5e5978
call fcn.0040c230
add esp, 0xc
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
push 0x5e599c
push 0
call dword [sym.imp.ADVAPI32.dll_OpenEventLogW]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x10]
cmp dword [edx + 8], 0
jne 0x476bdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_OpenEventLogW2_err_d__OUT__n
push 0x5e59fc
call fcn.0040c230
add esp, 0xc
mov eax, dword [ebp - 0x14]
jmp 0x47728d
mov eax, dword [ebp - 0x10]
mov dword [eax], 0x5e5a20
push 0x7fffe
call fcn.00561ab0
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x476c1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_malloc_memory_512KB_err_d__OUT__n
push 0x5e5a88
call fcn.0040c230
add esp, 0xc
mov eax, dword [ebp - 0x14]
jmp 0x47728d
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 4], edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0x7fffe
mov dword [ebp - 8], 0
cmp dword [ebp - 0x24], 0
jne 0x477262
mov eax, dword [ebp - 0x4e4]
cmp dword [eax], 0
je 0x476c74
push 0x5e5aac
push 0x5e5ae4
call fcn.0040c230
add esp, 8
jmp 0x477262
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetOldestEventLogRecord]
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
push edx
push 0
push 5
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_ReadEventLogA]
test eax, eax
jne 0x476deb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x7a
jne 0x476d1c
mov dword [ebp - 0x24], 0
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00565119
add esp, 8
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x476d02
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.Error:_realloc_memory_size_d_err_d__OUT__n
push 0x5e5b64
call fcn.0040c230
add esp, 0x10
jmp 0x477262
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 4], edx
jmp 0x476de9
cmp dword [ebp - 0x24], 0x26
je 0x476d28
cmp dword [ebp - 0x24], 0x57
jne 0x476d41
mov dword [ebp - 0x24], 0
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x476c48
cmp dword [ebp - 0x24], 0x5dc
je 0x476d5c
cmp dword [ebp - 0x24], 0x5de
je 0x476d5c
cmp dword [ebp - 0x24], 0x5df
jne 0x476dcb
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
push str.Security
push 0
call dword [sym.imp.ADVAPI32.dll_OpenEventLogW]
mov edx, dword [ebp - 0x10]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
jne 0x476da3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:_OpenEventLogW3_err_d__OUT__n
push 0x5e5bec
call fcn.0040c230
add esp, 0xc
jmp 0x477262
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
push edx
mov ecx, dword [ebp - 0x4e4]
call fcn.004767b0
mov dword [ebp - 0x24], 0
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x476c48
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WARR:_ReadEventLogA_failed_err_d__break__n
push 0x5e5c68
call fcn.0040c230
add esp, 0xc
jmp 0x477262
jmp 0x476df2
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x28], 0
jbe 0x477227
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
cmp dword [eax + 0x14], 0x1211
je 0x476e85
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x14], 0x211
jb 0x476e39
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
cmp dword [ecx + 0x14], 0x219
jbe 0x476e85
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
cmp dword [eax + 0x14], 0x21b
je 0x476e85
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x28]
cmp eax, dword [edx]
ja 0x476e5e
mov dword [ebp - 0x28], 0
jmp 0x476e6c
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x28]
sub eax, dword [edx]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
add ecx, dword [edx]
mov edx, dword [ebp - 0x10]
mov dword [edx + 4], ecx
jmp 0x476df9
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
movzx edx, word [ecx + 0x18]
cmp edx, 0x10
je 0x476ed1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x28]
cmp edx, dword [ecx]
ja 0x476eaa
mov dword [ebp - 0x28], 0
jmp 0x476eb8
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x28]
sub edx, dword [ecx]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
add eax, dword [ecx]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
jmp 0x476df9
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
add eax, 0x38
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
movzx eax, word [edx + 0x1a]
test eax, eax
je 0x477177
mov dword [ebp - 0x4d4], 0x3fc
mov byte [ebp - 0x448], 0
push 0x400
push 0
lea ecx, [ebp - 0x447]
push ecx
call fcn.00568440
add esp, 0xc
mov dword [ebp - 0x4d0], 0
push 0x7c
push 0
lea edx, [ebp - 0x4cc]
push edx
call fcn.00568440
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
add eax, dword [ecx + 0x24]
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x4d8], 0
jmp 0x476f6a
mov ecx, dword [ebp - 0x4d8]
add ecx, 1
mov dword [ebp - 0x4d8], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
movzx ecx, word [eax + 0x1a]
cmp dword [ebp - 0x4d8], ecx
jae 0x477093
mov edx, dword [ebp - 0x44c]
mov dword [ebp - 0x4e8], edx
mov eax, dword [ebp - 0x4e8]
add eax, 1
mov dword [ebp - 0x4ec], eax
mov ecx, dword [ebp - 0x4e8]
mov dl, byte [ecx]
mov byte [ebp - 0x4ed], dl
add dword [ebp - 0x4e8], 1
cmp byte [ebp - 0x4ed], 0
jne 0x476f9b
mov eax, dword [ebp - 0x4e8]
sub eax, dword [ebp - 0x4ec]
mov dword [ebp - 0x4f4], eax
mov ecx, dword [ebp - 0x4f4]
mov dword [ebp - 0x4dc], ecx
mov edx, dword [ebp - 0x4d4]
push edx
mov eax, dword [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x448]
push ecx
call fcn.00566f60
add esp, 0xc
push 0
lea edx, [ebp - 0x448]
push edx
call fcn.00473c40
add esp, 8
mov dword [ebp - 0x4e0], eax
cmp dword [ebp - 0x4e0], 0
je 0x477035
mov eax, dword [ebp - 0x4e0]
mov byte [eax], 0x20
mov ecx, dword [ebp - 0x4e0]
add ecx, 1
mov dword [ebp - 0x4e0], ecx
mov edx, dword [ebp - 0x4e0]
mov byte [edx], 0
mov eax, dword [ebp - 0x4dc]
add eax, 1
mov ecx, dword [ebp - 0x4d4]
sub ecx, eax
mov dword [ebp - 0x4d4], ecx
cmp dword [ebp - 0x4d8], 0x20
jae 0x477068
mov edx, dword [ebp - 0x4d8]
mov eax, dword [ebp - 0x44c]
mov dword [ebp + edx*4 - 0x4d0], eax
push 0
mov ecx, dword [ebp - 0x44c]
push ecx
call fcn.00473c40
add esp, 8
mov dword [ebp - 0x44c], eax
mov edx, dword [ebp - 0x44c]
add edx, 1
mov dword [ebp - 0x44c], edx
jmp 0x476f5b
lea eax, [ebp - 0x4d0]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
push edx
call fcn.00476460
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x477175
mov eax, dword [0x64065c]
and eax, 0xf
cmp eax, 2
jb 0x477175
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x14], 0x1211
jne 0x477175
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
movzx edx, word [ecx + 0x1a]
push edx
lea eax, [ebp - 0x4d0]
push eax
mov ecx, dword [ebp - 0x4e4]
call fcn.00477590
test eax, eax
je 0x477119
push str.Exclude_logon_fail_event_with_UAC_1__n
push 0x5e5ce0
call fcn.0040c230
add esp, 8
jmp 0x477175
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
movzx eax, word [edx + 0x1a]
push eax
lea ecx, [ebp - 0x4d0]
push ecx
mov ecx, dword [ebp - 0x4e4]
call fcn.004774d0
test eax, eax
je 0x47714e
push 0x5e5d08
push 0x5e5d68
call fcn.0040c230
add esp, 8
jmp 0x477175
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
movzx ecx, word [eax + 0x1a]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 0xc]
push ecx
lea edx, [ebp - 0x4d0]
push edx
mov ecx, dword [ebp - 0x4e4]
call fcn.00477770
jmp 0x477189
push str.WARR:_This_event_no_message__n
push 0x5e5dcc
call fcn.0040c230
add esp, 8
cmp dword [ebp - 0x3c], 0
je 0x477200
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x4e4]
call fcn.004772a0
test eax, eax
je 0x4771b6
push str.Exclude_logon_fail_event_with_UAC_2__n
push 0x5e5e40
call fcn.0040c230
add esp, 8
jmp 0x4771f6
mov ecx, dword [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x4e4]
call fcn.00477360
test eax, eax
je 0x4771dd
push str.Exclude_logon_fail_event_with_USER_change_1__n
push str.CSessionMon::StartAuditElogMonitor
call fcn.0040c230
add esp, 8
jmp 0x4771f6
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, dword [ebp - 0x4e4]
call fcn.00477be0
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x28]
sub eax, dword [edx]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 4]
add ecx, dword [edx]
mov edx, dword [ebp - 0x10]
mov dword [edx + 4], ecx
jmp 0x476df9
cmp dword [ebp - 0x30], 0
je 0x477254
cmp dword [ebp - 8], 0
je 0x477245
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 8]
sub ecx, dword [ebp - 8]
push ecx
call fcn.0048d9a0
add esp, 4
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x10]
push eax
call fcn.0048d8c0
add esp, 4
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
mov dword [ecx + 4], edx
jmp 0x476c48
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
je 0x477278
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
cmp dword [ebp - 0x2c], 0
je 0x47728a
mov eax, dword [ebp - 0x2c]
push eax
call fcn.005619d3
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.00560c61
mov esp, ebp
pop ebp
ret