Function at 0x4101a0
Capabilities:
Check http status code
Create http request
Download and write a file
Query remote server for available data
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 0x5432cb
mov eax, dword fs:[0]
push eax
mov eax, 0x5154
call fcn.005260d0
mov eax, dword [0x5a574c]
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 eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp - 0x5158], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x5144], edx
mov esi, ecx
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x114]
mov dword [ebp - 0x512c], eax
mov dword [ebp - 0x5140], ecx
mov dword [ebp - 0x5150], ebx
mov eax, edi
sub edx, edi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x410210
mov ecx, esi
call fcn.0040fe60
mov edx, dword [ebp - 0x5158]
push ecx
mov ecx, esp
mov dword [ebp - 0x5130], esp
push edx
call fcn.004018d0
lea eax, [ebp - 0x513c]
push eax
call fcn.00425f50
mov ecx, dword [ebp - 0x513c]
mov edx, dword [ebp - 0x5144]
push ecx
push edx
lea eax, [ebp - 0x218]
push 0x55394c
push eax
mov dword [ebp - 4], 0
call fcn.00525791
mov ecx, dword [ebp - 0x5140]
push edi
push ecx
lea edx, [ebp - 0x114]
push 0x55394c
push edx
call fcn.00525791
add esp, 0x28
push 0
push 0
push 0
push 0
push str.cHttp_DownLoad
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
test eax, eax
jne 0x4102e1
mov dword [ebx], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x513c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4102da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
jmp 0x4106f2
push 0x40fe90
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
test eax, eax
je 0x410301
mov ecx, dword [0x5a6c44]
push str.INTERNET_INVALID_STATUS_CALLBACK
call fcn.00407510
mov edx, dword [esi]
push 0x15
push 0x4000000
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi + 4], eax
test eax, eax
jne 0x410362
mov dword [ebx], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
mov edx, dword [esi]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x513c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4102ce
push 0
lea ecx, [ebp - 0x515c]
push ecx
lea edx, [ebp - 0x5128]
push edx
push 0x13
push eax
mov dword [ebp - 0x515c], 0x2710
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x4103a9
mov dword [ebx], 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
mov ecx, esi
call fcn.0040fe60
jmp 0x4102b1
mov ecx, dword [esi + 4]
push ecx
mov ecx, dword [0x5a6c44]
call fcn.004072f0
lea edx, [ebp - 0x5128]
push edx
call fcn.00525dc2
add esp, 4
cmp eax, 0xc8
jne 0x410692
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5144], eax
cmp eax, 0xffffffff
jne 0x410429
mov dword [ebx], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
mov ecx, esi
call fcn.0040fe60
lea ecx, [ebp - 0x513c]
call fcn.00412650
xor al, al
jmp 0x4106f2
xor edi, edi
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0x5140], eax
xor eax, eax
mov dword [ebp - 0x5154], eax
mov dword [esi + 0x110], eax
push eax
push eax
lea edx, [ebp - 0x514c]
mov dword [ebp - 0x514c], eax
mov dword [ebp - 0x5148], eax
mov eax, dword [esi + 4]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x410658
mov eax, dword [ebp - 0x514c]
test eax, eax
je 0x4106a0
cmp eax, 0x2800
jbe 0x41048c
mov eax, 0x2800
mov dword [ebp - 0x514c], eax
lea ecx, [ebp - 0x5148]
push ecx
push eax
mov eax, dword [esi + 4]
lea edx, [ebp - 0x2a18]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41066e
mov eax, dword [ebp - 0x5148]
add dword [esi + 0x110], eax
push 0
lea ecx, [ebp - 0x5160]
push ecx
push eax
mov eax, dword [ebp - 0x5144]
lea edx, [ebp - 0x2a18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41067c
mov ecx, dword [ebp - 0x5158]
add edi, dword [ebp - 0x5160]
push ecx
lea ebx, [esi + 0xc]
push 0x555dac
push ebx
call fcn.00525791
mov edx, edi
add esp, 0xc
mov dword [ebp - 0x5130], edx
fild dword [ebp - 0x5130]
test edx, edx
jns 0x410515
fadd dword [0x555da8]
mov eax, dword [ebp + 0x18]
fild dword [ebp + 0x18]
test eax, eax
jns 0x410525
fadd dword [0x555da8]
fdivp st(1)
fmul qword [0x555ab0]
fnstcw word [ebp - 0x5136]
movzx eax, word [ebp - 0x5136]
or eax, 0xc00
mov dword [ebp - 0x5130], eax
fldcw word [ebp - 0x5130]
fistp qword [ebp - 0x5134]
mov ecx, dword [ebp - 0x5134]
push ecx
push 0x40b
fldcw word [ebp - 0x5136]
mov ecx, esi
call fcn.0040fe30
mov eax, edi
sub eax, dword [ebp - 0x5154]
cmp eax, 0x186a0
jb 0x410642
mov dword [ebp - 0x5130], eax
fild dword [ebp - 0x5130]
test eax, eax
jns 0x410593
fadd dword [0x555da8]
fstp dword [ebp - 0x5130]
mov dword [ebp - 0x5154], edi
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [ebp - 0x5140]
mov dword [ebp - 0x5140], eax
fild dword [ebp - 0x5140]
jns 0x4105bf
fadd dword [0x555da8]
fdiv qword [0x555da0]
fstp dword [ebp - 0x5138]
call dword [sym.imp.WINMM.dll_timeGetTime]
fld dword [ebp - 0x5130]
fdiv dword [ebp - 0x5138]
mov dword [ebp - 0x5140], eax
fnstcw word [ebp - 0x5136]
fstp dword [ebp - 0x5130]
movzx eax, word [ebp - 0x5136]
fld dword [ebp - 0x5130]
fmul qword [0x555d98]
or eax, 0xc00
mov dword [ebp - 0x5130], eax
fldcw word [ebp - 0x5130]
fistp qword [ebp - 0x5134]
mov edx, dword [ebp - 0x5134]
push edx
push str._d_Kb_sec
fldcw word [ebp - 0x5136]
push ebx
call fcn.00525791
add esp, 0xc
push 0
push 0x40a
mov ecx, esi
call fcn.0040fe30
cmp dword [ebp - 0x5148], 0
mov ebx, dword [ebp - 0x5150]
je 0x4106a0
xor eax, eax
jmp 0x410445
mov dword [ebx], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
jmp 0x4106a0
mov dword [ebx], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410698
mov dword [ebx], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x512c]
mov dword [ecx], eax
jmp 0x4106a0
mov dword [ebx], 0xb
mov edx, dword [ebp - 0x512c]
mov dword [edx], eax
mov eax, dword [ebp - 0x5144]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.0040fe60
cmp dword [ebx], 0
jne 0x410417
mov ecx, dword [ebp + 0x18]
cmp dword [esi + 0x110], ecx
je 0x4106dc
mov eax, dword [ebp - 0x512c]
mov dword [ebx], 8
mov edx, dword [esi + 0x110]
mov dword [eax], edx
cmp dword [ebx], 0
jne 0x410417
lea ecx, [ebp - 0x513c]
call fcn.00412650
mov al, 1
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.00525222
mov esp, ebp
pop ebp
ret 0x1c