Function at 0x495ab0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x583188
push fcn.004e1840
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x589780]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0
xor al, al
mov byte [ebp - 0x29], al
cmp byte [0x58e158], al
je 0x495db5
push 0x58e140
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov edi, dword [0x58e11c]
xor esi, esi
mov dword [ebp - 0x40], esi
cmp esi, edi
jge 0x495b5a
push dword [ebp - 0x30]
mov eax, dword [0x58e118]
mov eax, dword [eax + esi*4]
push dword [eax]
call fcn.00409bce
add esp, 8
test eax, eax
jne 0x495cca
mov eax, dword [0x58e118]
mov ebx, dword [eax + esi*4]
mov dword [ebp - 0x34], ebx
push esi
mov ecx, 0x58e118
call fcn.00404f2f
mov dword [ebp - 4], 0xfffffffe
call fcn.00495cd3
test ebx, ebx
je 0x495db2
mov dword [ebx + 0x3c], 1
push 0
push 1
push dword [ebx + 0x38]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea eax, [ebp - 0x54]
push eax
push dword [ebx]
call fcn.00496a70
add esp, 8
xorps xmm0, xmm0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x20], 0
push 0x10000001
call fcn.004018ed
test eax, eax
je 0x495bd9
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
lea eax, [ebp - 0x44]
push eax
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x48]
push eax
call dword [0x58e12c]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x3e8
push dword [ebx + 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call edi
cmp eax, 0x102
jne 0x495c04
push 0
push dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebx + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push 0x3e8
push dword [ebx + 0x44]
call edi
cmp eax, 0x102
jne 0x495c2b
push 0
push dword [ebx + 0x44]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [ebx + 0x44]
call esi
mov esi, dword [ebx + 0x48]
test esi, esi
je 0x495db2
xor edi, edi
mov dword [ebp - 0x30], edi
cmp dword [esi + 4], edi
jle 0x495d55
nop dword [eax]
mov eax, dword [esi]
mov edi, dword [eax + edi*4]
mov dword [ebp - 0x4c], edi
test edi, edi
je 0x495d42
mov dword [ebp - 0x3c], 0
lea eax, [ebp - 0x3c]
mov dword [edi + 0x18], eax
mov dword [edi + 0x14], 1
mov dword [ebp - 0x38], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, eax
mov edi, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 0
push 0
lea ecx, [ebp - 0x38]
push ecx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov esi, dword [ebp - 0x4c]
mov ecx, dword [esi + 8]
push ecx
test eax, eax
je 0x495cdf
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x38]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
jmp 0x495cf8
inc esi
jmp 0x495b20
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3c], 0
jne 0x495d42
push 0x58e140
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x3c], 0
jne 0x495d37
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call edi
push dword [esi]
call edi
mov eax, dword [esi + 0xc]
test eax, eax
je 0x495d30
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x58e140
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x30]
inc edi
mov dword [ebp - 0x30], edi
mov esi, dword [ebx + 0x48]
cmp edi, dword [esi + 4]
jl 0x495c50
test esi, esi
je 0x495d87
mov eax, dword [esi]
test eax, eax
je 0x495d6e
push eax
call fcn.00407351
add esp, 4
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
push 0x10
push esi
call fcn.0040246e
add esp, 8
push dword [ebx + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebx + 0x38]
call esi
lea eax, [ebx + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push ebx
call esi
mov al, 1
jmp 0x495db5
mov al, byte [ebp - 0x29]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0040512d
mov esp, ebp
pop ebp
ret