Function at 0x401b88
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Download and write a file
Initialize winsock library
Receive and write data from server to client
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x301f8
call fcn.004156c0
sub esp, eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [esp + 8], 0x10000
mov dword [esp + 4], 0
lea eax, [ebp - 0x201cc]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], 0x10000
mov dword [esp + 4], 0
lea eax, [ebp - 0x101cc]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x10], 0
mov ecx, 0x4ec028
call dbg.std::vector<Player, std::allocator<Player> >::begin()
mov dword [ebp - 0x301d0], eax
mov ecx, 0x4ec028
call dbg.std::vector<Player, std::allocator<Player> >::end()
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x301d0]
mov dword [esp], eax
call method.bool___gnu_cxx::operator__Player__std::vector_Player__std.allocator_Player________gnu_cxx::__normal_iterator_Player__std::vector_Player__std::allocator_Player______const____gnu_cxx::__normal_iterator_Player__std::vector_Player__std::allocator_
test al, al
je 0x401f47
lea eax, [server.sin_zero]
mov dword [esp + 4], eax
mov dword [esp], 0x202
mov eax, dword [sym.imp.WS2_32.dll_WSAStartup]
call eax
sub esp, 8
test eax, eax
setne al
test al, al
je 0x401c7f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x13
mov dword [esp + 4], 1
mov dword [esp], str.WSAStartup_failed._n
call sym._fwrite
mov eax, 1
jmp 0x401f4c
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
jne 0x401ce2
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x18
mov dword [esp + 4], 1
mov dword [esp], str.socket_creation_failed._n
call sym._fwrite
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x401f4c
mov word [ebp - 0x1cc], 2
mov dword [esp], str.www.dream_pro.info
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x1c8], eax
mov eax, dword [ebp - 0x1c8]
cmp eax, 0xffffffff
jne 0x401d31
mov dword [esp], str.www.dream_pro.info
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c8], eax
mov dword [esp], 0x50
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x1ca], ax
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x1cc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
sete al
test al, al
je 0x401db9
mov dword [esp], str.connect_failed
call sym._perror
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], 0x4df063
call sym._printf
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
mov eax, 1
jmp 0x401f4c
lea eax, [ebp - 0x301d0]
mov ecx, eax
call dbg.__gnu_cxx::__normal_iterator<Player*, std::vector<Player, std::allocator<Player> > >::operator->() const
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.GET__lavalse_LR2IR_2_getghost.cgi_songmd5_stargetid_06d_HTTP_1.0_r_nHost:_www.dream_pro.info_r_nConnection:_close_r_n_r_n
mov dword [esp + 4], 0x10000
lea eax, [ebp - 0x101cc]
mov dword [esp], eax
call dbg.snprintf
lea eax, [ebp - 0x101cc]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x101cc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_send]
call eax
sub esp, 0x10
mov dword [ebp - 0xc], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10000
lea eax, [ebp - 0x201cc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
setg al
test al, al
je 0x401ef6
cmp dword [ebp - 0xc], 0
jne 0x401ecd
mov dword [esp + 4], 0x23
lea eax, [ebp - 0x201cc]
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x401e2c
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x201cc]
add eax, edx
sub eax, dword [ebp - 0x28]
sub eax, 1
mov ecx, eax
mov eax, dword [ebp - 0x28]
lea edx, [eax + 1]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov dword [esp], edx
call sym._fwrite
jmp 0x401e2c
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp + 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x201cc]
mov dword [esp], eax
call sym._fwrite
jmp 0x401e2c
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym._fputc
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
mov eax, dword [sym.imp.WS2_32.dll_WSACleanup]
call eax
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0x64
je 0x401f46
lea eax, [ebp - 0x301d0]
mov dword [esp], 0
mov ecx, eax
call dbg.__gnu_cxx::__normal_iterator<Player*, std::vector<Player, std::allocator<Player> > >::operator++(int)
sub esp, 4
jmp 0x401bff
nop
mov eax, 0
leave
ret