Function at 0x4100a0
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
mov eax, 0x5154
call fcn.00525f60
mov eax, dword [0x5a674c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov dword [ebp - 0x514c], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x5138], edx
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x108]
mov dword [ebp - 0x5120], eax
mov dword [ebp - 0x5134], ecx
mov dword [ebp - 0x5144], ebx
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4100f6
mov ecx, esi
call fcn.0040fe00
mov edx, dword [ebp - 0x514c]
push ecx
mov ecx, esp
mov dword [ebp - 0x5124], esp
push edx
call fcn.004018e0
lea eax, [ebp - 0x5130]
push eax
call fcn.00425dc0
mov ecx, dword [ebp - 0x5130]
mov edx, dword [ebp - 0x5138]
push ecx
push edx
lea eax, [ebp - 0x20c]
push 0x5548d8
push eax
call fcn.00525601
mov ecx, dword [ebp - 0x5134]
push edi
push ecx
lea edx, [ebp - 0x108]
push 0x5548d8
push edx
call fcn.00525601
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 0x4101c7
mov dword [ebx], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x5120]
mov dword [ecx], eax
mov eax, dword [ebp - 0x5130]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4101b2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00525092
mov esp, ebp
pop ebp
ret 0x1c
push 0x15
push 0x4000000
push 0
push 0
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi + 4], eax
test eax, eax
jne 0x41021c
mov dword [ebx], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x5120]
mov dword [edx], eax
mov eax, dword [esi]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x5130]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x4101a6
push 0
lea ecx, [ebp - 0x5150]
push ecx
lea edx, [ebp - 0x511c]
push edx
push 0x13
push eax
mov dword [ebp - 0x5150], 0x2710
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x410263
mov dword [ebx], 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x5120]
mov dword [ecx], eax
mov ecx, esi
call fcn.0040fe00
jmp 0x410190
lea ecx, [ebp - 0x511c]
push ecx
call fcn.00525c32
add esp, 4
cmp eax, 0xc8
jne 0x41053d
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5138], eax
cmp eax, 0xffffffff
jne 0x4102d2
mov dword [ebx], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x5120]
mov dword [ecx], eax
mov ecx, esi
call fcn.0040fe00
lea ecx, [ebp - 0x5130]
call fcn.004124f0
jmp 0x4101b2
xor edi, edi
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0x5134], eax
xor eax, eax
mov dword [ebp - 0x5148], eax
mov dword [esi + 0x110], eax
mov edi, edi
push eax
push eax
lea edx, [ebp - 0x5140]
mov dword [ebp - 0x5140], eax
mov dword [ebp - 0x513c], eax
mov eax, dword [esi + 4]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x410503
mov eax, dword [ebp - 0x5140]
test eax, eax
je 0x41054b
cmp eax, 0x2800
jbe 0x410337
mov eax, 0x2800
mov dword [ebp - 0x5140], eax
lea ecx, [ebp - 0x513c]
push ecx
push eax
mov eax, dword [esi + 4]
lea edx, [ebp - 0x2a0c]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x410519
mov eax, dword [ebp - 0x513c]
add dword [esi + 0x110], eax
push 0
lea ecx, [ebp - 0x5154]
push ecx
push eax
mov eax, dword [ebp - 0x5138]
lea edx, [ebp - 0x2a0c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410527
mov ecx, dword [ebp - 0x514c]
add edi, dword [ebp - 0x5154]
push ecx
lea ebx, [esi + 0xc]
push 0x556f0c
push ebx
call fcn.00525601
mov edx, edi
add esp, 0xc
mov dword [ebp - 0x5124], edx
fild dword [ebp - 0x5124]
test edx, edx
jns 0x4103c0
fadd dword [0x556f08]
mov eax, dword [ebp + 0x18]
fild dword [ebp + 0x18]
test eax, eax
jns 0x4103d0
fadd dword [0x556f08]
fdivp st(1)
fmul qword [0x556c78]
fnstcw word [ebp - 0x512a]
movzx eax, word [ebp - 0x512a]
or eax, 0xc00
mov dword [ebp - 0x5124], eax
fldcw word [ebp - 0x5124]
fistp qword [ebp - 0x5128]
mov ecx, dword [ebp - 0x5128]
push ecx
push 0x40b
fldcw word [ebp - 0x512a]
mov ecx, esi
call fcn.0040fdd0
mov eax, edi
sub eax, dword [ebp - 0x5148]
cmp eax, 0x186a0
jb 0x4104ed
mov dword [ebp - 0x5124], eax
fild dword [ebp - 0x5124]
test eax, eax
jns 0x41043e
fadd dword [0x556f08]
fstp dword [ebp - 0x5124]
mov dword [ebp - 0x5148], edi
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [ebp - 0x5134]
mov dword [ebp - 0x5134], eax
fild dword [ebp - 0x5134]
jns 0x41046a
fadd dword [0x556f08]
fdiv qword [0x556f00]
fstp dword [ebp - 0x512c]
call dword [sym.imp.WINMM.dll_timeGetTime]
fld dword [ebp - 0x5124]
fdiv dword [ebp - 0x512c]
mov dword [ebp - 0x5134], eax
fnstcw word [ebp - 0x512a]
fstp dword [ebp - 0x5124]
movzx eax, word [ebp - 0x512a]
fld dword [ebp - 0x5124]
fmul qword [0x556ef8]
or eax, 0xc00
mov dword [ebp - 0x5124], eax
fldcw word [ebp - 0x5124]
fistp qword [ebp - 0x5128]
mov edx, dword [ebp - 0x5128]
push edx
push str._d_Kb_sec
fldcw word [ebp - 0x512a]
push ebx
call fcn.00525601
add esp, 0xc
push 0
push 0x40a
mov ecx, esi
call fcn.0040fdd0
cmp dword [ebp - 0x513c], 0
mov ebx, dword [ebp - 0x5144]
je 0x41054b
xor eax, eax
jmp 0x4102f0
mov dword [ebx], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x5120]
mov dword [ecx], eax
jmp 0x41054b
mov dword [ebx], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x410543
mov dword [ebx], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x5120]
mov dword [ecx], eax
jmp 0x41054b
mov dword [ebx], 0xb
mov edx, dword [ebp - 0x5120]
mov dword [edx], eax
mov eax, dword [ebp - 0x5138]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, esi
call fcn.0040fe00
cmp dword [ebx], 0
jne 0x4102c2
mov ecx, dword [ebp + 0x18]
cmp dword [esi + 0x110], ecx
je 0x410587
mov eax, dword [ebp - 0x5120]
mov dword [ebx], 8
mov edx, dword [esi + 0x110]
mov dword [eax], edx
cmp dword [ebx], 0
jne 0x4102c2
lea ecx, [ebp - 0x5130]
call fcn.004124f0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.00525092
mov esp, ebp
pop ebp
ret 0x1c