Function at 0x473820
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d87f7
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x517074]
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 0x473878
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.00473d70
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x4738ba
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x4738b3
mov eax, dword [esi]
push 1
mov edi, dword [eax]
mov ecx, edi
call dword [0x4db310]
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.00474940
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 0x473959
mov eax, dword [eax + 0x10]
cmp dword [eax + 0x30], 0
je 0x473939
mov eax, dword [ebp - 0x20]
cmp byte [eax + 0xd], 0
jne 0x4738e0
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
jne 0x47391c
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
jne 0x4738da
nop word [eax + eax]
mov eax, ecx
mov ecx, dword [eax]
cmp byte [ecx + 0xd], 0
je 0x473910
jmp 0x4738da
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x473935
cmp eax, dword [ecx + 8]
jne 0x473935
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x473925
mov eax, ecx
jmp 0x4738da
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 0x473a4e
mov eax, dword [ebx + 0x40]
cmp eax, dword [ebx + 0x20]
jae 0x473a39
push 0x38
call fcn.0048bcb4
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
push 0x38
push 0
push esi
mov byte [ebp - 4], 3
call fcn.004a5940
add esp, 0xc
cmp dword [ebx + 0x14], 8
jb 0x47398f
mov eax, dword [ebx]
jmp 0x473991
mov eax, ebx
push ebx
push eax
mov ecx, esi
call fcn.004731f0
mov esi, eax
mov dword [ebp - 0x24], esi
test esi, esi
je 0x4739ad
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 0x4739d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x4739fa
lea edi, [esi + 8]
lea eax, [edi + 8]
push eax
push 0
push edi
push 0x4730f0
push 0
push 0
call fcn.004bb174
xor edx, edx
mov dword [edi + 4], eax
add esp, 0x18
mov ecx, 0x9b
test eax, eax
cmovne ecx, edx
test ecx, ecx
jne 0x473a19
push dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push eax
push ecx
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebx + 0x3c]
call fcn.00474750
mov esi, dword [ebp - 0x24]
test esi, esi
je 0x473a39
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x473a39
mov eax, dword [esi]
push 1
mov edi, dword [eax]
mov ecx, edi
call dword [0x4db310]
mov ecx, esi
call edi
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x473a4e
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.0048bc9e
mov esp, ebp
pop ebp
ret 4