Function at 0x402080
Capabilities:
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x83c
mov eax, dword [eax + 0x1140]
cmp dword [ebx + 0x1144], eax
je 0x402201
mov eax, dword [ebx + 0x104]
mov edx, 0x413980
mov ecx, str._r_nReferer:
test eax, eax
cmove eax, edx
mov edx, dword [0x4183f8]
test edx, edx
je 0x402309
mov dword [esp + 0x1c], eax
lea eax, [ebx + 4]
mov dword [esp + 0x10], eax
mov eax, dword [ebx]
lea esi, [esp + 0x30]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.GET__s_HTTP_1.1_r_nUser_Agent:_zsync_0.6.2_r_nHost:__s_s_s_r_n_sRange:_bytes
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x800
mov dword [esp], esi
call fcn.00410ca0
mov edx, dword [ebx + 0x1144]
mov dword [esp + 0x2c], 0x14
jmp 0x402193
sub dword [esp + 0x2c], 1
je 0x4021dc
sub ebp, 1
cmp edx, ebp
je 0x4021dc
mov dword [esp + 0x28], 0
mov ebp, 0x41398d
mov ecx, dword [ebx + 0x113c]
shl edx, 4
mov dword [esp + 0x1c], ebp
mov edi, dword [ecx + edx + 8]
mov ebp, dword [ecx + edx + 0xc]
add ecx, edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebp
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esp + 8], str._I64u__I64u_s
mov dword [esp + 0xc], edx
mov edx, 0x800
sub edx, eax
add eax, esi
mov dword [esp + 4], edx
mov dword [esp + 0x10], ecx
mov dword [esp], eax
call fcn.00410ca0
mov edx, dword [ebx + 0x1144]
mov eax, dword [esp + 0x28]
add edx, 1
test eax, eax
mov dword [ebx + 0x1144], edx
jne 0x402210
mov ebp, dword [ebx + 0x1140]
cmp edx, ebp
jge 0x402216
mov eax, esi
mov edi, dword [eax]
add eax, 4
lea ecx, [edi - 0x1010101]
not edi
and ecx, edi
and ecx, 0x80808080
je 0x40219f
mov edi, ecx
shr edi, 0x10
test ecx, 0x8080
cmove ecx, edi
lea edi, [eax + 2]
cmove eax, edi
add cl, cl
sbb eax, 3
sub eax, esi
cmp eax, 0x4b0
jle 0x402110
mov dword [esp + 0x28], 1
mov ebp, 0x413980
jmp 0x402133
cmp edi, 0xffffffff
jne 0x402201
mov dword [esp], str.send
call sub.msvcrt.dll_perror
add esp, 0x83c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [ebx + 0x1140]
mov ecx, esi
mov edi, dword [ecx]
add ecx, 4
lea eax, [edi - 0x1010101]
not edi
and eax, edi
and eax, 0x80808080
je 0x402218
mov edi, eax
shr edi, 0x10
test eax, 0x8080
cmove eax, edi
lea edi, [ecx + 2]
cmove ecx, edi
add al, al
sbb ecx, 3
mov eax, 0x413980
sub ecx, esi
cmp ebp, edx
jne 0x402260
mov dword [ebx + 0x1138], 1
mov eax, str.Connection:_close_r_n
mov dword [esp + 0xc], eax
mov eax, 0x800
mov ebp, esi
sub eax, ecx
add ecx, esi
mov dword [esp + 8], str._r_n_s_r_n
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00410ca0
mov edx, dword [ebp]
add ebp, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x402283
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea edx, [ebp + 2]
cmove ebp, edx
add al, al
sbb ebp, 3
sub ebp, esi
jne 0x4022d0
jmp 0x402201
test edi, edi
js 0x4022c8
add esi, edi
sub ebp, edi
test ebp, ebp
je 0x4021f0
mov eax, dword [ebx + 0x110]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebp
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
cmp eax, 0xffffffff
mov edi, eax
jne 0x4022c0
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
je 0x4022c8
jmp 0x4021f5
mov edx, 0x413980
mov ecx, edx
jmp 0x4020c1