Function at 0x401fd0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10028
call fcn.00426330
mov eax, dword [0x431040]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
push 6
push 1
push 2
mov esi, ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10024], eax
test eax, eax
je 0x402235
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402235
mov ecx, 2
mov word [ebp - 0x1001c], cx
mov eax, dword [eax + 0xc]
push ebx
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x10018], eax
call dword [sym.imp.WS2_32.dll_htons]
mov ebx, dword [ebp - 0x10024]
mov word [ebp - 0x1001a], ax
lea eax, [ebp - 0x1001c]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x402235
push esi
push edi
lea eax, [ebp - 0x1000c]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
push eax
call fcn.00402270
lea ecx, [ebp - 0x1000c]
add esp, 0x10
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402080
push 0
sub ecx, edx
lea eax, [ebp - 0x1000c]
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_recv]
xor al, al
mov byte [ebp - 0x1001d], al
nop dword [eax + eax]
push 0xffff
xor esi, esi
lea eax, [ebp - 0x1000c]
push esi
push eax
call fcn.0040b2a0
add esp, 0xc
nop word [eax + eax]
push 0
push 1
lea eax, [ebp - 0x1001e]
push eax
push ebx
call edi
test eax, eax
jle 0x4020fc
mov al, byte [ebp - 0x1001e]
mov byte [ebp + esi - 0x1000c], al
cmp al, 0xa
je 0x4020fc
inc esi
cmp esi, 0xfffe
jl 0x4020d0
test esi, esi
jle 0x402225
add esi, 0xffffffff
js 0x402133
nop dword [eax]
cmp byte [ebp + esi - 0x1000c], 0x20
jge 0x402133
cmp esi, 0xffff
jae 0x40225b
mov byte [ebp + esi - 0x1000c], 0
sub esi, 1
jns 0x402110
lea ecx, [ebp - 0x1000c]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402140
sub ecx, edx
je 0x402225
lea eax, [ebp - 0x10028]
mov dword [ebp - 0x10028], 0
push eax
lea eax, [ebp - 0x1000c]
push 0x42d208
push eax
call fcn.0040d70e
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x402225
mov edx, str.HTTP_1.0
mov bl, byte [eax]
cmp bl, byte [edx]
jne 0x4021a3
test bl, bl
je 0x40219f
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
jne 0x4021a3
add eax, 2
add edx, 2
test bl, bl
jne 0x402183
xor eax, eax
jmp 0x4021a8
sbb eax, eax
or eax, 1
test eax, eax
je 0x4021e4
mov eax, str.HTTP_1.1
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x4021d1
test dl, dl
je 0x4021cd
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x4021d1
add ecx, 2
add eax, 2
test dl, dl
jne 0x4021b1
xor eax, eax
jmp 0x4021d6
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x10024]
test eax, eax
jne 0x4020b0
lea eax, [ebp - 0x10028]
push eax
push 0x42d208
push 0
call fcn.0040d70e
add esp, 0xc
push eax
call fcn.0040e42f
mov ebx, dword [ebp - 0x10024]
add esp, 4
mov dword [0x437838], eax
cmp eax, 0xc8
jne 0x4020b0
mov byte [ebp - 0x1001d], 1
jmp 0x4020b0
cmp byte [ebp - 0x1001d], 0
jne 0x402248
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040971a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040971a
mov esp, ebp
pop ebp
ret
call fcn.00409c86
int3