Function at 0x10005a10
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100597f0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x1006c3ac]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
xor eax, eax
lea ebx, [edi + 4]
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], eax
cmp ebx, eax
je 0x10005a5d
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x14], 1
mov byte [ebp - 4], 1
mov eax, dword [edi + 0x34]
mov ecx, dword [eax + 4]
lea esi, [edi + 0x1c]
push ecx
mov ecx, esi
call fcn.10008960
mov eax, dword [esi + 0x18]
mov dword [eax + 4], eax
mov eax, dword [esi + 0x18]
mov dword [esi + 0x1c], 0
mov dword [eax], eax
mov esi, dword [esi + 0x18]
mov dword [esi + 8], esi
test ebx, ebx
je 0x10005a9b
cmp dword [ebp - 0x14], 0
je 0x10005a9b
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [edi + 0x3c]
xor ebx, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ebx
test esi, esi
je 0x10005ab9
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, 1
mov dword [ebp - 0x14], ebx
lea eax, [edi + 0x54]
mov byte [ebp - 4], 2
call fcn.100082b0
test esi, esi
je 0x10005ad4
test ebx, ebx
je 0x10005ad4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [edi + 0x6c]
xor ebx, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ebx
test esi, esi
je 0x10005af2
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, 1
mov dword [ebp - 0x14], ebx
lea eax, [edi + 0x84]
mov byte [ebp - 4], 3
call fcn.100083b0
mov byte [ebp - 4], 0
test esi, esi
je 0x10005b14
test ebx, ebx
je 0x10005b14
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 0xa4]
mov byte [edi + 0x9c], 0
test eax, eax
je 0x10005b2c
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [edi + 0xa8], 0
je 0x10005c99
xor ebx, ebx
jmp 0x10005b40
cmp ebx, dword [edi + 0xb4]
jge 0x10005be7
xor edx, edx
push 0xb
mov eax, str.ReleasePool
lea esi, [ebp - 0x34]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], dx
call fcn.1000b540
mov esi, ebx
imul esi, esi, 0x2bc
mov byte [ebp - 4], 4
mov eax, dword [edi + 0xb0]
lea eax, [esi + eax + 4]
push 0xffffffffffffffff
mov dword [eax], 1
lea ecx, [eax + 4]
push 0
lea eax, [ebp - 0x34]
call fcn.1000b980
mov byte [ebp - 4], 0
cmp dword [ebp - 0x1c], 8
jb 0x10005bb0
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.1003f2c6
add esp, 4
mov eax, dword [edi + 0xb0]
xor edx, edx
lea ecx, [esi + eax]
mov word [ebp - 0x30], dx
mov edx, dword [ecx]
mov eax, dword [edx + 8]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
call eax
mov ecx, dword [edi + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
inc ebx
jmp 0x10005b40
mov eax, dword [edi + 0xb4]
mov ecx, dword [edi + 0xa8]
mov edx, eax
imul edx, edx, 0x7530
push edx
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 0x102
jne 0x10005c30
xor esi, esi
nop
cmp esi, dword [edi + 0xb4]
jge 0x10005c30
mov edx, dword [edi + 0xa8]
mov eax, dword [edx + esi*4]
push 0xdead
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
inc esi
jmp 0x10005c10
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
cmp esi, dword [edi + 0xb4]
jge 0x10005c4f
mov ecx, dword [edi + 0xa8]
mov edx, dword [ecx + esi*4]
push edx
call ebx
inc esi
jmp 0x10005c38
mov eax, dword [edi + 0xa8]
push eax
call fcn.1004009b
mov ecx, dword [edi + 0xb0]
xor esi, esi
add esp, 4
mov dword [edi + 0xa8], esi
cmp ecx, esi
je 0x10005c91
cmp dword [ecx - 4], esi
lea eax, [ecx - 4]
je 0x10005c88
mov eax, dword [ecx]
mov edx, dword [eax]
push 3
call edx
mov dword [edi + 0xb0], esi
jmp 0x10005c9f
push eax
call fcn.1004009b
add esp, 4
mov dword [edi + 0xb0], esi
jmp 0x10005c9f
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0xac]
test eax, eax
je 0x10005cde
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10005ccb
mov eax, dword [edi + 0xac]
push 0xdead
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [edi + 0xac]
push ecx
call ebx
mov dword [edi + 0xac], 0
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x10005cf5
push eax
call ebx
mov dword [edi + 0xa0], 0
mov eax, dword [edi + 0xa4]
test eax, eax
je 0x10005d0c
push eax
call ebx
mov dword [edi + 0xa4], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret