Function at 0x40c560
Capabilities:
Terminate thread

Disassembly:
push 0xffffffffffffffff
push 0x493c9d
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bd750]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x18], esi
mov dword [esi], vtable.CDnPatchDownloadThread.0
mov dword [esi + 4], vtable.CDnPatchDownloadThread.1.0
mov dword [esp + 0x24], 9
lea eax, [esi + 0x4c]
mov dword [esi + 0x10], 0
call fcn.00409270
lea eax, [esi + 0x5c]
call fcn.00412530
lea ebx, [esi + 0x6c]
mov eax, ebx
call fcn.00412530
lea ebp, [esi + 0x7c]
mov eax, ebp
call fcn.00412530
lea edi, [esi + 0x8c]
call fcn.00412610
mov eax, dword [esi + 8]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 8]
cmp eax, 0xffffffff
je 0x40c602
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 4]
xor ecx, ecx
cmp eax, ecx
mov dword [0x4c5c18], ecx
je 0x40c61c
push eax
call fcn.0044e528
add esp, 4
xor ecx, ecx
mov dword [edi + 4], ecx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ecx
mov eax, dword [ebp + 4]
cmp eax, ecx
je 0x40c647
mov edx, dword [esp + 0x18]
mov edi, dword [ebp + 8]
push edx
call fcn.00413830
mov eax, dword [ebp + 4]
push eax
call fcn.0044e528
add esp, 8
xor ecx, ecx
mov dword [ebp + 4], ecx
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], ecx
mov eax, dword [ebx + 4]
cmp eax, ecx
je 0x40c672
mov ecx, dword [esp + 0x18]
mov edi, dword [ebx + 8]
push ecx
call fcn.00413830
mov eax, dword [ebx + 4]
push eax
call fcn.0044e528
add esp, 8
xor ecx, ecx
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], ecx
mov eax, dword [esi + 0x60]
cmp eax, ecx
je 0x40c69d
mov edx, dword [esp + 0x18]
mov edi, dword [esi + 0x64]
push edx
call fcn.00413830
mov eax, dword [esi + 0x60]
push eax
call fcn.0044e528
add esp, 8
xor ecx, ecx
mov dword [esi + 0x60], ecx
mov dword [esi + 0x64], ecx
mov dword [esi + 0x68], ecx
mov eax, dword [esi + 0x50]
cmp eax, ecx
je 0x40c6b8
push eax
call fcn.0044e528
add esp, 4
xor ecx, ecx
mov dword [esi + 0x50], ecx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x58], ecx
mov byte [esp + 0x24], 3
mov eax, dword [esi + 0x34]
sub eax, 0x10
lea edx, [eax + 0xc]
or edi, 0xffffffff
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x40c6e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
mov byte [esp + 0x24], 2
mov eax, dword [esi + 0x30]
sub eax, 0x10
lea edx, [eax + 0xc]
or edi, 0xffffffff
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x40c70d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
mov byte [esp + 0x24], 1
mov eax, dword [esi + 0x2c]
sub eax, 0x10
lea edx, [eax + 0xc]
or edi, 0xffffffff
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x40c733
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
mov byte [esp + 0x24], 0
mov eax, dword [esi + 0x28]
sub eax, 0x10
lea edx, [eax + 0xc]
or edi, 0xffffffff
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x40c759
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
mov dword [esi + 4], vtable.CThread.0
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret