Function at 0x4524b0
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], 0x4eba10
test eax, eax
je 0x4526a3
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 0x45251b
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 0x4525a1
mov esi, dword [ebx + 8]
cmp dword [esi + 4], 0
je 0x45258b
mov ecx, dword [esi]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
test byte [ebp - 4], 1
je 0x45254d
and dword [ebp - 4], 0xfffffffe
lea ecx, [ebp - 0xb4]
call fcn.00450920
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [ebp - 4], 2
je 0x45256b
and dword [ebp - 4], 0xfffffffd
lea ecx, [ebp - 0xb4]
call fcn.00450920
mov eax, dword [esi]
mov ecx, dword [esi + 4]
push eax
call fcn.004536c0
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.00406d09
mov ebx, dword [ebx]
add esp, 4
cmp ebx, dword [edi + 0x2c]
jne 0x452524
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 0x4525b7
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 0x452692
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 0x45262d
mov eax, dword [ebx + 4]
test eax, eax
je 0x452622
cmp eax, 0xffffffff
je 0x452622
call fcn.00416220
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x45261b
call fcn.00430d70
test byte [ebp - 4], 8
je 0x45261b
and dword [ebp - 4], 0xfffffff7
lea ecx, [ebp - 0xb4]
call fcn.00450920
mov dword [ebx + 4], 0
push ebx
call fcn.00406d09
add esp, 4
jmp 0x452642
test byte [ebp - 4], 4
je 0x452642
and dword [ebp - 4], 0xfffffffb
lea ecx, [ebp - 0x164]
call fcn.00450920
cmp byte [esi + 0x15], 0
jne 0x452689
mov ecx, dword [esi + 8]
cmp byte [ecx + 0x15], 0
jne 0x45266e
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
jne 0x45266a
lea esp, [esp]
mov ecx, eax
mov eax, dword [ecx]
cmp byte [eax + 0x15], 0
je 0x452660
mov esi, ecx
jmp 0x452689
mov eax, dword [esi + 4]
cmp byte [eax + 0x15], 0
jne 0x452687
cmp esi, dword [eax + 8]
jne 0x452687
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x15], 0
je 0x452677
mov esi, eax
cmp esi, dword [edi + 0x3c]
jne 0x4525d0
cmp dword [edi + 4], 0
pop ebx
je 0x4526a3
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.004522d0
mov edx, dword [edi + 0x4c]
push edx
call fcn.00406d09
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.00452230
mov ecx, dword [edi + 0x3c]
push ecx
call fcn.00406d09
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 0x452712
lea ebx, [ebx]
mov esi, dword [ecx]
push ecx
call fcn.00406d09
add esp, 4
mov ecx, esi
cmp esi, dword [edi + 0x2c]
jne 0x452700
mov edx, dword [edi + 0x2c]
push edx
call fcn.00406d09
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret