Function at 0x474d90
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df1a0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5246a8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
lea ebx, [edi + 0x120]
push ebx
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x13c]
mov esi, dword [eax]
mov dword [ebp - 4], 0
cmp esi, eax
je 0x474e7b
mov edi, dword [esi + 0x10]
push 0x32
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x474e16
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
push esi
lea eax, [ebp - 0x1c]
add ecx, 0x138
push eax
call fcn.00451c00
mov esi, dword [eax]
jmp 0x474e6a
mov ecx, dword [esi + 0xc]
push 0
push 0
push 0x12
push ecx
call dword [sym.imp.USER32.dll_PostThreadMessageW]
cmp byte [esi + 0x15], 0
mov byte [ebp - 0xd], 1
jne 0x474e6a
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x474e4f
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x474e6a
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x474e43
jmp 0x474e6a
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x474e68
cmp esi, dword [eax + 8]
jne 0x474e68
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x474e58
mov esi, eax
mov edx, dword [ebp - 0x14]
cmp esi, dword [edx + 0x13c]
jne 0x474de8
mov edi, edx
mov eax, dword [ebp - 0x18]
push eax
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0xd], 0
je 0x474f90
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x13c]
mov esi, dword [eax]
mov dword [ebp - 4], 1
cmp esi, eax
je 0x474f34
mov edi, edi
mov edi, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push edi
call ebx
test eax, eax
je 0x474ee0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0xffffffffffffffff
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esi + 0x15], 0
jne 0x474f27
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x474f0c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x474f27
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x474f00
jmp 0x474f27
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x474f25
cmp esi, dword [eax + 8]
jne 0x474f25
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x474f15
mov esi, eax
mov ecx, dword [ebp - 0x14]
cmp esi, dword [ecx + 0x13c]
jne 0x474ec0
mov edi, ecx
mov edx, dword [edi + 0x13c]
mov ebx, dword [edx + 4]
cmp byte [ebx + 0x15], 0
lea esi, [edi + 0x138]
mov edi, ebx
jne 0x474f6e
jmp 0x474f50
mov eax, dword [edi + 8]
push eax
mov ecx, esi
call fcn.0048bb90
mov edi, dword [edi]
push ebx
call fcn.00406d09
add esp, 4
cmp byte [edi + 0x15], 0
mov ebx, edi
je 0x474f50
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x18]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], eax
mov eax, dword [esi + 4]
mov dword [eax + 8], eax
push ecx
mov dword [esi + 8], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret