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

Disassembly:
push 0xffffffffffffffff
push 0x420d20
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 0x412997
mov ecx, dword [ecx + 4]
jmp 0x41299a
add ecx, 4
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
cmp eax, edi
mov dword [esp + 0x10], eax
jne 0x4129da
mov esi, dword [esp + 0x74]
cmp esi, edi
je 0x4129d3
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.0041a53d
add esp, 0x14
xor al, al
jmp 0x412b9c
push ebx
push ebp
mov ebp, dword [esp + 0x7c]
cmp ebp, edi
je 0x412ac2
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 0x412ac2
push edi
push 0x422530
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 0x412aae
add ebp, 0x14
cmp esi, 0xa
jae 0x412aaa
cmp ebx, esi
jbe 0x412ada
mov eax, dword [ebp]
inc eax
push eax
call fcn.0041a538
add esp, 4
cmp ebx, esi
mov edi, eax
mov dword [esp + esi*4 + 0x1c], edi
jbe 0x412ae3
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 0x412aec
cmp dword [ebp + 4], 0x10
mov ecx, dword [ebp]
jb 0x412a8a
mov eax, dword [ebp - 0x10]
jmp 0x412a8d
lea eax, [ebp - 0x10]
push ecx
push eax
mov eax, dword [esp + esi*4 + 0x24]
push eax
call fcn.0040cce0
mov eax, dword [esp + 0x20]
add esp, 0xc
inc esi
add ebp, 0x1c
xor edi, edi
cmp esi, eax
jb 0x412a40
mov ebp, dword [esp + 0x7c]
cmp dword [esp + 0x5c], 0x10
jb 0x412ac2
mov ecx, dword [esp + 0x48]
push ecx
call fcn.0041a53d
add esp, 4
mov eax, dword [esp + 0x88]
sub eax, edi
je 0x412afc
dec eax
je 0x412af5
dec eax
jne 0x412afc
mov eax, 2
jmp 0x412b01
lea ecx, [esp + 0x78]
call fcn.00412690
lea ecx, [esp + 0x78]
call fcn.00412690
lea ecx, [esp + 0x78]
call fcn.00412690
mov eax, 4
jmp 0x412b01
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 0x412b2f
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 0x412b42
push eax
call fcn.0041a53d
add esp, 4
inc esi
cmp esi, 0xa
jl 0x412b31
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
cmp ebp, edi
je 0x412b96
mov ebx, dword [esp + 0x80]
cmp ebp, ebx
je 0x412b8d
lea esi, [ebp + 0x18]
cmp dword [esi], 0x10
jb 0x412b76
mov edx, dword [esi - 0x14]
push edx
call fcn.0041a53d
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 0x412b65
push ebp
call fcn.0041a53d
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.0040649e
add esp, 0x60
ret 0x18