Function at 0x2310b480
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x23c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.2310adc0
test eax, eax
jne 0x2310b4a2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x23c
ret 8
mov edi, dword [esp + 0x250]
push 0xff
lea eax, [ebp + 0x127]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [ebp + 0x28]
mov edx, ecx
mov esi, edi
mov edi, ebx
mov eax, dword [esp + 0x254]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x228], eax
call fcn.2310af70
add esp, 4
test eax, eax
jne 0x2310b514
push ebx
push str.Couldnt_resolve___s_.
push ebp
call fcn.2310c4c0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x23c
ret 8
xor edi, edi
push edi
push ebp
call fcn.2310c4c0
add esp, 8
mov ecx, ebp
call fcn.2310b850
push edi
mov esi, 2
push 1
push esi
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x2310b562
mov ecx, ebp
call fcn.2310c450
push eax
push str.Couldnt_create_socket___d_.
push ebp
call fcn.2310c4c0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x23c
ret 8
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 1
push ecx
push 0x8004667e
push eax
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x2310b794
mov ecx, dword [ebp]
xor edx, edx
mov dword [esp + 0x2c], edx
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], edx
push 0x10
mov dword [esp + 0x38], edx
push eax
push ecx
mov dword [esp + 0x44], edx
mov word [esp + 0x38], si
mov dword [esp + 0x3c], edi
mov word [esp + 0x3a], di
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x2310b5ca
mov ecx, ebp
call fcn.2310c450
push eax
push str.Couldnt_bind_socket___d_.
jmp 0x2310b7a1
xor edx, edx
push ebx
mov dword [esp + 0x18], edx
mov word [esp + 0x18], si
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0x18], eax
mov ax, word [ebp + 0x228]
push eax
call sub.WSOCK32.dll_htons
mov edx, dword [ebp]
lea ecx, [esp + 0x14]
push 0x10
push ecx
push edx
mov word [esp + 0x22], ax
call sub.WSOCK32.dll_connect
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
cmp ebx, edi
jne 0x2310b7b1
mov ecx, ebp
call fcn.2310c450
cmp eax, 0x2733
jne 0x2310b785
mov ecx, dword [ebp + 0x1c]
mov eax, esi
cmp ecx, esi
jg 0x2310b63a
mov eax, ecx
mov esi, eax
mov dl, byte [0x231274c8]
test dl, dl
jne 0x2310b771
cmp esi, ecx
jg 0x2310b771
mov ecx, 1
mov dword [esp + 0x3c], eax
mov eax, dword [ebp]
mov dword [esp + 0x148], ecx
mov dword [esp + 0x44], ecx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x48]
lea ecx, [esp + 0x14c]
mov dword [esp + 0x150], eax
mov dword [esp + 0x4c], eax
push edx
push ecx
inc eax
push edi
push eax
mov dword [esp + 0x54], edi
call sub.WSOCK32.dll_select
cmp eax, edi
jle 0x2310b6c4
mov eax, dword [ebp]
lea edx, [esp + 0x44]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x2310b6fb
mov edx, dword [ebp]
lea ecx, [esp + 0x148]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x2310b6ca
mov ebx, 1
jmp 0x2310b6ca
jl 0x2310b75b
mov ecx, dword [ebp + 0x1c]
mov eax, ecx
sub eax, esi
cmp eax, 2
jg 0x2310b6e0
cmp eax, 1
jle 0x2310b6e7
cmp eax, 2
jle 0x2310b6ec
mov eax, 2
jmp 0x2310b6ec
mov eax, 1
add esi, eax
cmp ebx, edi
je 0x2310b63c
jmp 0x2310b7b1
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push edx
mov dword [esp + 0x3c], 4
call sub.WSOCK32.dll_getsockopt
cmp eax, 0xffffffff
jne 0x2310b73b
mov ecx, ebp
call fcn.2310c450
push eax
push str.CxSocket:_getsockopt_error___d_
jmp 0x2310b768
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x2310b74b
push eax
push str.Connect_error___d_
jmp 0x2310b768
push str.Unknown_error
push ebp
call fcn.2310c4c0
add esp, 8
jmp 0x2310b771
mov ecx, ebp
call fcn.2310c450
push eax
push str.Select_error_connect____d_
push ebp
call fcn.2310c4c0
add esp, 0xc
cmp ebx, edi
jne 0x2310b7b1
push str.Connect_timed_out.
push ebp
call fcn.2310c4c0
add esp, 8
jmp 0x2310b7aa
mov ecx, ebp
call fcn.2310c450
push eax
push str.Couldnt_connect_socket___d_.
jmp 0x2310b7a1
mov ecx, ebp
call fcn.2310c450
push eax
push str.Couldnt_change_to_non_blocking_socket___d_.
push ebp
call fcn.2310c4c0
add esp, 0xc
mov ecx, ebp
call fcn.2310b850
mov ecx, dword [ebp]
xor eax, eax
pop edi
cmp ecx, 0xffffffff
pop esi
pop ebp
setne al
pop ebx
add esp, 0x23c
ret 8