Function at 0x499b20
Capabilities:
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x528cf3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
mov ebp, ecx
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
push edi
lea eax, [ebp + 0x18]
mov dword [esp + 0x10], eax
add eax, 8
push eax
call ebx
mov eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x20], edi
jle 0x499b98
mov eax, dword [ebp + 8]
mov esi, dword [eax + edi*4]
lea ecx, [esi + 8]
push ecx
call ebx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x499c09
mov ecx, dword [esi + 0x20]
test ecx, ecx
jne 0x499b84
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x499bee
mov edx, dword [esi]
mov ecx, esi
mov byte [esp + 0x20], 0
call dword [edx + 0x14]
mov eax, dword [ebp + 0xc]
inc edi
cmp edi, eax
jl 0x499b5e
push 0x30
call fcn.0050c4a3
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
xor edi, edi
mov byte [esp + 0x20], 2
cmp esi, edi
je 0x499c44
push edi
mov ecx, esi
call fcn.004ea4f7
lea ecx, [esi + 8]
mov dword [esi], vtable.CCriticalSection.0
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
push edi
push edi
push edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push eax
mov dword [esi + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x499c46
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [esi]
mov ecx, esi
mov byte [esp + 0x20], 0
call dword [edx + 0x14]
jmp 0x499c1c
mov dword [esi + 0x20], 0
mov eax, dword [esi]
mov ecx, esi
mov byte [esp + 0x20], 0
call dword [eax + 0x14]
lea ecx, [esi + 8]
push ecx
call ebx
mov edx, dword [esi]
mov edi, dword [esi + 0x24]
mov ecx, esi
call dword [edx + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
mov eax, dword [ecx]
call dword [eax + 0x14]
mov eax, edi
jmp 0x499d11
xor esi, esi
push edi
push 4
push edi
push 0xfffffffffffffffe
push esi
push 0x499d30
mov byte [esp + 0x38], 0
call fcn.0050d05b
mov ebx, eax
test ebx, ebx
jne 0x499c7a
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
mov edx, dword [ecx]
call dword [edx + 0x14]
xor eax, eax
jmp 0x499d11
lea edi, [esi + 8]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x499cb7
mov ecx, dword [esi + 0x20]
test ecx, ecx
jne 0x499ca9
mov ecx, dword [esi + 0x28]
test ecx, ecx
jne 0x499ca9
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x499cbe
mov eax, dword [esi]
mov ecx, esi
mov byte [esp + 0x20], 0
call dword [eax + 0x14]
jmp 0x499cca
mov dword [esi + 0x20], 0
mov edx, dword [esi]
mov ecx, esi
mov byte [esp + 0x20], 0
call dword [edx + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esi + 0x24], ebx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
lea edi, [ebp + 4]
push 0xffffffffffffffff
mov ebp, dword [edi + 8]
lea ecx, [ebp + 1]
push ecx
mov ecx, edi
call fcn.004d08d0
mov edx, dword [edi + 4]
mov dword [edx + ebp*4], esi
mov eax, dword [ebx + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], 0xffffffff
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, ebx
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 4