Function at 0x40b9a3
Capabilities:
Check http status code
Connect to http server
Create http request
Get http content length
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
mov byte [ebp - 1], bl
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
jne 0x40b9d6
xor eax, eax
jmp 0x40bc4e
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jne 0x40b9e2
mov eax, 0x403a90
push esi
push edi
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [ebp + 0x10], eax
jne 0x40ba01
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40bbd4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
shl eax, 1
push eax
push 8
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0x24]
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
push dword [ebp - 0x24]
call fcn.0040bc93
cmp eax, ebx
pop ecx
mov dword [ebp - 0x28], eax
je 0x40bbd4
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push dword [eax + 0x10]
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
je 0x40bbd4
mov ecx, dword [ebp - 0x28]
push ebx
push 0x44000100
push ebx
push ebx
push ebx
push dword [ecx + 0x2c]
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x40bbd4
push eax
call fcn.0040b711
pop ecx
push ebx
push ebx
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x40b9f6
push 4
lea eax, [ebp - 0xc]
pop edi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push ebx
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0xc], edi
push eax
push 0x20000013
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 8], ebx
je 0x40bad7
cmp dword [ebp - 8], 0xc8
jne 0x40bbd4
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 8]
push eax
push 0x20000005
push dword [ebp - 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], edi
call esi
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
cmp eax, ebx
mov dword [ebp - 0x18], eax
jne 0x40bb14
push ebx
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 0x18], ebx
je 0x40bbd4
mov eax, dword [ebp - 0x18]
inc eax
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x40bbd4
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
cmp dword [ebp - 0x20], ebx
je 0x40bb58
push ebx
lea eax, [ebp - 0xc]
push ebx
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0xc], ebx
call esi
mov dword [ebp - 8], eax
cmp dword [ebp - 8], ebx
je 0x40bbbd
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
add eax, ecx
cmp eax, dword [ebp - 0x18]
jbe 0x40bb88
mov dword [ebp - 0x18], eax
inc eax
push eax
push dword [ebp - 0x14]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x40bbd4
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x14]
push dword [ebp - 0xc]
add eax, edi
mov dword [ebp - 0x20], ebx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
add edi, dword [ebp - 0x20]
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edi
jne 0x40bbd4
cmp eax, ebx
je 0x40bbcb
cmp dword [ebp - 0x20], ebx
je 0x40bbcb
jmp 0x40bb42
cmp dword [ebp - 0x1c], ebx
je 0x40bb42
mov byte [ebp - 1], 1
jmp 0x40bb42
cmp dword [ebp - 0x1c], ebx
je 0x40bbd4
mov byte [ebp - 1], 1
push dword [ebp - 0x28]
call fcn.0040bd40
cmp dword [ebp - 0x24], ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
pop ecx
je 0x40bbf5
push dword [ebp - 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
cmp byte [ebp - 1], bl
jne 0x40bc15
cmp dword [ebp - 0x14], ebx
je 0x40bc0c
push dword [ebp - 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
cmp dword [ebp - 0x10], ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40bc25
push dword [ebp - 0x10]
call esi
cmp dword [ebp + 0x10], ebx
je 0x40bc2f
push dword [ebp + 0x10]
call esi
mov eax, dword [ebp + 0xc]
pop edi
cmp eax, ebx
pop esi
je 0x40bc4b
mov ecx, dword [ebp - 0x1c]
cmp ecx, ebx
je 0x40bc4b
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40bc4b
mov byte [ecx + eax], bl
mov eax, dword [ebp - 0x14]
pop ebx
leave
ret