Function at 0x409710
Capabilities:
Create thread

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, eax
mov eax, dword [esi + 0x4d0]
mov ebx, dword [eax + 0xec]
push edi
mov edi, dword [eax + 0xe8]
call fcn.004113e0
fnstcw word [esp + 0x10]
sub edi, eax
sbb ebx, edx
mov dword [esp + 0x20], edi
mov eax, ebx
and ebx, 0x7fffffff
mov dword [esp + 0x24], ebx
fild qword [esp + 0x20]
and eax, 0x80000000
mov dword [esp + 0x24], eax
movzx eax, word [esp + 0x10]
xor ecx, ecx
mov dword [esp + 0x20], ecx
or eax, 0xc00
fild qword [esp + 0x20]
mov dword [esp + 0x18], eax
fchs
faddp st(1)
fmul qword [0x44a268]
fldcw word [esp + 0x18]
fistp qword [esp + 0x20]
mov edi, dword [esp + 0x20]
cmp edi, ecx
fldcw word [esp + 0x10]
mov dword [esp + 0x10], edi
jne 0x40979d
mov dword [esp + 0x10], 1
mov edi, dword [esp + 0x10]
jmp 0x4097ad
mov eax, dword [esi + 0x454]
cmp edi, eax
jbe 0x4097ad
mov dword [esp + 0x10], eax
mov edi, eax
lea ebx, [esi + 0x4b0]
mov dword [esi + 0x4a4], ecx
mov ebp, dword [ebx + 8]
cmp dword [ebx + 4], ebp
jbe 0x4097c6
call fcn.004269df
mov eax, dword [ebx + 4]
cmp eax, dword [ebx + 8]
mov dword [esp + 0x18], eax
jbe 0x4097db
call fcn.004269df
mov eax, dword [esp + 0x18]
push ebp
push ebx
push eax
push ebx
lea eax, [esp + 0x30]
push eax
call fcn.0040a480
push edi
lea ebp, [esi + 0x4c0]
push ebp
call fcn.0040a400
xor edi, edi
cmp dword [esp + 0x10], edi
jle 0x40990c
mov dword [esp + 0x14], edi
lea eax, [edi + 1]
push eax
mov dword [esp + 0x1c], eax
push str.Start_download_thread_index:_d__...
push 0
mov eax, 1
call fcn.0040a010
mov eax, dword [ebp + 4]
add esp, 0xc
test eax, eax
je 0x409843
mov ecx, dword [ebp + 8]
sub ecx, eax
mov eax, 0x7fc01ff1
imul ecx
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x409848
call fcn.004269df
mov edi, dword [ebp + 4]
add edi, dword [esp + 0x14]
push 0x2010
push 0
push edi
call fcn.0042a080
mov ecx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push edi
push 0x4087e0
push 0
push 0
mov dword [edi], esi
mov dword [edi + 4], ecx
call fcn.00427857
add esp, 0x18
test eax, eax
mov dword [esp + 0x20], eax
jne 0x40989f
mov edx, dword [edi + 4]
push edx
push str.Create_Download_Thread__index:_d__Failed_
push eax
mov eax, 3
call fcn.0040a010
add esp, 0xc
jmp 0x4098f6
mov edi, dword [ebx + 4]
test edi, edi
jne 0x4098aa
xor edx, edx
jmp 0x4098b2
mov edx, dword [ebx + 8]
sub edx, edi
sar edx, 2
test edi, edi
je 0x4098cf
mov ecx, dword [ebx + 0xc]
sub ecx, edi
sar ecx, 2
cmp edx, ecx
jae 0x4098cf
mov ecx, dword [ebx + 8]
mov dword [ecx], eax
add ecx, 4
mov dword [ebx + 8], ecx
jmp 0x4098f6
mov eax, dword [ebx + 8]
cmp edi, eax
mov dword [esp + 0x1c], eax
jbe 0x4098e3
call fcn.004269df
mov eax, dword [esp + 0x1c]
push eax
push ebx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x34]
push ecx
mov eax, ebx
call fcn.0040a5f0
mov edi, dword [esp + 0x18]
add dword [esp + 0x14], 0x2010
cmp edi, dword [esp + 0x10]
jl 0x409806
mov eax, dword [ebx + 4]
test eax, eax
je 0x40991d
mov edx, dword [ebx + 8]
sub edx, eax
sar edx, 2
jne 0x409990
cmp dword [0x4561dc], 0
mov dword [esi + 0x46c], 7
mov dword [esi + 0x468], 0xf
je 0x40995c
push 7
push 1
push esi
call fcn.00405ee0
cmp dword [0x4561dc], 0
je 0x40995c
mov eax, dword [esi + 0x468]
push eax
push 0
push esi
call fcn.00405ee0
mov ecx, dword [esi + 0x220]
mov edx, dword [esi]
mov eax, dword [edx + 0xa4]
push ecx
push 0xf
mov ecx, esi
call eax
push eax
push 0xf
push str.task_error___SetErrorStatus__d_:__s___task:_s
mov ebx, 4
call fcn.004156d0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret