Function at 0x47a6e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e01b7
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x520078]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
lea eax, [ebx + 0x24]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x47a738
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebx + 0x50]
call fcn.0047ac30
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x47a77a
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x47a773
mov eax, dword [esi]
push 1
mov edi, dword [eax]
mov ecx, edi
call dword [0x4e3310]
mov ecx, esi
call edi
mov dword [ebp - 0x28], 0
push dword [ebp - 0x1c]
mov edx, dword [ebx + 0x48]
push ecx
mov ecx, dword [ebx + 0x44]
call fcn.0047b800
mov eax, dword [ebx + 0x44]
add esp, 8
mov dword [ebx + 0x48], eax
mov ecx, dword [ebx + 0x3c]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ecx]
mov dword [ebp - 0x20], eax
nop dword [eax]
cmp eax, dword [ebp - 0x1c]
je 0x47a819
mov eax, dword [eax + 0x10]
cmp dword [eax + 0x30], 0
je 0x47a7f9
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0xd], 0
jne 0x47a7a0
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
jne 0x47a7dc
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
jne 0x47a79a
nop word [eax + eax]
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
je 0x47a7d0
jmp 0x47a79a
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x47a7f5
cmp eax, dword [ecx + 8]
jne 0x47a7f5
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x47a7e5
mov eax, ecx
jmp 0x47a79a
push dword [eax + 0x2c]
mov dword [eax + 0x30], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x47a90e
mov eax, dword [ebx + 0x40]
cmp eax, dword [ebx + 0x20]
jae 0x47a8f9
push 0x38
call fcn.00493c02
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
push 0x38
push 0
push esi
mov byte [ebp - 4], 3
call fcn.004ad5f0
add esp, 0xc
cmp dword [ebx + 0x14], 8
jb 0x47a84f
mov eax, dword [ebx]
jmp 0x47a851
mov eax, ebx
push ebx
push eax
mov ecx, esi
call fcn.0047a0b0
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x47a86d
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0
push 0
push 1
push 0
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x2c], eax
test eax, eax
jne 0x47a890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x47a8ba
lea edi, [esi + 8]
lea eax, [edi + 8]
push eax
push 0
push edi
push 0x479fb0
push 0
push 0
call fcn.004c230e
xor edx, edx
mov dword [edi + 4], eax
add esp, 0x18
mov ecx, 0x9b
test eax, eax
cmovne ecx, edx
test ecx, ecx
jne 0x47a8d9
push dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push eax
push ecx
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebx + 0x3c]
call fcn.0047b610
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x47a8f9
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x47a8f9
mov eax, dword [esi]
push 1
mov edi, dword [eax]
mov ecx, edi
call dword [0x4e3310]
mov ecx, esi
call edi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x47a90e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00493bec
mov esp, ebp
pop ebp
ret 4