Function at 0x578280
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Initialize winsock library
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
add esp, 0xfffffd40
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x2c0], edx
mov dword [ebp - 0x18], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x578517
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
lea eax, [ebp - 0x1a8]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
test eax, eax
jne 0x5784f6
xor edx, edx
push ebp
push 0x5784ef
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x5784d5
push dword fs:[edx]
mov dword fs:[edx], esp
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x578303
call fcn.00404bf4
call fcn.00404bf4
jmp 0x5784f6
mov word [ebp - 0x1b8], 2
push 0x50
call sub.wsock32.dll_htons
mov word [ebp - 0x1b6], ax
lea edx, [ebp - 0x2c0]
mov eax, 0x578530
call fcn.005785a4
mov eax, dword [ebp - 0x2c0]
call fcn.0040569c
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b4], eax
push 0x10
lea eax, [ebp - 0x1b8]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_connect
inc eax
jne 0x578365
call fcn.00404bf4
call fcn.00404bf4
jmp 0x5784f6
lea eax, [ebp - 0x18]
mov edx, 0x57854c
call fcn.00405264
push 0
mov eax, dword [ebp - 0x18]
call fcn.0040549c
push eax
lea eax, [ebp - 0x18]
call fcn.004056f4
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_send
inc eax
jne 0x5783a1
call fcn.00404bf4
call fcn.00404bf4
jmp 0x5784f6
mov eax, ebx
mov edx, 0x2800
call fcn.00405828
xor edi, edi
lea eax, [ebp - 0x2bc]
call fcn.00501454
lea edx, [ebp - 0x2bc]
mov eax, dword [ebp - 8]
call fcn.00501444
mov dword [ebp - 0x14], 0xa
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0x10
jmp 0x578418
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x1b8]
push eax
push 0
mov eax, dword [ebx]
call fcn.0040549c
push eax
mov eax, ebx
call fcn.004056f4
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_recvfrom
mov esi, eax
test esi, esi
jle 0x578432
lea edx, [esi + 0x2800]
mov eax, ebx
call fcn.00405828
add edi, esi
lea eax, [ebp - 0x14]
push eax
push 0
push 0
lea eax, [ebp - 0x2bc]
push eax
push 0
call sub.wsock32.dll_select
test eax, eax
jg 0x5783dd
mov eax, ebx
mov edx, edi
call fcn.00405828
test edi, edi
je 0x5784be
xor edx, edx
push ebp
push 0x57848e
push dword fs:[edx]
mov dword fs:[edx], esp
mov edx, dword [ebx]
mov eax, 0x57859c
call fcn.004057e0
push eax
mov eax, dword [ebx]
call fcn.0040549c
mov esi, eax
pop eax
sub esi, eax
push ebx
mov edx, dword [ebx]
mov eax, 0x57859c
call fcn.004057e0
mov edx, eax
add edx, 4
mov ecx, esi
sub ecx, 3
mov eax, dword [ebx]
call fcn.004056fc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5784b5
cmp dword [ebx], 0
je 0x5784be
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5784dc
mov eax, dword [ebp - 8]
push eax
call sub.wsock32.dll_closesocket
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x57851e
lea eax, [ebp - 0x2c0]
call fcn.004051cc
lea eax, [ebp - 0x18]
call fcn.004051cc
ret