Function at 0x4059c0
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b4cb0
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x6218c0]
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 0x405aea
cmp byte [esi + 0x15], 0
jne 0x405aad
cmp dword [esi + 0x1c], 0
je 0x405aad
sub esp, 0xc
mov dword [ebp - 0x48], 0x405c30
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.00406420
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.00403640
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x405aad
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 0x405ae4
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x405ad1
mov eax, dword [esi + 8]
test eax, eax
je 0x405ae4
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 0x405b1e
mov eax, dword [esi + 0x30]
inc ecx
cmp ecx, 0x1000
jb 0x405b14
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405bbb
mov eax, edx
push ecx
push eax
call fcn.005702d9
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 0x405b3a
push eax
call ebx
mov edi, dword [esi + 0x24]
test edi, edi
je 0x405b62
or eax, 0xffffffff
lock xadd dword [edi + 4], eax
jne 0x405b62
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [edi + 8], eax
jne 0x405b62
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 0x405b9f
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x405b8c
mov eax, dword [esi + 8]
test eax, eax
je 0x405b9f
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.0057029b
mov esp, ebp
pop ebp
ret
call fcn.00584b21
int3