Function at 0x474f20
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df1c0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5256a8]
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 0x47500b
mov edi, dword [esi + 0x10]
push 0x32
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x474fa6
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.00451d40
mov esi, dword [eax]
jmp 0x474ffa
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 0x474ffa
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x474fdf
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x474ffa
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x474fd3
jmp 0x474ffa
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x474ff8
cmp esi, dword [eax + 8]
jne 0x474ff8
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x474fe8
mov esi, eax
mov edx, dword [ebp - 0x14]
cmp esi, dword [edx + 0x13c]
jne 0x474f78
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 0x475120
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 0x4750c4
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 0x475070
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 0x4750b7
mov eax, dword [esi + 8]
cmp byte [eax + 0x15], 0
jne 0x47509c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
jne 0x4750b7
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x15], 0
je 0x475090
jmp 0x4750b7
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x4750b5
cmp esi, dword [eax + 8]
jne 0x4750b5
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x4750a5
mov esi, eax
mov ecx, dword [ebp - 0x14]
cmp esi, dword [ecx + 0x13c]
jne 0x475050
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 0x4750fe
jmp 0x4750e0
mov eax, dword [edi + 8]
push eax
mov ecx, esi
call fcn.0046e490
mov edi, dword [edi]
push ebx
call fcn.00406cf9
add esp, 4
cmp byte [edi + 0x15], 0
mov ebx, edi
je 0x4750e0
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