Function at 0x4d6b90
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x1d0
lea eax, [esp + 0x40]
push ebx
push ebp
push esi
push edi
push eax
push 0x202
call sub.WSOCK32.dll_WSAStartup
cmp eax, 0xffffffff
jne 0x4d6be9
call sub.WSOCK32.dll_WSAGetLastError
mov esi, dword [esp + 0x1ec]
push eax
push str.WSAStartup_failed_with_error__d_n
push esi
mov dword [0x673780], eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x1fc]
mov esi, dword [esi]
push ecx
push esi
call fcn.004d6870
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov esi, dword [esp + 0x1e4]
movsx edx, byte [esi]
push edx
call dword [sym.imp.MSVCRT.dll_isalpha]
add esp, 4
test eax, eax
push esi
je 0x4d6c09
call sub.WSOCK32.dll_gethostbyname
jmp 0x4d6c20
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0x24], eax
push 2
lea eax, [esp + 0x28]
push 4
push eax
call sub.WSOCK32.dll_gethostbyaddr
test eax, eax
jne 0x4d6c60
call sub.WSOCK32.dll_WSAGetLastError
push eax
push esi
mov esi, dword [esp + 0x1f4]
push str.Client:_Cannot_resolve_address___s_:_Error__d_n
push esi
mov dword [0x673780], eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x200]
mov esi, dword [esi]
push ecx
push esi
call fcn.004d6870
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
xor edx, edx
lea edi, [esp + 0x18]
mov dword [esp + 0x14], edx
mov ebp, dword [esp + 0x1f0]
mov dword [esp + 0x18], edx
push ebp
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
mov word [esp + 0x18], ax
call sub.WSOCK32.dll_htons
push 0
push 1
push 2
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_socket
mov ebx, eax
mov eax, dword [0x64b2e0]
mov ecx, dword [eax + 0x2f8]
test ecx, ecx
je 0x4d6d55
lea edx, [esp + 0x10]
push 4
push edx
push 0x1005
push 0xffff
push ebx
mov dword [esp + 0x24], ecx
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4d6d10
call sub.WSOCK32.dll_WSAGetLastError
push 2
push ebx
mov dword [0x673780], eax
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, dword [0x673780]
push eax
push str.connect___failed:__d_n
jmp 0x4d6e8d
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x1006
push 0xffff
push ebx
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4d6d55
call sub.WSOCK32.dll_WSAGetLastError
push 2
push ebx
mov dword [0x673780], eax
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov edx, dword [0x673780]
push edx
push str.connect___failed:__d_n
jmp 0x4d6e8d
mov esi, dword [sym.imp.MSVCRT.dll__strtime]
lea eax, [esp + 0x3c]
push eax
call esi
add esp, 4
lea ecx, [esp + 0x14]
push 0x10
push ecx
push ebx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x4d6dd3
lea edx, [esp + 0x28]
push edx
call esi
add esp, 4
call sub.WSOCK32.dll_WSAGetLastError
push 2
push ebx
mov dword [0x673780], eax
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov edx, dword [0x673780]
mov esi, dword [esp + 0x1ec]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x3c]
push eax
push ecx
push edx
push str.connect___failed:__d___s_s__n
push esi
call sub.MFC42.DLL_CString::Format
mov esi, dword [esi]
push ebp
push esi
call fcn.004d6870
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
mov eax, dword [esp + 0x1f4]
mov esi, dword [esp + 0x1e8]
test eax, eax
jne 0x4d6e00
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
mov cl, byte [esi + eax + 4]
inc eax
cmp cl, 0xd
jne 0x4d6e00
add eax, 4
mov ecx, eax
mov edi, 0x66b780
mov edx, ecx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
push 0x66b780
rep movsb byte es:[edi], byte [esi]
push ebx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4d6e4d
call sub.WSOCK32.dll_WSAGetLastError
push 2
push ebx
mov dword [0x673780], eax
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov eax, dword [0x673780]
push eax
push str.Client_send___failed:_error__d_n
jmp 0x4d6e8d
push 0
push 0x8000
push 0x66b780
push ebx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
mov dword [0x66b77c], eax
jne 0x4d6eb1
call sub.WSOCK32.dll_WSAGetLastError
push 2
push ebx
mov dword [0x673780], eax
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov ecx, dword [0x673780]
push ecx
push str.Client_recv___failed:_error__d_n
mov esi, dword [esp + 0x1f4]
push esi
call sub.MFC42.DLL_CString::Format
mov esi, dword [esi]
push ebp
push esi
call fcn.004d6870
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1d0
ret
push 2
push ebx
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
call sub.WSOCK32.dll_WSACleanup
pop edi
pop esi
pop ebp
mov dword [0x673780], 0
xor eax, eax
pop ebx
add esp, 0x1d0
ret