Function at 0x40a45b
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x445bbc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0
push 1
push 2
mov esi, ecx
mov dword [ebp - 0x38], eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 0x30], edi
cmp edi, 0xffffffff
je 0x40a608
push str.client.update.sandai.net
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40a4ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
jmp 0x40a602
push 2
pop ecx
mov word [ebp - 0x2c], cx
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 0x26d0
mov dword [ebp - 0x28], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2a], ax
push 0x10
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x40a49f
mov edi, dword [esi + 0x14]
add edi, 0x18
je 0x40a608
push edi
call fcn.00428308
pop ecx
push edi
mov ebx, eax
push 0
push ebx
call sub.MSVCR90.dll_memset
mov eax, dword [esi + 0x14]
add esp, 0xc
cmp dword [esi + 0x18], 0x10
jb 0x40a50c
mov esi, dword [esi + 4]
jmp 0x40a50f
add esi, 4
test ebx, ebx
je 0x40a524
push dword [ebp + 0xc]
mov ecx, ebx
push eax
push esi
mov eax, edi
call fcn.0040a619
add esp, 0xc
xor esi, esi
push 0
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40a5f0
add esi, eax
cmp esi, edi
jb 0x40a526
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov esi, dword [sym.imp.WS2_32.dll_recv]
pop ecx
xor edi, edi
mov ebx, dword [ebp - 0x30]
push 0
push 0x18
pop eax
sub eax, edi
push eax
lea eax, [ebp + edi - 0x1c]
push eax
push ebx
call esi
cmp eax, 0xffffffff
je 0x40a5fb
test eax, eax
je 0x40a601
add edi, eax
cmp edi, 0x18
jb 0x40a558
push dword [ebp - 0x14]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x40a601
cmp eax, 0xa00000
ja 0x40a601
xor edi, edi
inc eax
push eax
call fcn.00428308
mov ebx, eax
mov eax, dword [ebp - 0x34]
pop ecx
inc eax
push eax
push edi
push ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x34]
push 0
sub eax, edi
push eax
lea eax, [ebx + edi]
push eax
push dword [ebp - 0x30]
call esi
cmp eax, 0xffffffff
je 0x40a5f0
add edi, eax
cmp edi, dword [ebp - 0x34]
jb 0x40a5b5
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x38]
push ebx
call dword [sym.imp.MSVCP90.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_char_const__]
push ebx
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
pop ecx
mov al, 1
jmp 0x40a60a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push dword [ebp - 0x30]
jmp 0x40a602
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428868
leave
ret