Function at 0x4e5580
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 0xffffffffffffffff
push 0x5d5fd7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c4
mov eax, dword [0x64aa84]
push ebx
push ebp
push esi
mov dword [esp + 0x4cc], eax
push edi
xor ebx, ebx
mov dword [esp + 0x4dc], ebx
mov edi, 0xf
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
mov byte [esp + 0x4dc], 1
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
mov byte [esp + 0x4dc], 2
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
mov byte [esp + 0x4dc], 3
mov eax, dword [esp + 0x4e4]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 0x50
call fcn.00401f30
mov esi, eax
mov byte [esp + 0x4dc], 4
mov eax, dword [esi]
mov ebp, 0x10
sub eax, ebp
cmp dword [eax + 0xc], 1
jle 0x4e5644
mov ecx, dword [eax + 4]
push ecx
mov ecx, esi
call fcn.00401a50
mov esi, dword [esi]
mov eax, esi
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4e5660
sub eax, edx
push eax
push esi
lea ecx, [esp + 0xa0]
call fcn.00403040
mov byte [esp + 0x4dc], 6
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4e569d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 7
push ebx
push str.http:__
lea ecx, [esp + 0xa4]
call fcn.004e2b00
test eax, eax
ja 0x4e5bb0
push 7
push ebx
push str.http:__
lea ecx, [esp + 0xa4]
call fcn.004e2b00
push 1
push 7
push 0x5e5c30
lea ecx, [esp + 0xa4]
call fcn.004e2b00
mov esi, eax
cmp esi, 0xffffffff
je 0x4e5879
lea eax, [esi - 7]
push eax
push 7
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0xa4]
call fcn.004e3950
mov byte [esp + 0x4dc], 8
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x88]
call fcn.00402f50
mov byte [esp + 0x4dc], 6
cmp dword [esp + 0x4c], ebp
jb 0x4e5737
mov edx, dword [esp + 0x38]
push edx
call fcn.005abee6
add esp, 4
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xa4]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.004e3950
mov byte [esp + 0x4dc], 9
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xc0]
call fcn.00402f50
mov byte [esp + 0x4dc], 6
cmp dword [esp + 0x4c], ebp
jb 0x4e578a
mov ecx, dword [esp + 0x38]
push ecx
call fcn.005abee6
add esp, 4
push 1
push ebx
push 0x5fcd38
lea ecx, [esp + 0x88]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.004e2b00
mov esi, eax
cmp esi, 0xffffffff
je 0x4e5865
push esi
push ebx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x88]
call fcn.004e3950
mov byte [esp + 0x4dc], 0xa
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x5c]
call fcn.00402f50
mov byte [esp + 0x4dc], 6
cmp dword [esp + 0x30], ebp
jb 0x4e57f8
mov eax, dword [esp + 0x1c]
push eax
call fcn.005abee6
add esp, 4
push 0xffffffffffffffff
inc esi
push esi
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x88]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
call fcn.004e3950
mov byte [esp + 0x4dc], 0xb
cmp dword [esp + 0x4c], ebp
mov eax, dword [esp + 0x38]
jae 0x4e582f
lea eax, [esp + 0x38]
push eax
call fcn.0057bc91
add esp, 4
mov dword [esp + 0x14], eax
mov byte [esp + 0x4dc], 6
cmp dword [esp + 0x4c], ebp
jb 0x4e5857
mov edx, dword [esp + 0x38]
push edx
call fcn.005abee6
add esp, 4
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], bl
jmp 0x4e5879
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x5c]
call fcn.00402f50
cmp dword [esp + 0x68], ebp
mov eax, dword [esp + 0x54]
jae 0x4e5887
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp dword [esp + 0x68], ebp
mov eax, dword [esp + 0x54]
jae 0x4e589e
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x4e58ba
cmp esi, ebx
je 0x4e5bb0
cmp esi, 0xffffffff
je 0x4e5bb0
xor ecx, ecx
cmp eax, ebx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
je 0x4e58d5
mov edx, dword [eax + 0xc]
mov ecx, dword [edx]
cmp ecx, ebx
mov word [esp + 0x6c], 2
je 0x4e58e8
mov eax, dword [ecx]
mov dword [esp + 0x70], eax
jmp 0x4e58ec
mov dword [esp + 0x70], esi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
push 6
push 1
push 2
mov word [esp + 0x7a], ax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x4e5bb0
push ebp
lea edx, [esp + 0x70]
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jl 0x4e5bb0
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], bl
mov byte [esp + 0x4dc], 0xc
push 4
push str.GET
lea ecx, [esp + 0x3c]
call fcn.00403040
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0xbc]
push eax
lea ecx, [esp + 0x40]
call fcn.00419510
push 0xb
push str._HTTP_1.1_r_n
lea ecx, [esp + 0x3c]
call fcn.00419400
push 0x59
push str.User_Agent:_Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__.NET_CLR_1.1.4322___r_n
lea ecx, [esp + 0x3c]
call fcn.00419400
push 0xd
push str.Accept:___r_n
lea ecx, [esp + 0x3c]
call fcn.00419400
push 6
push str.Host:
lea ecx, [esp + 0x3c]
call fcn.00419400
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x84]
push ecx
lea ecx, [esp + 0x40]
call fcn.00419510
push 2
push 0x5eb6c0
lea ecx, [esp + 0x3c]
call fcn.00419400
push 0x15
push str.Connection:_close_r_n_r_n
lea ecx, [esp + 0x3c]
call fcn.00419400
cmp dword [esp + 0x4c], ebp
mov eax, dword [esp + 0x38]
jae 0x4e59e2
lea eax, [esp + 0x38]
mov edx, dword [esp + 0x48]
push ebx
push edx
push eax
push esi
call dword [sym.imp.WS2_32.dll_send]
push 0x18
call fcn.005abebb
add esp, 4
mov dword [esp + 0x10], eax
mov byte [esp + 0x4dc], 0xd
cmp eax, ebx
je 0x4e5a16
push ebx
mov ecx, eax
call fcn.00412b20
mov ebp, eax
jmp 0x4e5a18
xor ebp, ebp
mov byte [esp + 0x4dc], 0xc
push 0x400
mov ecx, ebp
call fcn.00412c80
mov edi, dword [sym.imp.WS2_32.dll_recv]
push ebx
push 0x400
lea eax, [esp + 0xd8]
push eax
push esi
call edi
cmp eax, ebx
jle 0x4e5a6c
push eax
lea ecx, [esp + 0xd4]
push ecx
mov ecx, ebp
call fcn.00412b60
push ebx
push 0x400
lea edx, [esp + 0xd8]
push edx
push esi
call edi
cmp eax, ebx
jg 0x4e5a47
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 8]
push str._r_n_r_n
push eax
call fcn.0057bca0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4e5aef
mov ecx, dword [ebp + 8]
push str.Content_Encoding:_gzip
push ecx
call fcn.0057bca0
add esp, 8
test eax, eax
je 0x4e5ab6
sub esi, dword [ebp + 8]
add esi, 4
push esi
mov ecx, ebp
call fcn.00412be0
mov ecx, ebp
call fcn.00412db0
jmp 0x4e5aef
mov edx, dword [ebp + 8]
push str.Content_Encoding:_deflate
push edx
call fcn.0057bca0
add esp, 8
test eax, eax
mov ecx, ebp
je 0x4e5ae3
sub esi, dword [ebp + 8]
add esi, 4
push esi
call fcn.00412be0
push ebx
mov ecx, ebp
call fcn.00412cc0
jmp 0x4e5aef
sub esi, dword [ebp + 8]
add esi, 4
push esi
call fcn.00412be0
mov eax, dword [ebp + 0xc]
inc eax
push eax
call fcn.0057aa20
mov edx, dword [esp + 0x4ec]
mov dword [edx], eax
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
mov edx, dword [edx]
mov byte [ecx + edx], bl
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x4f0]
add esp, 4
mov dword [ecx], eax
mov edx, dword [ebp]
push 1
mov ecx, ebp
call dword [edx]
mov byte [esp + 0x4dc], 6
lea ecx, [esp + 0x34]
call fcn.00402c90
mov byte [esp + 0x4dc], 3
lea ecx, [esp + 0x98]
call fcn.00402c90
mov byte [esp + 0x4dc], 2
lea ecx, [esp + 0xb4]
call fcn.00402c90
mov byte [esp + 0x4dc], 1
lea ecx, [esp + 0x50]
call fcn.00402c90
mov byte [esp + 0x4dc], bl
lea ecx, [esp + 0x7c]
call fcn.00402c90
mov dword [esp + 0x4dc], 0xffffffff
lea ecx, [esp + 0x4e4]
call fcn.00401b70
xor eax, eax
jmp 0x4e5ca9
mov byte [esp + 0x4dc], 3
cmp dword [esp + 0xb0], ebp
jb 0x4e5bd1
mov eax, dword [esp + 0x9c]
push eax
call fcn.005abee6
add esp, 4
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
mov byte [esp + 0x4dc], 2
cmp dword [esp + 0xcc], ebp
jb 0x4e5c07
mov ecx, dword [esp + 0xb8]
push ecx
call fcn.005abee6
add esp, 4
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc8], ebx
mov byte [esp + 0xb8], bl
mov byte [esp + 0x4dc], 1
cmp dword [esp + 0x68], ebp
jb 0x4e5c37
mov edx, dword [esp + 0x54]
push edx
call fcn.005abee6
add esp, 4
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
mov byte [esp + 0x4dc], bl
cmp dword [esp + 0x94], ebp
jb 0x4e5c63
mov eax, dword [esp + 0x80]
push eax
call fcn.005abee6
add esp, 4
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
mov dword [esp + 0x4dc], 0xffffffff
mov eax, dword [esp + 0x4e4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4e5ca4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
mov ecx, dword [esp + 0x4d4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x4c4]
pop ebx
call fcn.0057981f
add esp, 0x4d0
ret