Function at 0x40cce0
Capabilities:
Make an http request with a cookie
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x451f70
push 0x422bc0
mov eax, dword fs:[0]
push eax
sub esp, 0x560
mov eax, dword [0x453348]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4b8], eax
lea ecx, [ebp - 0x424]
call fcn.00401800
mov dword [ebp - 4], 0
mov byte [0x459c07], 1
push 1
lea ecx, [ebp + 0xc]
call fcn.00409ee0
add esp, 4
mov ebx, eax
mov dword [ebp - 0x4bc], ebx
push 0
lea ecx, [ebp + 0xc]
push ecx
mov edx, str.http:__
call fcn.0040fa10
cmp eax, 0xffffffff
jne 0x40cd75
push 0
lea edx, [ebp + 0xc]
push edx
mov edx, str.http:__
call fcn.0040f960
push 0
lea eax, [ebp + 0xc]
push eax
mov edx, str.www.
call fcn.0040fa10
cmp eax, 0xffffffff
jne 0x40cd9a
push 7
lea ecx, [ebp + 0xc]
push ecx
mov edx, str.www.
call fcn.0040f960
lea edi, [ebp + 0xc]
lea esi, [ebp - 0x440]
call fcn.0040e2c0
mov edx, esi
push edx
mov edx, 0x44ed2c
call fcn.0040fa50
cmp eax, 0xffffffff
je 0x40cdf6
mov eax, esi
push eax
mov edx, 0x44ed2c
call fcn.0040fa50
lea ecx, [eax + 2]
or eax, 0xffffffff
lea esi, [ebp - 0x45c]
lea edx, [ebp - 0x440]
call fcn.0040faa0
mov edi, eax
lea esi, [ebp - 0x440]
call fcn.00401900
lea ecx, [ebp - 0x45c]
call fcn.00401880
lea ecx, [ebp - 0x440]
push ecx
mov edx, 0x44e1b4
call fcn.0040fa50
mov edi, eax
xor ecx, ecx
lea esi, [ebp - 0x478]
lea edx, [ebp - 0x440]
call fcn.0040faa0
or eax, 0xffffffff
mov ecx, edi
lea esi, [ebp - 0x45c]
lea edx, [ebp - 0x440]
call fcn.0040faa0
mov edi, eax
lea esi, [ebp - 0x440]
call fcn.00401900
lea ecx, [ebp - 0x45c]
call fcn.00401880
cmp ebx, 0xffffffff
jne 0x40ce98
push str.in_HttpDownloadFile:_sockfd_error
mov esi, dword [ebp - 0x4b8]
mov ecx, esi
call fcn.00401820
lea ecx, [ebp - 0x478]
call fcn.00401880
lea ecx, [ebp - 0x440]
call fcn.00401880
lea ecx, [ebp - 0x424]
call fcn.00401880
lea ecx, [ebp + 0xc]
call fcn.00401880
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x40d4c1
cmp dword [0x456048], 0x10
mov ebx, dword [0x456034]
jae 0x40ceac
mov ebx, 0x456034
mov eax, 0x10
cmp dword [ebp - 0x464], eax
mov edi, dword [ebp - 0x478]
jae 0x40cec5
lea edi, [ebp - 0x478]
cmp dword [ebp - 0x42c], eax
mov esi, dword [ebp - 0x440]
jae 0x40ced9
lea esi, [ebp - 0x440]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nCookie:__s_r_nConnection:_close_r_n_r_n
lea ecx, [ebp - 0x45c]
call fcn.00401820
cmp dword [eax + 0x14], 0x10
jb 0x40cef1
mov eax, dword [eax]
push ebx
push edi
push esi
push eax
lea edx, [ebp - 0x408]
push edx
call fcn.0041d551
add esp, 0x14
lea ecx, [ebp - 0x45c]
call fcn.00401880
lea eax, [ebp - 0x408]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cf18
sub eax, edx
xor edi, edi
push edi
push eax
lea eax, [ebp - 0x408]
push eax
mov ebx, dword [ebp - 0x4bc]
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40cf48
push 0x44dbd8
jmp 0x40ce54
mov dword [ebp - 0x4c4], edi
lea ecx, [ebp - 0x424]
push ecx
mov edx, 0x44ed94
call fcn.0040f8f0
mov dword [ebp - 0x4c4], edi
jmp 0x40cf70
push 0
push 0x3e8
lea edx, [ebp - 0x408]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jns 0x40cfa8
inc edi
mov dword [ebp - 0x4c4], edi
cmp edi, 0x32
jl 0x40cf70
lea eax, [ebp - 0x424]
push eax
mov edx, str.0Error_in_Connection_
call fcn.0040f8f0
jmp 0x40cfae
jne 0x40d186
push 0
lea ecx, [ebp - 0x424]
push ecx
mov edx, str._r_n_r_n
call fcn.0040fa10
mov ebx, eax
xor ecx, ecx
lea esi, [ebp - 0x4b0]
lea edx, [ebp - 0x424]
call fcn.0040faa0
push 0
sub esp, 0x1c
mov eax, esi
mov esi, esp
call fcn.0040f870
lea esi, [ebp - 0x45c]
call fcn.0040de50
add esp, 0x1c
push eax
mov edx, str.content_length:
call fcn.0040fa10
lea edi, [eax + 0x10]
mov ecx, esi
call fcn.00401880
push edi
sub esp, 0x1c
lea eax, [ebp - 0x4b0]
mov esi, esp
call fcn.0040f870
lea esi, [ebp - 0x45c]
call fcn.0040de50
add esp, 0x1c
push eax
mov edx, 0x44edc0
call fcn.0040fa10
mov esi, eax
lea ecx, [ebp - 0x45c]
call fcn.00401880
mov byte [ebp - 0x4b1], 0
mov dword [ebp - 0x4c0], 0
mov eax, esi
sub eax, edi
test eax, eax
jle 0x40d0bd
mov ecx, edi
lea esi, [ebp - 0x45c]
lea edx, [ebp - 0x4b0]
call fcn.0040faa0
mov edx, esi
push edx
lea edi, [ebp - 0x570]
call fcn.00411280
lea eax, [ebp - 0x4c0]
push eax
mov ecx, edi
push ecx
call fcn.0040ff10
mov edx, dword [eax]
mov ecx, dword [edx + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
and al, 6
movsx edx, al
neg edx
sbb edx, edx
not edx
test ecx, edx
je 0x40d0a7
mov byte [ebp - 0x4b1], 1
lea eax, [ebp - 0x570]
call fcn.004046f0
lea ecx, [ebp - 0x45c]
call fcn.00401880
cmp ebx, 0xffffffff
je 0x40d11c
test ebx, ebx
jle 0x40d11c
mov eax, dword [ebp - 0x414]
lea ecx, [eax - 4]
cmp ebx, ecx
jae 0x40d11c
sub eax, ebx
sub eax, 4
lea ecx, [ebx + 4]
lea esi, [ebp - 0x494]
lea edx, [ebp - 0x424]
call fcn.0040faa0
lea ecx, [ebp - 0x45c]
call fcn.004177a0
mov edi, eax
lea esi, [ebp - 0x424]
call fcn.00401900
lea ecx, [ebp - 0x45c]
call fcn.00401880
lea ecx, [ebp - 0x494]
call fcn.00401880
jmp 0x40d12d
lea edx, [ebp - 0x424]
push edx
mov edx, str.0Error_in_Connection_
call fcn.0040f8f0
cmp byte [ebp - 0x4b1], 0
je 0x40d156
mov eax, dword [ebp - 0x414]
dec eax
cmp eax, dword [ebp - 0x4c0]
je 0x40d156
lea ecx, [ebp - 0x424]
push ecx
mov edx, str.0Error_in_file_Size_
call fcn.0040f8f0
mov edx, dword [ebp - 0x4bc]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
lea edi, [ebp - 0x424]
mov esi, dword [ebp - 0x4b8]
mov eax, esi
call fcn.00401860
lea ecx, [ebp - 0x4b0]
call fcn.00401880
jmp 0x40ce61
lea ecx, [ebp - 0x408]
lea esi, [ebp - 0x494]
call fcn.0040f890
push 0
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x424]
call fcn.00414380
lea ecx, [ebp - 0x494]
call fcn.00401880
jmp 0x40cf70
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0041c2f8
mov esp, ebp
pop ebp
ret