Function at 0x4f2c60
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x5bd428
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push 0x63cac0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
xor ebx, ebx
mov esi, 1
mov dword [esp + 0x38], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
call sub.SSLEAY32.dll_Ordinal_183
call sub.LIBEAY32.dll_Ordinal_3212
call sub.SSLEAY32.dll_Ordinal_74
call sub.SSLEAY32.dll_Ordinal_341
push eax
call sub.SSLEAY32.dll_Ordinal_12
add esp, 4
cmp eax, ebx
mov dword [ebp + 0x1c], eax
jne 0x4f2cfe
mov edi, str.Create_ctx_error
or ecx, 0xffffffff
xor eax, eax
push 0x63cac0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x68]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x4f2d53
push eax
call sub.SSLEAY32.dll_Ordinal_75
add esp, 4
cmp eax, ebx
mov dword [ebp + 0x14], eax
jne 0x4f2d6b
mov edi, str.Make_SSL_Error
or ecx, 0xffffffff
xor eax, eax
push 0x63cac0
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x68]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call sub.LIBEAY32.dll_Ordinal_281
push ebx
call sub.LIBEAY32.dll_Ordinal_641
add esp, 8
mov ecx, ebp
call sym.ETermProxy.exe_public:_void___thiscall_CSslClientSocket::SSlShouDown_void_
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4f2f3a
push 0x63cac0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x5c]
push eax
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
jne 0x4f2daa
mov edi, str.Couldnt_resolve_host
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x64]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4f2d53
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov edx, dword [esp + 0x60]
push edx
mov ecx, dword [eax]
mov word [esp + 0x24], 2
mov dword [esp + 0x28], ecx
call sub.WSOCK32.dll_htons
push 6
push esi
push 2
mov word [esp + 0x2e], ax
call sub.WSOCK32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4f2e16
or ecx, eax
mov edi, str.create_socket_error
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x64]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4f2d53
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4f2e3e
push eax
push 0
push ebx
call fcn.004f2bf0
add esp, 0xc
mov dword [esp + 0x14], eax
test eax, eax
jge 0x4f2e3e
mov edi, str.bind_error
jmp 0x4f2d89
lea eax, [esp + 0x14]
push 4
push eax
push 8
push 0xffff
push ebx
call sub.WSOCK32.dll_setsockopt
test eax, eax
mov dword [esp + 0x14], eax
jge 0x4f2e64
mov edi, str.setsockopt_error
jmp 0x4f2d89
lea eax, [esp + 0x18]
push 4
push eax
push 4
push 0xffff
push ebx
call sub.WSOCK32.dll_setsockopt
lea ecx, [esp + 0x20]
push 0x10
push ecx
push ebx
mov dword [esp + 0x20], eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x4f2ea6
push 2
push ebx
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
mov edi, str.connect_error
jmp 0x4f2d89
mov eax, dword [ebp + 0x14]
push ebx
push eax
call sub.SSLEAY32.dll_Ordinal_87
lea ecx, [esp + 0x24]
push ecx
push 0x8004667e
push ebx
call sub.LIBEAY32.dll_Ordinal_108_1
add esp, 0x14
test eax, eax
jge 0x4f2efe
mov edi, str.io_set_error
or ecx, 0xffffffff
xor eax, eax
push 2
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x6c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.WSOCK32.dll_shutdown
push ebx
call sub.WSOCK32.dll_closesocket
jmp 0x4f2d4c
push 0
push ebx
call sub.LIBEAY32.dll_Ordinal_84
push eax
push eax
mov eax, dword [ebp + 0x14]
push eax
call sub.SSLEAY32.dll_Ordinal_83
mov ecx, dword [ebp + 0x14]
push ecx
call sub.SSLEAY32.dll_Ordinal_86
add esp, 0x18
mov ecx, ebp
push 0x20
push ebx
call sub.MFC42.DLL_CAsyncSocket::Attach
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x30]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 0x28