Function at 0x40a2a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Reference http user-agent string
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6cc
mov eax, dword [0x431860]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x6b4], eax
mov al, byte [ebp + 0x10]
push esi
mov byte [ebp - 0x6a9], al
mov byte [ebp - 0x6c4], al
mov al, byte [ebp + 0x14]
push edi
push 0x200
mov dword [ebp - 0x6c8], edx
mov dword [ebp - 0x6c0], ecx
mov byte [ebp - 0x6aa], al
mov byte [ebp - 0x6cc], al
call fcn.0040caa9
add esp, 4
cmp byte [ebp - 0x6a9], 0
mov dword [ebp - 0x6bc], eax
jne 0x40a32b
lea esi, [ebx + 0x200]
push esi
call fcn.0040caa9
add esp, 4
mov dword [ebp - 0x6b0], eax
push esi
push 0
push eax
call fcn.00411ca0
add esp, 0xc
jmp 0x40a337
mov eax, dword [ebp - 0x6c4]
mov dword [ebp - 0x6b0], eax
push 0xc0
lea eax, [ebp - 0x4c8]
push 0
mov ecx, 0x10
mov esi, str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_6.1__Trident_5.0_
lea edi, [ebp - 0x508]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00411ca0
add esp, 0xc
lea eax, [ebp - 0x3c0]
push 0xb8
push 0
mov ecx, 0x12
mov esi, str.Mozilla_5.0__compatible__Konqueror_4.3__Linux__KHTML_4.3.5__like_Gecko_
lea edi, [ebp - 0x408]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00411ca0
movq xmm0, qword [str.Mozilla_4.8__en___Windows_NT_5.0__U_]
mov eax, dword [0x42d2c0]
movq qword [ebp - 0x308], xmm0
movq xmm0, qword [0x42d2a8]
add esp, 0xc
mov dword [ebp - 0x2e8], eax
mov al, byte [0x42d2c4]
movq qword [ebp - 0x300], xmm0
movq xmm0, qword [0x42d2b0]
push 0xdb
mov byte [ebp - 0x2e4], al
movq qword [ebp - 0x2f8], xmm0
movq xmm0, qword [0x42d2b8]
lea eax, [ebp - 0x2e3]
push 0
push eax
movq qword [ebp - 0x2f0], xmm0
call fcn.00411ca0
add esp, 0xc
lea eax, [ebp - 0x1b0]
push 0xa8
push 0
mov ecx, 0x16
mov esi, str.Mozilla_4.0__compatible__MSIE_6.0__America_Online_Browser_1.1__rev1.5__Windows_NT_5.1__
lea edi, [ebp - 0x208]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00411ca0
mov ecx, 0x15
mov esi, str.Mozilla_5.0__Windows__U__Windows_NT_5.1__en_US__rv:1.7.5__Gecko_20060127_Netscape_8.1
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
lea eax, [ebp - 0xb2]
push 0xaa
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.00411ca0
add esp, 0xc
mov dword [ebp - 0x6b8], 0
push ebx
push 0
push dword [ebp - 0x6b4]
call fcn.00411ca0
mov esi, dword [ebp - 0x6bc]
add esp, 0xc
push str.GET
push 0x200
push esi
call fcn.0040e3a9
add esp, 0xc
push dword [ebp - 0x6c8]
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push str._HTTP_1.0_r_nHost:
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push dword [ebp - 0x6c0]
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push 0x42d394
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push str.Cache_Control:_max_age0__no_store_r_n
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push str.User_agent:
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 5
div ecx
lea eax, [ebp - 0x508]
shl edx, 8
add eax, edx
push eax
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
push str._r_n_r_n
push 0x200
push esi
call fcn.0040e681
add esp, 0xc
lea eax, [ebp - 0x6a8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jns 0x40a560
mov dword [ebp - 0x6b8], 1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [ebp - 0x6c4]
mov esi, dword [ebp - 0x6b0]
jmp 0x40a78e
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a58e
mov dword [ebp - 0x6b8], 2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebp - 0x6b0]
jmp 0x40a78e
push dword [ebp - 0x6c0]
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40a786
mov ecx, 2
mov word [ebp - 0x518], cx
mov eax, dword [eax + 0xc]
push 0x50
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x514], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x516], ax
push 0x10
lea eax, [ebp - 0x518]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40a611
mov dword [ebp - 0x6b8], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x1388
mov dword [ebp - 0x6b4], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, dword [ebp - 0x6b0]
mov eax, dword [ebp - 0x6b4]
jmp 0x40a78e
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a616
push 0
sub ecx, edx
push ecx
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40a64a
mov dword [ebp - 0x6b8], 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebp - 0x6b0]
jmp 0x40a78e
mov ecx, dword [sym.imp.WS2_32.dll_recv]
xor esi, esi
cmp byte [ebp - 0x6a9], 0
push 0
je 0x40a669
lea eax, [ebx - 1]
push eax
mov eax, dword [ebp - 0x6b4]
jmp 0x40a679
mov eax, ebx
sub eax, esi
add eax, 0x200
push eax
mov eax, dword [ebp - 0x6b0]
add eax, esi
push eax
push edi
call ecx
lea ecx, [ebx + 0x200]
add esi, eax
cmp esi, ecx
mov cl, byte [ebp - 0x6aa]
jge 0x40a6a5
test cl, cl
je 0x40a6a5
mov ecx, dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x40a652
mov cl, byte [ebp - 0x6aa]
cmp eax, 0xffffffff
je 0x40a6ae
test eax, eax
jne 0x40a6cd
test cl, cl
jne 0x40a6cd
mov dword [ebp - 0x6b8], 5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [ebp - 0x6b0]
jmp 0x40a78e
push dword [ebp - 0x6bc]
call fcn.0040e3a4
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp byte [ebp - 0x6a9], 0
jne 0x40a773
mov esi, dword [ebp - 0x6b0]
push str._r_n_r_n
push esi
call fcn.0040e880
add esp, 8
test eax, eax
je 0x40a78c
cmp byte [ebp - 0x6aa], 0
je 0x40a73d
push ebx
push str._r_n_r_n
push esi
call fcn.0040e880
add esp, 8
add eax, 4
push eax
push dword [ebp - 0x6b4]
call fcn.0040f480
add esp, 0xc
jmp 0x40a75b
push str._r_n_r_n
push esi
call fcn.0040e880
add eax, 4
push eax
push ebx
push dword [ebp - 0x6b4]
call fcn.0040e3a9
add esp, 0x14
mov eax, dword [ebp - 0x6b4]
cmp byte [eax], 0
je 0x40a89e
push esi
call fcn.0040e3a4
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d0ff
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x6b0]
xor eax, eax
push dword [ebp - 0x6b8]
mov edx, str.GetHTTPFile_failed_with_code
push ecx
push eax
push ecx
mov ecx, 0x433130
call fcn.00405410
add esp, 4
mov ecx, eax
call fcn.00406c70
mov edx, str._on_step
mov ecx, eax
call fcn.00405410
add esp, 4
mov ecx, eax
call fcn.00406c70
mov edx, 0x42cd9c
mov ecx, eax
call fcn.00405410
push dword [ebp - 0x6cc]
mov edx, str.Passed_args_
push ecx
push dword [ebp - 0x6c4]
push ecx
push ebx
push ecx
mov ecx, 0x433130
call fcn.00405410
mov edx, dword [ebp - 0x6c0]
mov ecx, eax
call fcn.00405410
mov edx, 0x42d404
mov ecx, eax
call fcn.00405410
mov edx, dword [ebp - 0x6c8]
mov ecx, eax
call fcn.00405410
mov edx, 0x42d404
mov ecx, eax
call fcn.00405410
add esp, 4
mov ecx, eax
call fcn.00406c70
mov edx, 0x42d404
mov ecx, eax
call fcn.00405410
add esp, 4
mov ecx, eax
call fcn.0040ad70
mov edx, 0x42d404
mov ecx, eax
call fcn.00405410
add esp, 4
mov ecx, eax
call fcn.0040ad70
mov edx, 0x42d404
mov ecx, eax
call fcn.00405410
mov edx, 0x42ce1c
mov ecx, eax
call fcn.00405410
cmp byte [ebp - 0x6a9], 0
jne 0x40a883
push esi
call fcn.0040e3a4
add esp, 4
push dword [ebp - 0x6bc]
call fcn.0040e3a4
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.0040d0ff
mov esp, ebp
pop ebp
ret