Function at 0x491d80
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f6594
mov eax, dword fs:[0]
push eax
push ecx
push ebx
sub esp, 0x60
mov eax, dword [0x54d104]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
lea eax, [edi + 0x24]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x28], esi
lea ecx, [esi + 4]
mov dword [ebp - 0x24], ecx
test esi, esi
je 0x491ded
lock inc dword [ecx]
jmp 0x491df0
mov dword [ebp - 0x24], ecx
mov byte [ebp - 4], 2
mov eax, dword [edi + 0x54]
cmp eax, dword [edi + 0x58]
je 0x491e0b
mov dword [eax], esi
test esi, esi
je 0x491e05
lock inc dword [ecx]
add dword [edi + 0x54], 4
jmp 0x491e1b
lea ecx, [ebp - 0x28]
push ecx
push eax
lea ecx, [edi + 0x50]
call fcn.00492710
mov ecx, dword [ebp - 0x24]
mov byte [ebp - 4], 1
test esi, esi
je 0x491e47
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x491e40
mov eax, dword [esi]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x4f933c]
mov ecx, dword [ebx + 8]
call esi
mov dword [ebp - 0x28], 0
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x48]
cmp ecx, edx
je 0x491e60
push ecx
call fcn.00492640
mov eax, dword [edi + 0x44]
add esp, 4
mov dword [edi + 0x48], eax
lea eax, [edi + 0x3c]
mov byte [ebp - 0x2d], 0
mov dword [ebp - 0x24], eax
mov eax, dword [eax]
mov eax, dword [eax]
nop
cmp byte [eax + 0xd], 0
jne 0x491edc
mov ecx, dword [eax + 0x10]
cmp dword [ecx + 0x30], 0
je 0x491ebc
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
je 0x491ea5
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x491ea1
cmp eax, dword [ecx + 8]
jne 0x491ea1
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x491e91
mov eax, ecx
jmp 0x491e70
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
jne 0x491e70
nop
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
je 0x491eb0
jmp 0x491e70
push dword [ecx + 0x2c]
mov dword [ecx + 0x30], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x49212c
mov eax, dword [edi + 0x40]
cmp eax, dword [edi + 0x20]
jae 0x492107
push 0x38
mov dword [ebp - 0x20], 0
call fcn.004af3f1
mov esi, eax
add esp, 4
mov dword [ebp - 0x2c], esi
push 0x38
push 0
push esi
call fcn.004b23a0
add esp, 0xc
mov edx, edi
cmp dword [edi + 0x14], 8
jb 0x491f15
mov edx, dword [edi]
mov dword [esi], vtable.asw::common::refobj.0
mov dword [esi + 4], 0
mov ecx, edx
mov byte [ebp - 4], 4
xorps xmm0, xmm0
mov dword [ebp - 0x60], 0
movups xmmword [ebp - 0x70], xmm0
mov dword [ebp - 0x5c], 0
lea eax, [ecx + 2]
mov dword [ebp - 0x38], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x491f43
sub ecx, dword [ebp - 0x38]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.0040a960
push 0x537108
lea edx, [ebp - 0x70]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x50]
call fcn.0040a360
movups xmm0, xmmword [ebp - 0x50]
mov dword [esi + 8], vtable.asw::threading::thread.0
lea ecx, [ebp - 0x50]
mov dword [esi + 0xc], 0
add esp, 4
mov dword [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
movups xmmword [esi + 0x14], xmm0
mov word [ebp - 0x50], ax
movq xmm0, qword [ebp - 0x40]
movq qword [esi + 0x24], xmm0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 7
call fcn.0040aa40
lea ecx, [ebp - 0x70]
call fcn.0040aa40
mov dword [esi + 0x34], edi
lea edi, [esi + 4]
mov dword [esi], vtable.asw::common::jobthread.1.0
mov dword [esi + 8], vtable.asw::common::jobthread.0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 1
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x2c], edi
lock inc dword [edi]
push 0
push 0
push 1
push 0
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x2c], eax
test eax, eax
jne 0x49201a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x492047
lea edi, [esi + 8]
lea eax, [edi + 8]
push eax
push 0
push edi
push 0x4928e0
push 0
push 0
call fcn.004c1d2c
xor edx, edx
mov dword [edi + 4], eax
add esp, 0x18
lea edi, [esi + 4]
test eax, eax
mov ecx, 0x9b
cmovne ecx, edx
test ecx, ecx
jne 0x492114
mov ecx, dword [ebp - 0x24]
xor edi, edi
mov eax, dword [ecx]
mov edx, eax
mov dword [ebp - 0x38], eax
mov ecx, dword [eax + 4]
mov eax, ecx
mov dword [ebp - 0x28], ecx
cmp byte [ecx + 0xd], 0
jne 0x49208e
nop dword [eax]
mov dword [ebp - 0x28], eax
cmp dword [eax + 0x10], esi
jae 0x49207f
mov eax, dword [eax + 8]
xor edi, edi
jmp 0x492088
mov edx, eax
mov edi, 1
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x492070
cmp byte [edx + 0xd], 0
jne 0x492099
cmp esi, dword [edx + 0x10]
jae 0x4920e8
mov eax, dword [ebp - 0x24]
cmp dword [eax + 4], 0xccccccc
je 0x49214c
mov dword [ebp - 0x58], eax
mov byte [ebp - 4], 7
push 0x14
mov dword [ebp - 0x54], 0
call fcn.004af3f1
add esp, 4
lea ecx, [esi + 4]
mov dword [eax + 0x10], esi
lock inc dword [ecx]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x24]
push eax
mov dword [eax], edx
push edi
push dword [ebp - 0x28]
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov word [eax + 0xc], 0
call fcn.0040e6e0
mov ecx, dword [ebp - 0x2c]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x492107
mov eax, dword [esi]
push 1
mov edi, dword [eax]
mov ecx, edi
call dword [0x4f933c]
mov ecx, esi
call edi
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x49212c
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
jmp 0x4920f3
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004af3ab
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
call fcn.0040eae0
int3