Function at 0x438980
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x44f788]
push esi
mov esi, eax
test eax, eax
je 0x438bb7
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [eax + eax]
cmp dword [esi + 0x14], 1
mov ecx, dword [esi + 0x21c]
mov dword [ebp - 4], ecx
jne 0x438b5d
xor edx, edx
test eax, eax
je 0x4389fc
mov ecx, dword [0x44f790]
nop
cmp eax, esi
je 0x4389cf
mov edx, eax
mov eax, dword [ecx + eax]
test eax, eax
jne 0x4389c0
jmp 0x4389fc
mov eax, dword [ecx + esi]
test edx, edx
je 0x4389e1
mov dword [ecx + edx], eax
mov ecx, dword [0x44f790]
jmp 0x4389e6
mov dword [0x44f788], eax
mov eax, dword [0x44f78c]
cmp eax, esi
cmove eax, edx
mov dword [0x44f78c], eax
mov dword [ecx + esi], 0
mov eax, dword [0x44f894]
xor ecx, ecx
test eax, eax
je 0x438a40
mov edx, dword [esi + 0xc]
nop word [eax + eax]
cmp dword [ecx*4 + 0x44f794], edx
je 0x438a20
inc ecx
cmp ecx, eax
jb 0x438a10
jmp 0x438a40
inc ecx
sub eax, ecx
shl eax, 2
push eax
lea eax, [ecx*4 + 0x44f794]
push eax
lea eax, [ecx*4 + 0x44f790]
push eax
call dword [sym.imp.VCRUNTIME140.dll_memmove]
add esp, 0xc
mov dword [esi + 0x10], 1
dec dword [0x44f894]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x438a8c
call edi
test eax, eax
je 0x438a68
call edi
test eax, eax
je 0x438a8c
jmp 0x438a6d
mov eax, 0xffffe5d4
push eax
push str.SetEvent__
push 0x1f0
push str.PollRemoveWorker
push str._s:_d____s_failed:__d_n
push 0
call fcn.0041dc40
add esp, 0x18
push 0x1388
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x438ad2
call edi
test eax, eax
je 0x438aac
call edi
test eax, eax
je 0x438ad9
jmp 0x438ab1
mov eax, 0xffffe5d4
push eax
push str.WaitForSingleObject__
push 0x1f4
push str.PollRemoveWorker
push str._s:_d____s_failed:__d_n
push 0
call fcn.0041dc40
add esp, 0x18
jmp 0x438ad9
cmp eax, 0x102
jne 0x438b19
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
jne 0x438b19
call edi
test eax, eax
je 0x438af5
call edi
test eax, eax
je 0x438b19
jmp 0x438afa
mov eax, 0xffffe5d4
push eax
push str.TerminateThread__
push 0x1fa
push str.PollRemoveWorker
push str._s:_d____s_failed:__d_n
push 0
call fcn.0041dc40
add esp, 0x18
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 8]
mov dword [esi], 0
test eax, eax
je 0x438b3c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x438b51
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], 0
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x438ba3
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x438ba3
call edi
test eax, eax
je 0x438b78
call edi
test eax, eax
je 0x438ba3
jmp 0x438b7d
mov eax, 0xffffe5d4
push eax
push str.SetEvent__
push 0x19e
push str.PollStartWorkers
push str._s:_d____s_failed:__d_n
push 0
call fcn.0041dc40
add esp, 0x18
mov ecx, esi
call fcn.00438cc0
mov eax, dword [ebp - 4]
mov esi, eax
test eax, eax
je 0x438bb6
mov eax, dword [0x44f788]
jmp 0x4389a0
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret