Function at 0x47a370
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4dfe57
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 0x47a3c8
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.0047a8c0
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x47a40a
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x47a403
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.0047b490
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 0x47a4a9
mov eax, dword [eax + 0x10]
cmp dword [eax + 0x30], 0
je 0x47a489
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0xd], 0
jne 0x47a430
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
jne 0x47a46c
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
jne 0x47a42a
nop word [eax + eax]
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
je 0x47a460
jmp 0x47a42a
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x47a485
cmp eax, dword [ecx + 8]
jne 0x47a485
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x47a475
mov eax, ecx
jmp 0x47a42a
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 0x47a59e
mov eax, dword [ebx + 0x40]
cmp eax, dword [ebx + 0x20]
jae 0x47a589
push 0x38
call fcn.00493862
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
push 0x38
push 0
push esi
mov byte [ebp - 4], 3
call fcn.004ad200
add esp, 0xc
cmp dword [ebx + 0x14], 8
jb 0x47a4df
mov eax, dword [ebx]
jmp 0x47a4e1
mov eax, ebx
push ebx
push eax
mov ecx, esi
call fcn.00479d40
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x47a4fd
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 0x47a520
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x47a54a
lea edi, [esi + 8]
lea eax, [edi + 8]
push eax
push 0
push edi
push 0x479c40
push 0
push 0
call fcn.004c1ebe
xor edx, edx
mov dword [edi + 4], eax
add esp, 0x18
mov ecx, 0x9b
test eax, eax
cmovne ecx, edx
test ecx, ecx
jne 0x47a569
push dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push eax
push ecx
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebx + 0x3c]
call fcn.0047b2a0
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x47a589
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x47a589
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 0x47a59e
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.0049384c
mov esp, ebp
pop ebp
ret 4