Function at 0x40a480
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x452040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x458c04], 0
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x24], eax
mov byte [0x458c05], 0
jne 0x40a4c6
push 0x459110
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x40a53d
mov byte [0x458c04], 1
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40a53d
mov esi, dword [sym.imp.WSOCK32.dll_inet_addr]
xorps xmm0, xmm0
push str.idealsoftware.com
movlpd qword [ebp - 0xc], xmm0
call esi
push str.idealsoftware.com
cmp eax, 0xffffffff
jne 0x40a50b
call dword [sym.imp.WSOCK32.dll_gethostbyname]
test eax, eax
je 0x40a536
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x40a50d
call esi
mov dword [ebp - 0x10], eax
mov eax, 2
push 0x50
mov word [ebp - 0x14], ax
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 0x14]
push 0x10
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x40a550
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041f127
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 1
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a570
sub ecx, edx
lea eax, [ecx + 0x100]
push eax
call fcn.00429ee5
add esp, 4
mov esi, eax
mov dword [ebp - 0x28], esi
push str.idealsoftware.com
push edi
push str.GET__s_HTTP_1.1_r_nHost:__s_r_nConnection:_close_r_n_r_n
push esi
call fcn.004015f0
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a5a6
push 0
sub ecx, edx
push ecx
push esi
push ebx
call dword [sym.imp.WSOCK32.dll_send]
mov ecx, dword [ebp - 0x24]
mov edi, 0x2000
mov eax, ecx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov byte [ecx], 0
nop dword [eax]
mov esi, 0x7530
dec edi
push 2
push edi
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_recv]
cmp byte [0x458c05], 0
jne 0x40a66e
test eax, eax
jg 0x40a60f
test esi, esi
je 0x40a66e
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x1c]
cmp esi, 0xffffffff
je 0x40a5d6
sub esi, 0x32
jns 0x40a5d6
xor esi, esi
jmp 0x40a5d6
mov esi, dword [ebp - 0x1c]
cmp eax, edi
push 0
cmovl edi, eax
push edi
push esi
push ebx
call dword [sym.imp.WSOCK32.dll_recv]
mov byte [eax + esi], 0
lea ecx, [eax + esi]
mov dword [ebp - 0x1c], ecx
test eax, eax
je 0x40a66e
mov edi, dword [ebp - 0x20]
sub edi, eax
mov dword [ebp - 0x20], edi
je 0x40a668
mov esi, dword [ebp - 0x24]
push str.__HTML_
push esi
call fcn.00420520
add esp, 8
test eax, eax
jne 0x40a668
push str.__html_
push esi
call fcn.00420520
add esp, 8
test eax, eax
mov eax, dword [ebp - 0x1c]
je 0x40a5d0
mov byte [ebp - 0x15], 1
jmp 0x40a672
mov byte [ebp - 0x15], 0
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
push dword [ebp - 0x28]
call fcn.00427f49
mov ecx, dword [ebp - 4]
add esp, 4
mov al, byte [ebp - 0x15]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0041f127
mov esp, ebp
pop ebp
ret