Function at 0x4e8490
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x1c], ebx
je 0x4e84f8
movsx eax, word [esi + 0x52]
add eax, 8
xor edi, edi
test eax, eax
jle 0x4e84d2
mov ecx, dword [esi + 0x54]
mov eax, dword [ecx + edi*4]
cmp eax, ebx
je 0x4e84c6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi + 0x54]
mov dword [edx + edi*4], ebx
movsx eax, word [esi + 0x52]
inc edi
add eax, 8
cmp edi, eax
jl 0x4e84af
mov eax, dword [esi + 0x54]
cmp eax, ebx
je 0x4e84e2
push eax
call fcn.0050f580
add esp, 4
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x54], ebx
cmp eax, ebx
je 0x4e84f5
push eax
call fcn.0050f580
add esp, 4
mov dword [esi + 0x1c], ebx
movsx ecx, word [esi + 0x4c]
movsx edx, word [esi + 0x4e]
add ecx, edx
lea eax, [ecx*8 + 8]
push eax
call fcn.0050f560
movsx ecx, word [esi + 0x4e]
mov ebx, dword [esi + 0x24]
add esp, 4
lea edx, [ecx*4 + 0x20]
mov dword [esi + 0x1c], eax
push edx
mov dword [ebp - 4], ebx
call fcn.0050f560
mov dword [esi + 0x54], eax
add esp, 4
movsx eax, word [esi + 0x4e]
add eax, 8
xor edi, edi
test eax, eax
jle 0x4e8589
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 0
push 0
call ebx
mov ecx, dword [esi + 0x54]
mov dword [ecx + edi*4], eax
mov edx, dword [esi + 0x54]
cmp dword [edx + edi*4], 0
jne 0x4e857a
push str.m_phNotifyEvent_i_
push 0x2fe
push 0x5b7110
push str.Assertion_failed___s__d_:__s
call fcn.00558720
add esp, 0x10
movsx eax, word [esi + 0x4e]
inc edi
add eax, 8
cmp edi, eax
jl 0x4e8545
mov ebx, dword [ebp - 4]
mov ecx, dword [esi + 0x1c]
mov dword [ecx], ebx
mov edx, dword [esi + 0x54]
mov eax, dword [esi + 0x1c]
mov ecx, dword [edx]
mov dword [eax + 4], ecx
mov eax, 1
cmp word [esi + 0x4c], ax
jle 0x4e85c7
mov edx, dword [esi + 0x1c]
lea ecx, [edx + eax*8]
mov edx, dword [edx + eax*8 - 8]
add edx, ebx
inc eax
mov dword [ecx], edx
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x1c]
mov ecx, dword [ecx]
mov dword [edx + eax*8 - 4], ecx
movsx edx, word [esi + 0x4c]
cmp eax, edx
jl 0x4e85a4
mov ecx, dword [esi + 0x1c]
lea eax, [ecx + eax*8 - 8]
dec dword [eax]
movsx edx, word [esi + 0x4c]
movsx ecx, word [esi + 0x4e]
mov edi, edx
mov eax, edx
add edi, ecx
cmp eax, edi
jge 0x4e8621
mov ecx, eax
mov edi, dword [esi + 0x1c]
sub ecx, edx
mov edx, ecx
shl edx, 3
sub edx, ecx
mov ecx, dword [esi + 0x5c]
mov edx, dword [ecx + edx*4 + 8]
mov dword [edi + eax*8], edx
mov edi, dword [esi + 0x1c]
movsx ecx, word [esi + 0x4c]
mov edx, eax
sub edx, ecx
mov ecx, dword [esi + 0x54]
inc eax
mov edx, dword [ecx + edx*4 + 8]
mov dword [edi + eax*8 - 4], edx
movsx edx, word [esi + 0x4c]
movsx ecx, word [esi + 0x4e]
mov edi, edx
add edi, ecx
cmp eax, edi
jl 0x4e85e2
mov edx, dword [esi + 0x1c]
shl eax, 3
mov dword [eax + edx], 0xffffffff
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x1c]
mov ecx, dword [ecx + 4]
mov dword [eax + edx + 4], ecx
lea edx, [ebp - 8]
push edx
push 0
push esi
push 0x4e8730
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor ebx, ebx
mov dword [esi + 0x58], eax
cmp eax, ebx
jne 0x4e8670
push str.StreamObj::SetupNotifications___CreateThread_failed
call fcn.00558660
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 8]
movsx edi, word [esi + 0x4e]
mov ecx, dword [eax]
push edx
movsx edx, word [esi + 0x4c]
lea edx, [edx + edi + 1]
push edx
push eax
call dword [ecx + 0xc]
mov edi, eax
cmp edi, ebx
je 0x4e871a
cmp edi, 0x80070057
jne 0x4e86a9
push str.StreamObj::SetupNotificationPos_failed._Invalid_Param
call fcn.00558660
add esp, 4
cmp edi, 0x8007000e
jne 0x4e86be
push str.StreamObj::SetupNotificationPos_failed._OutOfMemory
call fcn.00558660
add esp, 4
movsx eax, word [esi + 0x4e]
add eax, 8
xor edi, edi
test eax, eax
jle 0x4e86eb
mov ecx, dword [esi + 0x54]
mov edx, dword [ecx + edi*4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x54]
inc edi
mov dword [eax + edi*4 - 4], ebx
movsx ecx, word [esi + 0x4e]
add ecx, 8
cmp edi, ecx
jl 0x4e86cb
mov eax, dword [esi + 0x54]
cmp eax, ebx
je 0x4e86fb
push eax
call fcn.0050f580
add esp, 4
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x54], ebx
cmp eax, ebx
je 0x4e870e
push eax
call fcn.0050f580
add esp, 4
mov dword [esi + 0x1c], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret