Function at 0x404780
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7ff0
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x516180]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], vtable.nbase::FrameworkThread.1.0
mov eax, dword [eax + 4]
mov dword [eax + esi + 0x10], vtable.nbase::FrameworkThread.0
cmp byte [esi + 0x14], 0
je 0x4048aa
cmp byte [esi + 0x15], 0
jne 0x40486d
cmp dword [esi + 0x1c], 0
je 0x40486d
sub esp, 0xc
mov dword [ebp - 0x48], 0x4049b0
mov eax, esp
mov dword [ebp - 0x44], 0
movq xmm0, qword [ebp - 0x48]
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x60]
mov byte [esi + 0x15], 1
mov dword [ebp - 0x3c], esi
movq qword [eax], xmm0
mov dword [eax + 8], 0
call fcn.00404f30
mov eax, dword [ebp - 0x60]
add esp, 0xc
movq xmm0, qword [ebp - 0x58]
mov ecx, dword [esi + 0x1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], vtable.._AV___Func_impl_no_alloc_V__WeakCallback_V___Binder_U_Unforced_std__AAP8FrameworkThread_nbase__AEXXZAAPAV34__std___nbase__X__V_std__.0
movq qword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], eax
call fcn.00406c10
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40486d
mov edx, dword [ecx]
lea eax, [ebp - 0x38]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov eax, dword [esi + 8]
test eax, eax
je 0x4048a4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x404891
mov eax, dword [esi + 8]
test eax, eax
je 0x4048a4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call ebx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov word [esi + 0x14], 0
mov ecx, dword [esi + 0x44]
cmp ecx, 0x10
jb 0x4048de
mov eax, dword [esi + 0x30]
inc ecx
cmp ecx, 0x1000
jb 0x4048d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40497b
mov eax, edx
push ecx
push eax
call fcn.004a246f
add esp, 8
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0xf
mov byte [esi + 0x30], 0
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x4048fa
push eax
call ebx
mov edi, dword [esi + 0x24]
test edi, edi
je 0x404922
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x404922
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x404922
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov eax, dword [esi + 8]
mov dword [esi], vtable.nbase::Thread.0
test eax, eax
je 0x40495f
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40494c
mov eax, dword [esi + 8]
test eax, eax
je 0x40495f
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 8]
call ebx
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a248b
mov esp, ebp
pop ebp
ret
call fcn.004b0b6f
int3