Function at 0xc2a9a8e
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push 0x19c
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, dword [ebp + 8]
mov esi, eax
test esi, esi
jne 0xc2a9ac5
mov dword [ebp + 8], 0x8007000e
and dword [ebx + 0x118], 0
mov eax, dword [ebp + 8]
pop esi
pop ebx
leave
ret 4
mov dword [esi + 0x48], ebx
mov eax, dword [ebx + 0xe8]
mov dword [esi], eax
mov eax, dword [ebx + 0x48]
mov dword [esi + 0xc], eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esi + 0x2c]
mov dword [esi + 0xec], 0
mov dword [esi + 0x44], 1
push eax
call edi
lea eax, [esi + 0x10]
push eax
call edi
lea eax, [esi + 0xfc]
push eax
call edi
and dword [esi + 0x11c], 0
lea eax, [esi + 0x12c]
push eax
mov dword [esi + 0x118], 0
call edi
lea eax, [esi + 0x144]
mov dword [eax], eax
mov dword [esi + 0x148], eax
lea eax, [esi + 0xf4]
push 8
push eax
call dword [sym.imp.WINMM.dll_timeGetDevCaps]
test eax, eax
je 0xc2a9b52
mov dword [esi + 0xf4], 5
mov dword [esi + 0xf8], 0x989680
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0xf0], eax
mov eax, dword [esi + 0xf0]
test eax, eax
jne 0xc2a9b80
mov edi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [ebp + 8], 0x8007000e
jmp 0xc2a9d19
cmp dword [0xc2b27cc], 0
jne 0xc2a9bb8
push 0xc2b2d00
call edi
mov eax, 0xc2b2cf8
mov dword [0xc2b2cf8], eax
mov dword [0xc2b2cfc], eax
call fcn.0c2ae348
call fcn.0c2ae24a
call fcn.0c2ae4e4
call fcn.0c2ae6f6
call fcn.0c2ae9f4
push esi
call fcn.0c2aeb1e
inc dword [0xc2b27cc]
push 0xa
xor eax, eax
pop ecx
lea edi, [ebp - 0x38]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0xc], eax
mov eax, dword [ebx + 0xe8]
xor edi, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x14]
push ecx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x38], 0x28
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
call dword [eax + 0x30]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov ecx, 0x578
mov dword [esi + 4], eax
cmp eax, ecx
jbe 0xc2a9c0e
mov dword [esi + 4], ecx
mov eax, dword [ebx + 0x14]
lea ecx, [ebp - 0x10]
push ecx
mov dword [ebp - 8], 4
call dword [eax + 0x30]
mov dword [ebp + 8], eax
cmp eax, edi
jne 0xc2a9c2f
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov dword [esi + 8], eax
cmp dword [esi + 8], edi
jne 0xc2a9c3a
mov eax, dword [esi + 4]
mov dword [esi + 8], eax
lea edi, [esi + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [esi + 0xec]
lea eax, [esi + 0xac]
push eax
push 0
push esi
push 0xc2ae1c0
push 0xfa0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x6c], eax
test eax, eax
jne 0xc2a9c76
mov dword [ebp + 8], 0x8007000e
jmp 0xc2a9cd2
push 0x10
lea eax, [esi + 0x50]
push eax
push 0x10
call fcn.0c2aecac
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0xc2a9d40
mov dword [esi + 0x44], 3
push dword [esi + 0xf0]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0xc2a9cb5
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esi + 0xec]
test eax, eax
jne 0xc2a9cad
push dword [esi + 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x2c]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call fcn.0c2aeb5c
dec dword [0xc2b27cc]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jne 0xc2a9d0d
push 0xc2b2d00
call edi
call fcn.0c2aea14
call fcn.0c2ae718
call fcn.0c2ae512
call fcn.0c2ae25c
call fcn.0c2ae35a
push dword [esi + 0xf0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi + 0x10]
push eax
call edi
lea eax, [esi + 0x2c]
push eax
call edi
lea eax, [esi + 0xfc]
push eax
call edi
lea eax, [esi + 0x12c]
push eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0xc2a9d52
push edi
mov dword [esi + 0x44], 2
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [ebp + 8], 0
cmp dword [ebp + 8], 0
pop edi
jne 0xc2a9ab5
mov dword [ebx + 0x118], esi
jmp 0xc2a9abc