Function at 0x1003d8a0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10091078
push 0x10055d18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffac
push ebx
push esi
push edi
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x19], 0
movzx eax, byte [0x100e0b68]
test eax, eax
je 0x1003dc5a
push 0x100e0b80
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
mov ecx, dword [0x100e0b74]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x24], 0
jmp 0x1003d911
mov edx, dword [ebp - 0x24]
add edx, 1
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x38]
jge 0x1003d960
mov ecx, dword [ebp - 0x24]
mov edx, dword [0x100e0b70]
lea eax, [edx + ecx*4]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call fcn.100560b1
add esp, 8
test eax, eax
jne 0x1003d95e
mov edx, dword [ebp - 0x24]
mov eax, dword [0x100e0b70]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x24]
push edx
mov ecx, 0x100e0b70
call fcn.1003f7e0
jmp 0x1003d960
jmp 0x1003d908
mov dword [ebp - 4], 0xffffffff
call fcn.1003d96e
jmp 0x1003d97a
cmp dword [ebp - 0x20], 0
je 0x1003dc5a
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x3c], 1
push 0
push 1
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
push edx
call fcn.1003e710
add esp, 8
push 0xc
push 0
lea eax, [ebp - 0x64]
push eax
call fcn.10055aa0
add esp, 0xc
push 0x10000001
call fcn.10043c50
test eax, eax
je 0x1003da09
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
lea ecx, [ebp - 0x40]
push ecx
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x44]
push ecx
call dword [0x100e0b54]
push eax
push 0x1007bbe4
call fcn.1003d0a0
add esp, 8
mov edx, dword [ebp - 0x54]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x3e8
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1003da3b
push 0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3e8
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x1003da70
push 0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x48], 0
je 0x1003dc5a
mov dword [ebp - 0x24], 0
jmp 0x1003da9c
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x48]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x48]
jge 0x1003dbd7
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x48]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x24]
cmp dword [edx + eax*4], 0
je 0x1003dbd2
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x48]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x24]
mov edx, dword [eax + ecx*4]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x34]
mov dword [eax + 0x18], ecx
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x14], 1
mov dword [ebp - 0x30], 0
push 2
push 0
push 0
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1003db4b
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1003db69
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0x3e8
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [ebp - 0x34], 0
jne 0x1003dbd2
push 0x100e0b80
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x34], 0
jne 0x1003dbc7
push 0
mov edx, dword [ebp - 0x28]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0xc], 0
je 0x1003dbbd
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x100e0b80
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1003da93
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x48]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0
je 0x1003dc12
mov ecx, dword [ebp - 0x2c]
call fcn.1004ed50
mov eax, 1
and eax, 1
je 0x1003dc0a
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.10051f40
add esp, 4
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x50], edx
jmp 0x1003dc19
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
add ecx, 0x20
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 0x19], 1
mov al, byte [ebp - 0x19]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret