Function at 0x40d770
Capabilities:
Create http request
Query remote server for available data
Read data from internet
Receive data

Disassembly:
push 0xffffffffffffffff
push 0x495df1
mov eax, dword fs:[0]
push eax
mov eax, 0x8248
call fcn.00479200
mov eax, dword [0x4bd750]
xor eax, esp
mov dword [esp + 0x8240], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4bd750]
xor eax, esp
push eax
lea eax, [esp + 0x825c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x826c]
mov ebx, dword [esp + 0x8270]
push str.URLDownload_Start
mov edi, ecx
mov esi, edx
mov dword [esp + 0x18], eax
call fcn.004169a0
add esp, 4
push str.Open_Internet_Session
call fcn.004169a0
add esp, 4
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.WININET.dll_InternetOpenW]
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x40d80e
push str.Internet_Session_Open_Failed_
xor esi, esi
call fcn.00416940
add esp, 4
lea eax, [esi + 1]
jmp 0x40dc66
test esi, esi
lea ebp, [edi + 0x28]
jne 0x40d819
xor eax, eax
jmp 0x40d82f
mov eax, esi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d820
sub eax, edx
sar eax, 1
push eax
push esi
mov ecx, ebp
call fcn.00401970
mov ecx, dword [esp + 0x14]
push ebx
push ecx
lea esi, [edi + 0x30]
push 0x4ab29c
push esi
call fcn.00401850
mov edx, dword [esi]
push edx
lea eax, [edi + 0x2c]
push str._s.tmp
push eax
mov dword [esp + 0x30], eax
call fcn.00401850
add esp, 0x1c
lea ecx, [esp + 0x2c]
call fcn.004608da
mov eax, dword [esp + 0x8274]
mov esi, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push ebx
push esi
lea ebx, [esp + 0x3c]
mov ecx, edi
mov dword [esp + 0x8274], 0
call fcn.0040dc90
cmp eax, 2
je 0x40dc50
xor ebx, ebx
cmp eax, ebx
je 0x40d939
mov edx, dword [edi + 0x18]
cmp edx, dword [esp + 0x18]
jae 0x40db92
push str.Open_Http_Connection
call fcn.004169a0
add esp, 4
lea ecx, [esp + 0x20]
call fcn.00401c20
mov byte [esp + 0x8264], 1
mov eax, dword [edi + 0x18]
push eax
lea ecx, [esp + 0x24]
push str.Range:bytes_d__nCache_Control:no_cache_nPragma:no_cache
push ecx
call fcn.00401850
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax - 0xc]
mov edx, dword [ebp]
add esp, 0xc
push ebx
push 0x84000000
push ecx
push eax
push edx
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
mov dword [edi + 0x14], esi
jne 0x40d957
push str.Http_Connection_Open_Failed_
xor esi, esi
call fcn.00416940
add esp, 4
lea ecx, [esp + 0x2c]
call fcn.00460878
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x20]
call fcn.00401700
lea ecx, [esp + 0x2c]
mov dword [esp + 0x8264], 0xffffffff
call fcn.004609ae
mov eax, 1
jmp 0x40dc66
push 0x206
lea eax, [esp + 0x52]
push ebx
push eax
mov word [esp + 0x58], bx
call fcn.00475860
add esp, 0xc
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x54]
push eax
push 5
push esi
mov dword [esp + 0x54], 0x104
mov dword [esp + 0x58], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40d9b6
lea ecx, [esp + 0x4c]
push ecx
call fcn.00473307
mov edx, dword [esp + 0x8280]
mov dword [edi + 0x1c], eax
add eax, edx
add esp, 4
add eax, dword [edi + 0x18]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 0x1c]
push eax
push str.DownLoad_Left_File_Size_:__d
call fcn.004169a0
add esp, 8
cmp dword [edi + 0x1c], ebx
jbe 0x40db47
push str.Download_File_Start
call fcn.004169a0
mov ecx, dword [edi + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
add esp, 4
mov dword [edi + 0x24], ecx
call ebx
mov ebp, eax
mov dword [esp + 0x18], 0
cmp dword [edi + 0x48], 0
jne 0x40db6a
mov eax, dword [edi + 0x14]
push 0
push 0
lea edx, [esp + 0x50]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x40db0f
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [edi + 0x14]
push edx
lea eax, [esp + 0x25c]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40db16
cmp dword [esp + 0x28], 0
je 0x40db2d
call ebx
mov edx, dword [esp + 0x28]
mov esi, eax
push edx
lea eax, [esp + 0x258]
push eax
lea ecx, [esp + 0x34]
call fcn.00460628
mov ecx, dword [esp + 0x28]
add dword [edi + 0x24], ecx
cmp esi, ebp
mov eax, dword [edi + 0x24]
jbe 0x40dad9
sub esi, ebp
test esi, esi
mov dword [esp + 0x24], esi
fild dword [esp + 0x24]
jge 0x40da85
fadd dword [0x4aec70]
fld qword [0x4aeca8]
mov edx, eax
test edx, edx
fdiv st(1), st(0)
mov dword [esp + 0x3c], edx
fxch st(1)
fstp dword [esp + 0x24]
fild dword [esp + 0x3c]
jge 0x40daa7
fadd dword [0x4aec70]
fstp dword [esp + 0x3c]
mov edx, dword [edi + 0x20]
test edx, edx
fld dword [esp + 0x3c]
fld st(0)
fdivrp st(2)
fld dword [esp + 0x24]
fdivp st(2)
fxch st(1)
fstp dword [edi + 0x38]
fild dword [edi + 0x20]
jge 0x40dace
fadd dword [0x4aec70]
fdivp st(1)
fmul qword [0x4aecb0]
fstp dword [edi + 0x3c]
mov edx, dword [esp + 0x8278]
add eax, edx
mov dword [0x4c5cf0], eax
xor eax, eax
cmp ecx, eax
mov dword [0x4c5cf4], eax
mov edx, dword [edi + 0x20]
mov dword [0x4c5cf8], edx
mov dword [0x4c5cfc], eax
fld dword [edi + 0x38]
fstp dword [0x4c5d08]
jne 0x40d9f5
jmp 0x40db2d
push str.InternetQueryDataAvailable_:_data_not_available_
jmp 0x40db1b
push str.InternetReadFile_:_reading_file_fail_
xor esi, esi
call fcn.00416940
mov dword [esp + 0x1c], 1
add esp, 4
cmp dword [edi + 0x48], 0
jne 0x40db6a
cmp dword [esp + 0x18], 0
jne 0x40db6a
push str.Download_File_Success
call fcn.004169a0
add esp, 4
mov edx, dword [edi + 0x14]
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x8264], 0
call fcn.00401700
mov esi, dword [esp + 0x1c]
jmp 0x40db98
lea ecx, [esp + 0x2c]
call fcn.00460878
mov eax, dword [edi + 0x14]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov dword [edi + 0x14], 0
jmp 0x40d930
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x2c]
call fcn.00460878
cmp dword [esp + 0x8274], 0
jne 0x40dc09
push str.MD5_Check_Start
call fcn.004169a0
add esp, 4
mov ecx, edi
call fcn.0040e140
test eax, eax
jne 0x40dbfc
push str.MD5_Check_Failed_
xor esi, esi
call fcn.00416940
add esp, 4
cmp dword [edi + 0x44], esi
mov dword [edi + 0x40], 6
je 0x40dbe5
mov eax, edi
call fcn.0040c780
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
call fcn.00413ed0
mov ecx, dword [esp + 0x1c]
push ecx
call ebx
jmp 0x40d939
push str.MD5_Check_Success
call fcn.004169a0
add esp, 4
mov edi, dword [esp + 0x14]
mov edx, dword [edi]
mov eax, dword [edx - 0xc]
add eax, 0xfffffffc
push eax
lea eax, [esp + 0x18]
push eax
mov ecx, edi
call fcn.00401190
mov byte [esp + 0x8264], 2
mov ecx, dword [esp + 0x14]
mov edi, dword [edi]
push ecx
push edi
call fcn.00460584
push esi
call ebx
push str.URLDownload_End
call fcn.004169a0
add esp, 4
lea ecx, [esp + 0x14]
call fcn.00401700
lea ecx, [esp + 0x2c]
mov dword [esp + 0x8264], 0xffffffff
call fcn.004609ae
xor eax, eax
mov ecx, dword [esp + 0x825c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x8240]
xor ecx, esp
call fcn.004716ba
add esp, 0x8254
ret 0x14