Function at 0x4010ef
Capabilities:
Connect socket
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
sub esp, 0xcc4
push ebx
push esi
push edi
push 0xa
cdq
pop ecx
idiv ecx
xor esi, esi
cmp eax, 4
jge 0x40111f
imul edx, edx, 0x15180
lea ecx, [ebp - 0xc0]
push ecx
push eax
push edx
call section..text
add esp, 0xc
push 8
pop ecx
push 2
xor eax, eax
lea edi, [ebp - 0x3c]
rep stosd dword es:[edi], eax
pop edi
push 6
pop ebx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0xc0]
push eax
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x30], ebx
call fcn.00402901
test eax, eax
jne 0x401337
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
push dword [eax + 0x18]
lea eax, [ebp - 0x1c]
push eax
call fcn.0040c600
add esp, 0xc
mov eax, edi
push 0x50
mov word [ebp - 0x1c], ax
call dword [sym.imp.WS2_32.dll_htons]
push ebx
push 1
push edi
mov word [ebp - 0x1a], ax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x401337
push 0x10
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x40132e
lea eax, [ebp - 8]
push eax
push 0x416ff8
call dword [sym.imp.RPCRT4.dll_UuidToStringA]
xor ebx, ebx
lea eax, [ebp - 0xc0]
cmp dword [ebp - 8], ebx
je 0x4011ec
push dword [ebp - 8]
push 4
push eax
lea eax, [ebp - 0xcc0]
push str.GET__peer_HTTP_1.1_r_nConnection:_close_r_nHost:__s_r_nVersion:__i_r_nID:__s_r_n_r_n
push eax
call fcn.00404981
add esp, 0x14
lea eax, [ebp - 8]
push eax
call dword [sym.imp.RPCRT4.dll_RpcStringFreeA]
jmp 0x401203
push 4
push eax
lea eax, [ebp - 0xcc0]
push str.GET__peer_HTTP_1.1_r_nConnection:_close_r_nHost:__s_r_nVersion:__i_r_n_r_n
push eax
call fcn.00404981
add esp, 0x10
push ebx
mov edi, 0x400
push edi
lea eax, [ebp - 0xcc0]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, edi
jne 0x40132e
push edi
lea eax, [ebp - 0x4c0]
push ebx
push eax
call fcn.00405b00
add esp, 0xc
push ebx
lea ebx, [edi - 1]
push ebx
lea eax, [ebp - 0x4c0]
jmp 0x40125e
jl 0x40132e
add esi, eax
cmp esi, ebx
jae 0x40132e
mov eax, ebx
sub eax, esi
push 0
push eax
lea eax, [ebp + esi - 0x4c0]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x401240
lea eax, [ebp - 0x4c0]
push str._r_n_r_n
push eax
call fcn.004051a0
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x40132e
push dword [ebp - 4]
add ebx, 4
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
lea eax, [ebp - 0x8c0]
push 0
push eax
call fcn.00405b00
add esp, 0xc
lea eax, [ebp - 0x8c0]
push eax
sub esi, ebx
lea eax, [ebp + esi - 0x4c0]
push eax
push ebx
call fcn.00402b40
add esp, 0xc
mov byte [ebp + eax - 0x8c0], 0
lea eax, [ebp - 0x8c0]
push 0x3a
push eax
call fcn.00404cf0
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x40132e
lea eax, [ebp - 0x8c0]
push eax
mov byte [esi], 0
call dword [sym.imp.WS2_32.dll_inet_addr]
inc esi
push esi
mov dword [0x416fec], eax
call fcn.0040523c
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [0x416fec], 0xffffffff
mov word [0x416fea], ax
je 0x40132e
test ax, ax
je 0x40132e
push 2
pop eax
mov word [0x416fe8], ax
xor eax, eax
mov edi, 0x416ff0
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
inc eax
jmp 0x401339
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret