Function at 0x412960
Capabilities:
Access peb ldr_data
Access the windows event log

Disassembly:
push 0xffffffffffffffff
push 0x420d50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
mov eax, dword [0x42a874]
push esi
mov dword [esp + 0x54], eax
push edi
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
xor edi, edi
mov dword [esp + 0x38], eax
cmp dword [ecx + 0x18], 0x10
mov dword [esp + 0x64], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], edi
mov byte [esp + 0xb], 1
jb 0x4129c7
mov ecx, dword [ecx + 4]
jmp 0x4129ca
add ecx, 4
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
cmp eax, edi
mov dword [esp + 0x10], eax
jne 0x412a0a
mov esi, dword [esp + 0x74]
cmp esi, edi
je 0x412a03
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x78]
push ecx
lea edx, [esp + 0x74]
push edx
push eax
push esi
call fcn.00401820
push esi
call fcn.0041a56d
add esp, 0x14
xor al, al
jmp 0x412bcc
push ebx
push ebp
mov ebp, dword [esp + 0x7c]
cmp ebp, edi
je 0x412af2
mov ecx, dword [esp + 0x80]
sub ecx, ebp
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
cmp ebx, edi
je 0x412af2
push edi
push 0x422540
lea ecx, [esp + 0x4c]
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], edi
mov byte [esp + 0x50], 0
call fcn.004014c0
mov eax, ebx
xor esi, esi
cmp eax, edi
mov byte [esp + 0x6c], 1
mov dword [esp + 0x14], eax
jbe 0x412ade
add ebp, 0x14
cmp esi, 0xa
jae 0x412ada
cmp ebx, esi
jbe 0x412b0a
mov eax, dword [ebp]
inc eax
push eax
call fcn.0041a568
add esp, 4
cmp ebx, esi
mov edi, eax
mov dword [esp + esi*4 + 0x1c], edi
jbe 0x412b13
mov ecx, dword [ebp]
inc ecx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
cmp ebx, esi
rep stosb byte es:[edi], al
jbe 0x412b1c
cmp dword [ebp + 4], 0x10
mov ecx, dword [ebp]
jb 0x412aba
mov eax, dword [ebp - 0x10]
jmp 0x412abd
lea eax, [ebp - 0x10]
push ecx
push eax
mov eax, dword [esp + esi*4 + 0x24]
push eax
call fcn.0040cd10
mov eax, dword [esp + 0x20]
add esp, 0xc
inc esi
add ebp, 0x1c
xor edi, edi
cmp esi, eax
jb 0x412a70
mov ebp, dword [esp + 0x7c]
cmp dword [esp + 0x5c], 0x10
jb 0x412af2
mov ecx, dword [esp + 0x48]
push ecx
call fcn.0041a56d
add esp, 4
mov eax, dword [esp + 0x88]
sub eax, edi
je 0x412b2c
dec eax
je 0x412b25
dec eax
jne 0x412b2c
mov eax, 2
jmp 0x412b31
lea ecx, [esp + 0x78]
call fcn.004126c0
lea ecx, [esp + 0x78]
call fcn.004126c0
lea ecx, [esp + 0x78]
call fcn.004126c0
mov eax, 4
jmp 0x412b31
mov eax, 1
mov ecx, dword [esp + 0x14]
push edi
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x7c]
push edi
push ecx
push edi
push edx
push edi
push eax
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
test eax, eax
jne 0x412b5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esp + 0x13], 0
xor esi, esi
mov eax, dword [esp + esi*4 + 0x1c]
cmp eax, edi
je 0x412b72
push eax
call fcn.0041a56d
add esp, 4
inc esi
cmp esi, 0xa
jl 0x412b61
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
cmp ebp, edi
je 0x412bc6
mov ebx, dword [esp + 0x80]
cmp ebp, ebx
je 0x412bbd
lea esi, [ebp + 0x18]
cmp dword [esi], 0x10
jb 0x412ba6
mov edx, dword [esi - 0x14]
push edx
call fcn.0041a56d
add esp, 4
mov dword [esi], 0xf
mov dword [esi - 4], edi
mov byte [esi - 0x14], 0
add esi, 0x1c
lea eax, [esi - 0x18]
cmp eax, ebx
jne 0x412b95
push ebp
call fcn.0041a56d
add esp, 4
mov al, byte [esp + 0x13]
pop ebp
pop ebx
mov ecx, dword [esp + 0x5c]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x54]
pop esi
call fcn.004064ce
add esp, 0x60
ret 0x18