Function at 0x40705b
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
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43151f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x324
push esi
push edi
mov byte [ebp - 0x68], 0
mov dword [ebp - 0x6c], 0x320
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
add eax, 1
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x2fc], eax
mov eax, dword [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x14]
call fcn.00408540
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [ebp - 0x14]
call fcn.004190c0
push eax
call sub.MSVCRT.dll_strcpy
add esp, 8
mov dword [ebp - 0x60], 0x90320
mov word [ebp - 0x5c], 0
mov word [ebp - 0x5a], 0
mov byte [ebp - 0x58], 0xc0
mov byte [ebp - 0x57], 0
mov byte [ebp - 0x56], 0
mov byte [ebp - 0x55], 0
mov byte [ebp - 0x54], 0
mov byte [ebp - 0x53], 0
mov byte [ebp - 0x52], 0
mov byte [ebp - 0x51], 0x46
mov dword [ebp - 0x74], 2
mov dword [ebp - 0x70], 6
mov dword [ebp - 0x50], 0
mov ecx, 0xe
xor eax, eax
lea edi, [ebp - 0x4c]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x50], 0x3c
lea ecx, [ebp - 0x14]
call fcn.004190c0
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x30], 1
lea edx, [ebp - 0x74]
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x64]
push eax
push 0x108
lea ecx, [ebp - 0x50]
push ecx
call dword [sym.imp.WS2_32.dll_WSALookupServiceBeginA]
test eax, eax
jne 0x407819
mov dword [ebp - 0x78], 0x3c
mov edx, dword [ebp - 0x78]
push edx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x300], eax
mov eax, dword [ebp - 0x300]
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x7c]
push ecx
lea edx, [ebp - 0x78]
push edx
push 0
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WS2_32.dll_WSALookupServiceNextA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x80], al
mov ecx, dword [ebp - 0x80]
and ecx, 0xff
test ecx, ecx
jne 0x40721f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x84], eax
cmp dword [ebp - 0x84], 0x271e
jne 0x40721f
mov edx, dword [ebp - 0x7c]
mov dword [ebp - 0x304], edx
mov eax, dword [ebp - 0x304]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [ebp - 0x78]
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x308], eax
mov edx, dword [ebp - 0x308]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x78]
push ecx
push 0
mov edx, dword [ebp - 0x64]
push edx
call dword [sym.imp.WS2_32.dll_WSALookupServiceNextA]
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x80], al
mov eax, dword [ebp - 0x64]
push eax
call dword [sym.imp.WS2_32.dll_WSALookupServiceEnd]
mov ecx, dword [ebp - 0x80]
and ecx, 0xff
test ecx, ecx
je 0x407781
mov edx, dword [ebp - 0x7c]
cmp dword [edx + 0x2c], 0
je 0x407781
mov eax, dword [ebp - 0x7c]
cmp dword [eax + 0x30], 0
je 0x407781
push 0
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0xffffffff
je 0x407701
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x407681
mov ecx, dword [ebp + 0x14]
call fcn.00408500
push 0x21
mov ecx, dword [ebp + 0x14]
call fcn.004084e0
push eax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x40767f
lea ecx, [ebp - 0x30c]
push ecx
push str.FINE__r_n
lea ecx, [ebp - 0x94]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov byte [ebp - 4], 1
push 0
lea ecx, [ebp - 0x94]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
push eax
lea ecx, [ebp - 0x94]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
lea ecx, [ebp - 0x94]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
cmp esi, eax
jne 0x4075f1
push 0
mov ecx, dword [ebp + 0x14]
push ecx
lea ecx, [ebp - 0xa0]
call sub.MFC42.DLL_CSingleLock::CSingleLock
mov byte [ebp - 4], 2
push 0x7d0
lea ecx, [ebp - 0xa0]
call sub.MFC42.DLL_CSingleLock::Lock
test eax, eax
je 0x407562
push 0
push 0x1ff
lea edx, [ebp - 0x2a0]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x2a4], eax
cmp dword [ebp - 0x2a4], 0
je 0x4074e2
cmp dword [ebp - 0x2a4], 0xffffffff
je 0x4074e2
mov edx, dword [ebp - 0x2a4]
mov byte [ebp + edx - 0x2a0], 0
lea eax, [ebp - 0x310]
push eax
lea ecx, [ebp - 0x2a0]
push ecx
lea ecx, [ebp - 0x2b4]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
mov byte [ebp - 4], 3
push 0
push 0xd
lea ecx, [ebp - 0x2b4]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char__unsigned_int_const]
mov dword [ebp - 0x2b8], eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [ebp - 0x2b8]
cmp eax, dword [edx]
je 0x40742e
mov ecx, dword [ebp - 0x2b8]
push ecx
push 0
lea edx, [ebp - 0x320]
push edx
lea ecx, [ebp - 0x2b4]
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__::substr_unsigned_int__unsigned_int_]
mov dword [ebp - 0x32c], eax
mov eax, dword [ebp - 0x32c]
mov dword [ebp - 0x330], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x330]
push ecx
lea ecx, [ebp - 0x2b4]
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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x320]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x440824
lea edx, [ebp - 0x2b4]
push edx
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 8
and eax, 0xff
test eax, eax
je 0x407452
mov byte [ebp - 0x68], 1
jmp 0x4074d0
lea ecx, [ebp - 0x2c0]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 5
push 0xba
lea ecx, [ebp - 0x2c0]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2bc]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 6
push 0xbb
lea ecx, [ebp - 0x2bc]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2bc]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2c0]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2bc]
call fcn.00430182
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2c0]
call fcn.00430182
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2b4]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x407560
lea ecx, [ebp - 0x2c8]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 7
push 0xba
lea ecx, [ebp - 0x2c8]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2c4]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 8
push 0xbb
lea ecx, [ebp - 0x2c4]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2c4]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2c8]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x2c4]
call fcn.00430182
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c8]
call fcn.00430182
jmp 0x4075e0
lea ecx, [ebp - 0x2d0]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 9
push 0xba
lea ecx, [ebp - 0x2d0]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2cc]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xa
push 0xbb
lea ecx, [ebp - 0x2cc]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2cc]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2d0]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x2cc]
call fcn.00430182
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2d0]
call fcn.00430182
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa0]
call fcn.00408520
jmp 0x40766f
lea ecx, [ebp - 0x2d8]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xb
push 0xb8
lea ecx, [ebp - 0x2d8]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2d4]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xc
push 0xb9
lea ecx, [ebp - 0x2d4]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2d4]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2d8]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x2d4]
call fcn.00430182
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2d8]
call fcn.00430182
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x94]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x4076ff
lea ecx, [ebp - 0x2e0]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xd
push 0xb7
lea ecx, [ebp - 0x2e0]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2dc]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xe
push 0xb6
lea ecx, [ebp - 0x2dc]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2dc]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2e0]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x2dc]
call fcn.00430182
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2e0]
call fcn.00430182
jmp 0x40777f
lea ecx, [ebp - 0x2e8]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0xf
push 0xb5
lea ecx, [ebp - 0x2e8]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2e4]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0x10
push 0xb6
lea ecx, [ebp - 0x2e4]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2e4]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2e8]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x2e4]
call fcn.00430182
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2e8]
call fcn.00430182
jmp 0x4077ff
lea ecx, [ebp - 0x2f0]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0x11
push 0xb3
lea ecx, [ebp - 0x2f0]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2ec]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0x12
push 0xb4
lea ecx, [ebp - 0x2ec]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2ec]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2f0]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x2ec]
call fcn.00430182
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2f0]
call fcn.00430182
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x324], eax
mov ecx, dword [ebp - 0x324]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x407897
lea ecx, [ebp - 0x2f8]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0x13
push 0xb3
lea ecx, [ebp - 0x2f8]
call sub.MFC42.DLL_CString::LoadStringA
lea ecx, [ebp - 0x2f4]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 0x14
push 0xb4
lea ecx, [ebp - 0x2f4]
call sub.MFC42.DLL_CString::LoadStringA
push 0
lea ecx, [ebp - 0x2f4]
call fcn.00419910
push eax
lea ecx, [ebp - 0x2f8]
call fcn.00419910
push eax
mov ecx, dword [ebp + 8]
call sub.MFC42.DLL_CWnd::MessageBoxA
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x2f4]
call fcn.00430182
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2f8]
call fcn.00430182
mov dl, byte [ebp - 0x68]
mov byte [ebp - 0x328], dl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00406ad0
mov al, byte [ebp - 0x328]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret