Function at 0x40fb70
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50eb45
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x551aa8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi], vtable.CDnPatchDownloadThread.0
mov dword [esi + 4], vtable.CDnPatchDownloadThread.1.0
mov dword [ebp - 4], 9
mov dword [esi + 0x10], 0
mov edi, dword [esi + 0x4c]
mov ecx, dword [esi + 0x50]
cmp edi, ecx
je 0x40fbdf
mov eax, ecx
sub eax, ecx
sar eax, 2
lea ebx, [eax*4]
push ebx
push ecx
push edi
call dword [sym.imp.MSVCR100.dll_memmove]
add esp, 0xc
add ebx, edi
mov dword [esi + 0x50], ebx
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x60]
cmp eax, ecx
je 0x40fc03
mov edx, dword [ebp - 0x10]
push edx
push ecx
call fcn.00403f30
mov edi, dword [esi + 0x60]
add esp, 8
mov ebx, eax
call fcn.00403ef0
mov dword [esi + 0x60], ebx
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x70]
cmp eax, ecx
je 0x40fc27
mov edx, dword [ebp - 0x10]
push edx
push ecx
call fcn.00403f30
mov edi, dword [esi + 0x70]
add esp, 8
mov ebx, eax
call fcn.00403ef0
mov dword [esi + 0x70], ebx
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x80]
cmp eax, ecx
je 0x40fc54
mov edx, dword [ebp - 0x10]
push edx
push ecx
call fcn.00403f30
mov edi, dword [esi + 0x80]
add esp, 8
mov ebx, eax
call fcn.00403ef0
mov dword [esi + 0x80], ebx
mov ecx, dword [esi + 0x8c]
mov edx, dword [esi + 0x90]
cmp ecx, edx
je 0x40fc90
mov eax, edx
cmp edx, edx
je 0x40fc8a
lea ebx, [ebx]
mov edi, dword [eax]
mov dword [ecx], edi
mov edi, dword [eax + 4]
mov dword [ecx + 4], edi
mov edi, dword [eax + 8]
mov dword [ecx + 8], edi
add eax, 0xc
add ecx, 0xc
cmp eax, edx
jne 0x40fc70
mov dword [esi + 0x90], ecx
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 0x40fcba
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x8c]
mov ebx, dword [sym.imp.mfc100u.dll_delete]
mov dword [0x55c328], 0
test eax, eax
je 0x40fcda
push eax
call ebx
add esp, 4
xor edi, edi
mov dword [esi + 0x8c], edi
mov dword [esi + 0x90], edi
mov dword [esi + 0x94], edi
mov eax, dword [esi + 0x7c]
cmp eax, edi
je 0x40fd0b
mov edi, dword [esi + 0x80]
call fcn.00403ef0
mov edx, dword [esi + 0x7c]
push edx
call ebx
add esp, 4
xor edi, edi
mov dword [esi + 0x7c], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x84], edi
mov eax, dword [esi + 0x6c]
cmp eax, edi
je 0x40fd34
mov edi, dword [esi + 0x70]
call fcn.00403ef0
mov eax, dword [esi + 0x6c]
push eax
call ebx
add esp, 4
xor edi, edi
mov dword [esi + 0x6c], edi
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
mov eax, dword [esi + 0x5c]
cmp eax, edi
je 0x40fd57
mov edi, dword [esi + 0x60]
call fcn.00403ef0
mov ecx, dword [esi + 0x5c]
push ecx
call ebx
add esp, 4
xor edi, edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov eax, dword [esi + 0x4c]
cmp eax, edi
je 0x40fd6d
push eax
call ebx
add esp, 4
lea ecx, [esi + 0x34]
mov dword [esi + 0x4c], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], edi
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [esi + 0x30]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [esi + 0x2c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [esi + 0x28]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov dword [esi + 4], vtable.CThread.0
mov dword [esi + 0x10], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret