Function at 0x210423f9
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0x10], 0
je 0x21042411
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
cmp dword [ebp + 0x14], 0
je 0x21042420
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
mov ecx, dword [ebp - 0x1c]
call fcn.21041f8b
test eax, eax
je 0x21042436
mov eax, 1
jmp 0x21042615
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 8], 0
jne 0x21042446
xor eax, eax
jmp 0x21042615
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push 4
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x1c]
push eax
push 0x2104261b
call fcn.210592ba
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 4], 0
jne 0x21042481
xor eax, eax
jmp 0x21042615
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 0x24], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x3c], ecx
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0x3c], 0
je 0x2104253f
cmp dword [ebp + 0x10], 0
je 0x210424dd
push 0x18
call fcn.21058728
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov dword [eax + 0x40], ecx
cmp dword [ebp - 4], 0
je 0x210424dd
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x40]
mov dword [ecx], eax
cmp dword [ebp + 0x14], 0
je 0x21042502
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0x44], eax
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x44]
mov dword [edx], ecx
push 0x2107c330
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov ecx, dword [eax + 0x28]
mov dword [ebp - 0x10], ecx
mov edx, dword [0x2107c358]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov ecx, 0x2107c350
call fcn.21057ff5
push 0x2107c330
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 4]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x21042610
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x3c], 0
je 0x2104260c
push 0x2107c330
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 4]
mov eax, dword [edx + 0x28]
push eax
push 0x2107c350
call fcn.2102ae2a
push 0x2107c330
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx + 0x44], 0
je 0x210425b9
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 0x44], 0
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0x40], 0
je 0x210425ee
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x40]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.21058751
add esp, 4
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x40], 0
cmp dword [ebp + 0x10], 0
je 0x210425fd
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
cmp dword [ebp + 0x14], 0
je 0x2104260c
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
xor eax, eax
jmp 0x21042615
mov eax, 1
mov esp, ebp
pop ebp
ret 0x10