Function at 0x429701
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
mov eax, 0x432491
call fcn.00430000
sub esp, 0x5b4
mov al, byte [ebp + 0x1b]
push ebx
push esi
push edi
xor edi, edi
lea ecx, [ebp - 0x20]
push edi
mov dword [ebp - 0x10], edi
mov byte [ebp - 0x20], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [ebp + 0x28]
push 1
pop ebx
cmp eax, edi
mov dword [ebp - 4], ebx
je 0x429738
mov dword [eax], edi
lea eax, [ebp - 0x1c0]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp dword [ebp + 0x18], edi
jne 0x429787
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
cmp eax, edi
jne 0x42975e
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, edi
je 0x4298c4
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
cmp eax, edi
je 0x4298c4
mov eax, dword [eax]
cmp eax, edi
mov dword [ebp + 0x18], eax
je 0x4298c4
push 6
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x4298c4
cmp dword [ebp + 0x1c], 0xffffffff
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
mov esi, 0xffff
pop ebx
je 0x4297c0
lea ecx, [ebp + 0x1c]
push ebx
push ecx
push 0x1005
push esi
push eax
call edi
cmp dword [ebp + 0x20], 0xffffffff
je 0x4297d6
lea eax, [ebp + 0x20]
push ebx
push eax
push 0x1006
push esi
push dword [ebp + 0xc]
call edi
mov eax, dword [ebp + 0x18]
push dword [ebp + 0x10]
mov word [ebp - 0x30], 2
mov dword [ebp - 0x2c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x30]
push 0x10
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4298b6
lea eax, [ebp + 0x18]
mov dword [ebp + 0x18], ebx
push eax
lea eax, [ebp + 0x10]
push eax
push 0x2003
push esi
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
je 0x4298b6
mov edi, dword [ebp + 0x14]
xor esi, esi
mov eax, dword [edi + 8]
test eax, eax
jbe 0x42986e
mov ebx, dword [ebp + 0x10]
mov ecx, eax
sub ecx, esi
cmp ebx, ecx
jbe 0x429845
sub eax, esi
mov ebx, eax
mov eax, dword [edi + 4]
test eax, eax
jne 0x429851
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
add eax, esi
push ebx
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x42986e
mov eax, dword [edi + 8]
add esi, ebx
cmp esi, eax
jb 0x429836
cmp esi, dword [edi + 8]
jne 0x4298b6
mov esi, dword [ebp + 0x24]
push 0
lea eax, [ebp - 0x5c0]
push 0x400
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4298b6
push eax
lea eax, [ebp - 0x5c0]
push eax
lea ecx, [ebp - 0x20]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
cmp esi, 0xffffffff
je 0x429876
cmp dword [ebp - 0x18], esi
jb 0x429876
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x4298b6
or dword [eax], 1
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
push 1
xor edi, edi
pop ebx
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov esi, dword [ebp + 8]
mov al, byte [ebp - 0x20]
push edi
mov ecx, esi
mov byte [esi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, esi
push dword [eax]
lea eax, [ebp - 0x20]
push edi
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov dword [ebp - 0x10], ebx
and byte [ebp - 4], 0
push ebx
lea ecx, [ebp - 0x20]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret