Function at 0x10019770
Capabilities:
Terminate thread

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006a800
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x20
push esi
push edi
mov edi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x14], edi
movlpd qword [ebp - 0x28], xmm0
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x1001989a
mov edx, dword [eax]
mov esi, dword [eax + 4]
add edx, 0x18
mov ecx, dword [eax + 0x14]
mov eax, edx
adc esi, 0
movlpd qword [ebp - 0x20], xmm0
or eax, esi
je 0x1001989a
mov eax, dword [ecx + 0x4c]
lea edi, [ebp - 0x20]
push edi
push 8
lea edi, [ebp - 0x28]
mov ecx, dword [eax + 8]
push edi
push esi
push edx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [ebp - 0x28]
or eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
je 0x1001989a
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, dword [edi]
lea edx, [ebp - 0x1c]
push 3
push 0
push 0
push edx
push eax
push dword [ebp - 0x28]
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10019830
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov edx, dword [edi + 0x3c]
xorps xmm0, xmm0
movlpd qword [ebp - 0x30], xmm0
test edx, edx
je 0x10019865
mov eax, dword [edx + 0x14]
lea edi, [ebp - 0x30]
mov esi, dword [edx]
mov edx, dword [edx + 4]
add esi, 0x18
push 0
mov eax, dword [eax + 0x4c]
adc edx, 0
push 8
push edi
push edx
mov ecx, dword [eax + 8]
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
mov edi, dword [ebp - 0x14]
mov edx, dword [edi + 0x44]
xorps xmm0, xmm0
movlpd qword [ebp - 0x30], xmm0
test edx, edx
je 0x1001989a
mov eax, dword [edx + 0x14]
lea edi, [ebp - 0x30]
mov esi, dword [edx]
mov edx, dword [edx + 4]
add esi, 0x18
push 0
mov eax, dword [eax + 0x4c]
adc edx, 0
push 8
push edi
push edx
mov ecx, dword [eax + 8]
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
mov edi, dword [ebp - 0x14]
mov eax, dword [edi + 0x20]
test eax, eax
je 0x100198af
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x20], 0
mov esi, dword [edi + 0x10]
test esi, esi
je 0x1001998e
mov eax, dword [esi + 8]
mov dword [ebp - 0x1c], eax
test eax, eax
jg 0x100198de
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp dword [ebp - 0x1c], eax
je 0x100198de
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
cmp dword [ebp - 0x1c], eax
jne 0x1001998e
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0xffffffff
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 0x1c], 0x103
jne 0x1001998e
mov eax, dword [edi + 0x10]
push 0
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [edi + 0x10]
push 0xffffffffffffffff
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, dword [edi + 0x10]
mov dword [ebp - 4], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x1001993d
jle 0x10019936
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
mov dword [esi + 8], 0
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 4], 0
mov esi, dword [edi + 0x14]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
test esi, esi
je 0x10019981
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x10019981
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x10019981
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [edi + 0x24]
test ecx, ecx
je 0x1001998e
push ecx
call fcn.100194b0
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret