Function at 0x491250
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cffb5
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x502054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
or ebx, 0xffffffff
cmp dword [0x514c64], 0
jne 0x4912c7
push 0x36
lea eax, [ebp - 0x10]
push eax
call fcn.0048bb10
mov dword [ebp - 4], 0
push dword [eax]
push 0
push 0x100000
call esi
mov dword [0x514c64], eax
mov dword [ebp - 4], ebx
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4912c7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [0x514c68], 0
jne 0x491313
push 0x37
lea eax, [ebp - 0x10]
push eax
call fcn.0048bb10
mov dword [ebp - 4], 2
push dword [eax]
push 0
push 0x100000
call esi
mov dword [0x514c68], eax
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x491313
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [0x514c60], 0
jne 0x49135f
push 0x38
lea eax, [ebp - 0x10]
push eax
call fcn.0048bb10
mov dword [ebp - 4], 4
push dword [eax]
push 0
push 0x100000
call esi
mov dword [0x514c60], eax
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x49135f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 4
call fcn.004a9d6b
add esp, 4
mov ebx, eax
mov dword [ebp - 0x10], ebx
call fcn.00456f20
test eax, eax
je 0x491490
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00456f20
mov ecx, eax
test ecx, ecx
je 0x491490
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 7
lea ecx, [ebp - 0x10]
mov esi, dword [ebp + 0x14]
push esi
call fcn.00460eb0
test al, al
jne 0x4913e9
test esi, esi
jne 0x4913c7
xor ecx, ecx
jmp 0x4913df
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4913d0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x10]
call fcn.00461210
mov dword [ebp - 4], 8
mov eax, dword [ebp - 0x10]
mov esi, dword [ebx]
sub esi, 0x10
lea edi, [eax - 0x10]
cmp edi, esi
je 0x491443
cmp dword [esi + 0xc], 0
jl 0x491438
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x491438
push edi
call fcn.00461130
add esp, 4
mov dword [ebp + 0x18], eax
or ecx, 0xffffffff
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x491431
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0x18]
add eax, 0x10
mov dword [ebx], eax
jmp 0x491443
push dword [eax - 0xc]
mov ecx, ebx
push eax
call fcn.00461210
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x49145f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0
push ebx
push 0x4911a0
push 0
push 0
call fcn.004b3b0d
add esp, 0x18
mov dword [0x514eb8], eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 0x80004005
call fcn.00456c70
int3