Function at 0x4525f0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], 0
mov eax, dword [edi + 4]
mov dword [edi], 0x4eca10
test eax, eax
je 0x4527e3
push ebx
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov eax, dword [edi + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [edi + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x1388
push ecx
call ebx
cmp eax, 0x102
jne 0x45265b
mov edx, dword [edi + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [edi + 0xc]
push 0xffffffffffffffff
push eax
call ebx
mov eax, dword [edi + 0x2c]
mov ebx, dword [eax]
cmp ebx, eax
je 0x4526e1
mov esi, dword [ebx + 8]
cmp dword [esi + 4], 0
je 0x4526cb
mov ecx, dword [esi]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
test byte [ebp - 4], 1
je 0x45268d
and dword [ebp - 4], 0xfffffffe
lea ecx, [ebp - 0xb4]
call fcn.00450a20
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [ebp - 4], 2
je 0x4526ab
and dword [ebp - 4], 0xfffffffd
lea ecx, [ebp - 0xb4]
call fcn.00450a20
mov eax, dword [esi]
mov ecx, dword [esi + 4]
push eax
call fcn.00453900
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x14]
mov eax, dword [edx + 4]
add ecx, 0x14
call eax
mov dword [esi + 4], 0
push esi
call fcn.00406cf9
mov ebx, dword [ebx]
add esp, 4
cmp ebx, dword [edi + 0x2c]
jne 0x452664
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0xc]
push ecx
call esi
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x4526f7
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 1
call eax
mov ecx, dword [edi + 8]
push ecx
call esi
mov eax, dword [edi + 0x3c]
mov esi, dword [eax]
cmp esi, eax
je 0x4527d2
lea ebx, [ebx]
mov ebx, dword [esi + 0x10]
mov edx, dword [ebx]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_UnregisterWaitEx]
test eax, eax
je 0x45276d
mov eax, dword [ebx + 4]
test eax, eax
je 0x452762
cmp eax, 0xffffffff
je 0x452762
call fcn.00416220
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x45275b
call fcn.00430d70
test byte [ebp - 4], 8
je 0x45275b
and dword [ebp - 4], 0xfffffff7
lea ecx, [ebp - 0xb4]
call fcn.00450a20
mov dword [ebx + 4], 0
push ebx
call fcn.00406cf9
add esp, 4
jmp 0x452782
test byte [ebp - 4], 4
je 0x452782
and dword [ebp - 4], 0xfffffffb
lea ecx, [ebp - 0x164]
call fcn.00450a20
cmp byte [esi + 0x15], 0
jne 0x4527c9
mov ecx, dword [esi + 8]
cmp byte [ecx + 0x15], 0
jne 0x4527ae
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
jne 0x4527aa
lea esp, [esp]
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
je 0x4527a0
mov esi, ecx
jmp 0x4527c9
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x4527c7
cmp esi, dword [eax + 8]
jne 0x4527c7
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x4527b7
mov esi, eax
cmp esi, dword [edi + 0x3c]
jne 0x452710
cmp dword [edi + 4], 0
pop ebx
je 0x4527e3
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [edi + 0x4c]
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [ebp - 4]
push ecx
lea ecx, [edi + 0x48]
call fcn.00452410
mov edx, dword [edi + 0x4c]
push edx
call fcn.00406cf9
mov eax, dword [edi + 0x3c]
mov ecx, dword [eax]
add esp, 4
push eax
push ecx
lea eax, [ebp - 4]
push eax
lea ecx, [edi + 0x38]
call fcn.00452370
mov ecx, dword [edi + 0x3c]
push ecx
call fcn.00406cf9
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax]
mov dword [eax], eax
mov eax, dword [edi + 0x2c]
mov dword [eax + 4], eax
add esp, 4
mov dword [edi + 0x30], 0
cmp ecx, dword [edi + 0x2c]
je 0x452852
lea ebx, [ebx]
mov esi, dword [ecx]
push ecx
call fcn.00406cf9
add esp, 4
mov ecx, esi
cmp esi, dword [edi + 0x2c]
jne 0x452840
mov edx, dword [edi + 0x2c]
push edx
call fcn.00406cf9
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret