Function at 0x504420
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Print debug messages
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56ee2e
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x661850]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x164], ecx
push str.Mon_Aug_10_12:09:09_2015
push 0x4b
push str.CClientSocket::ConnectToServer
push str.Mir3ClientSocket.cpp
lea ecx, [ebp - 0x11d]
call fcn.004024e0
mov dword [ebp - 4], 0
mov byte [ebp - 0x11c], 0
push 0x103
push 0
lea eax, [ebp - 0x11b]
push eax
call fcn.005454d0
add esp, 0xc
mov ecx, dword [ebp - 0x164]
cmp dword [ecx + 0xe11c], 0xffffffff
jne 0x50483b
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edx, dword [ebp - 0x164]
mov dword [edx + 0xe11c], eax
mov eax, dword [ebp - 0x164]
cmp dword [eax + 0xe11c], 0xffffffff
jne 0x5044f9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed._error_code____d__n
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x504718
mov dword [ebp - 0x134], 0xffffffff
mov dword [ebp - 0x138], 4
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
push 8
push 0xffff
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
jne 0x504568
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed._error_code____d__n
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x504718
mov dword [ebp - 0x134], 1
mov eax, dword [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
push 8
push 0xffff
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x5045cd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed._error_code____d__n
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x504718
mov dword [ebp - 0x134], 0xffffffff
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x134]
push ecx
push 8
push 0xffff
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, 0xffffffff
jne 0x504632
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed._error_code____d__n
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x504718
cmp dword [ebp - 0x134], 1
jne 0x504718
mov dword [ebp - 0x148], 0
xor eax, eax
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x15c], 0xc
mov dword [ebp - 0x154], 0
xor ecx, ecx
mov dword [ebp - 0x150], ecx
mov dword [ebp - 0x14c], ecx
mov dword [ebp - 0x13c], 0xc
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x148], 1
mov dword [ebp - 0x140], 0x2710
mov dword [ebp - 0x144], 3
push 0
push 0
lea edx, [ebp - 0x158]
push edx
mov eax, dword [ebp - 0x13c]
push eax
lea ecx, [ebp - 0x154]
push ecx
mov edx, dword [ebp - 0x15c]
push edx
lea eax, [ebp - 0x148]
push eax
push 0x98000004
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx + 0xe11c]
push edx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x504718
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed._error_code____d__n
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebp - 0x164]
cmp dword [edx + 0xe11c], 0xffffffff
jne 0x504774
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket___generated_error__d_n
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [ebp - 0x15d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11d]
call fcn.00402620
mov al, byte [ebp - 0x15d]
jmp 0x50485a
mov edx, 2
mov word [ebp - 0x130], dx
movzx eax, word [ebp + 0x10]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12e], ax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x12c], eax
push 0x31
push 0x7e8
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x164]
mov ecx, dword [eax + 0xe11c]
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
jne 0x50480f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAAsyncSelect___generated_error__d_n
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov byte [ebp - 0x15e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11d]
call fcn.00402620
mov al, byte [ebp - 0x15e]
jmp 0x50485a
push 0x10
lea ecx, [ebp - 0x130]
push ecx
mov edx, dword [ebp - 0x164]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov ecx, dword [ebp - 0x164]
mov dword [ecx + 0xe10c], 1
mov byte [ebp - 0x15f], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x11d]
call fcn.00402620
mov al, byte [ebp - 0x15f]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054514c
mov esp, ebp
pop ebp
ret 0xc