Function at 0x41d420
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a47f
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
push edi
mov eax, dword [0x4c3008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
lea esi, [edi + 0xc]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x18], esi
test esi, esi
je 0x41d46a
mov eax, dword [esi]
test eax, eax
je 0x41d46a
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [ebp + 8]
cmp eax, ecx
je 0x41d48f
nop dword [eax]
cmp edx, dword [eax]
je 0x41d6a5
add eax, 0x18
cmp eax, ecx
jne 0x41d480
xorps xmm0, xmm0
mov dword [ebp - 0x38], edx
movlpd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0
cmp dword [edi + 8], ecx
je 0x41d4bd
movups xmm0, xmmword [ebp - 0x38]
movups xmmword [ecx], xmm0
movq xmm0, qword [ebp - 0x28]
movq qword [ecx + 0x10], xmm0
add dword [edi + 4], 0x18
jmp 0x41d4c9
lea eax, [ebp - 0x38]
push eax
push ecx
mov ecx, edi
call fcn.0041fc00
mov eax, dword [edi + 0x10]
test eax, eax
je 0x41d525
push 0
mov ecx, eax
call fcn.004775f0
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 8]
test eax, eax
je 0x41d4f1
cmp byte [eax + 8], 0
mov esi, dword [ebp - 0x18]
je 0x41d4f1
mov eax, dword [edi + 0x10]
jmp 0x41d51d
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x41d525
push 0xffffffffffffffff
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub eax, 1
jne 0x41d514
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [edi + 0x10], 0
xor eax, eax
test eax, eax
jne 0x41d6a5
mov eax, dword [edi + 0x38]
mov ecx, dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
je 0x41d53b
push eax
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [edi + 0x18]
test eax, eax
je 0x41d545
push eax
call ecx
push 0xc
call fcn.00495484
add esp, 4
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
xorps xmm0, xmm0
push edi
push ecx
movq qword [eax], xmm0
mov ecx, eax
mov dword [eax + 8], 0
call fcn.00477370
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 0
mov edi, dword [edi + 0x10]
cmp edi, eax
je 0x41d5b6
test eax, eax
je 0x41d591
push 1
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov edi, dword [ebp - 0x10]
mov edi, dword [edi + 0x10]
test edi, edi
je 0x41d5ad
push 0xffffffffffffffff
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub eax, 1
jne 0x41d5ad
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
mov dword [eax + 0x10], edi
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x41d6a5
add ecx, 0x20
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
je 0x41d5e3
mov eax, dword [ecx]
test eax, eax
je 0x41d5e3
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 2
mov eax, dword [edi + 8]
cmp dword [eax + 4], 0
jne 0x41d617
mov byte [ebp - 4], 0
test ecx, ecx
je 0x41d6a5
mov eax, dword [ecx]
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test eax, eax
je 0x41d60b
push eax
call edi
mov dword [ebp - 0x14], 0
jmp 0x41d6ab
lea eax, [edi + 4]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov eax, dword [edi + 8]
add eax, 0xc
push eax
push 4
push edi
push 0x477170
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, dword [edi + 8]
add esp, 0x18
mov dword [ecx + 0x10], eax
mov eax, dword [edi + 8]
cmp dword [eax + 0x10], 0
jne 0x41d67d
push 0xffffffffffffffff
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
sub eax, 1
jne 0x41d666
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [edi + 8]
call fcn.00477330
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x41d6a5
mov eax, dword [eax]
jmp 0x41d5fe
mov byte [eax + 8], 1
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x41d695
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [edi + 8]
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x41d66e
jmp 0x41d64e
mov edi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x41d6c6
mov eax, dword [esi]
test eax, eax
je 0x41d6bf
push eax
call edi
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4