Function at 0x40f660
Capabilities:
Download and write a file
Get number of processors
Get process heap force flags
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444be6
mov eax, dword fs:[0]
push eax
sub esp, 0x168
mov eax, dword [0x4716e0]
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 edi, ecx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push 0xffffffffffffffff
mov dword [ebp - 0x174], eax
push 0
lea eax, [edi + 0x18]
push eax
lea ecx, [ebp - 0x104]
mov dword [ebp - 0xf0], 0xf
mov dword [ebp - 0xf4], 0
mov byte [ebp - 0x104], 0
call fcn.00401490
lea ecx, [ebp - 0x160]
mov dword [ebp - 4], 0
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x154], 0
mov dword [ebp - 0x150], 0
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x114], 0
call fcn.0040a300
xor eax, eax
cmp dword [ebp - 0xf0], 0x10
mov dword [ebp - 0x170], eax
lea eax, [ebp - 0x104]
cmovae eax, dword [ebp - 0x104]
push eax
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 1
call fcn.0040b6d0
movzx eax, byte [edi + 0x30]
push eax
lea ecx, [ebp - 0x160]
call fcn.0040ae90
test al, al
jne 0x40f7b1
cmp byte [edi + 0x30], al
lea ecx, [ebp - 0x160]
sete al
mov byte [edi + 0x30], al
push eax
call fcn.0040ae90
test al, al
jne 0x40f7b1
cmp dword [ebp - 0xf0], 0x10
lea ecx, [ebp - 0x104]
cmovae ecx, dword [ebp - 0x104]
cmp dword [0x4740ec], 0x10
mov eax, 0x4740d8
cmovae eax, dword [0x4740d8]
jmp 0x40f9b2
lea ecx, [ebp - 0x160]
call fcn.0040a960
mov dword [ebp - 0x16c], eax
mov dword [ebp - 0x168], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, esi
cmp dword [ebx + 0x14], 0x10
jb 0x40f7de
mov ecx, dword [ebx]
jmp 0x40f7e0
mov ecx, ebx
push 0x45f6f4
push ecx
lea eax, [ebp - 0x164]
push eax
call fcn.0041718f
mov eax, dword [ebp - 0x164]
add esp, 0xc
test eax, eax
jne 0x40f820
cmp dword [ebx + 0x14], 0x10
jb 0x40f807
mov ebx, dword [ebx]
cmp dword [0x474104], 0x10
mov eax, 0x4740f0
cmovae eax, dword [0x4740f0]
push ebx
jmp 0x40f9b3
cmp dword [ebp - 0x16c], esi
jle 0x40f927
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x108]
push eax
push 0x32
lea eax, [ebp - 0xec]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40f8ab
mov ecx, dword [ebp - 0x170]
cmp ecx, 0x32
jge 0x40f8ab
mov eax, dword [ebp - 0x108]
test eax, eax
je 0x40f8a2
push dword [ebp - 0x164]
add dword [ebp - 0x168], eax
push eax
lea eax, [ebp - 0xec]
push 1
push eax
call fcn.00417a4e
add esp, 0x10
push dword [ebp - 0x16c]
push dword [ebp - 0x168]
push 0x64
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
call dword [ebp - 0x174]
jmp 0x40f90f
inc ecx
mov dword [ebp - 0x170], ecx
jmp 0x40f90f
xor eax, eax
push 0x32
mov dword [ebp - 0x170], eax
call ebx
movzx eax, byte [edi + 0x30]
push eax
lea ecx, [ebp - 0x160]
call fcn.0040ae90
test al, al
jne 0x40f8f7
jmp 0x40f8d0
add esi, 0x32
cmp esi, 0x3a98
jge 0x40f98b
push 0x32
call ebx
movzx eax, byte [edi + 0x30]
push eax
lea ecx, [ebp - 0x160]
call fcn.0040ae90
test al, al
je 0x40f8d0
push 0
push 0
push 0
push dword [ebp - 0x168]
push dword [ebp - 0x114]
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
mov eax, dword [ebp - 0x16c]
cmp dword [ebp - 0x168], eax
jl 0x40f832
mov eax, dword [ebp - 0x164]
push eax
call fcn.00418281
push dword [ebp - 0x164]
call fcn.00417054
add esp, 8
push 0x64
call dword [ebp - 0x174]
mov bl, 1
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 0
call fcn.0040a4b0
cmp dword [ebp - 0xf0], 0x10
jb 0x40f96b
push dword [ebp - 0x104]
call fcn.0041572d
add esp, 4
mov al, bl
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.004163f4
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0xf0], 0x10
lea ecx, [ebp - 0x104]
cmovae ecx, dword [ebp - 0x104]
cmp dword [0x47411c], 0x10
mov eax, 0x474108
cmovae eax, dword [0x474108]
push ecx
push eax
call fcn.00413000
push eax
call fcn.00412bc0
add esp, 0xc
xor bl, bl
jmp 0x40f945