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

Disassembly:
jmp 0x1007fb1b
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x28]
push ebp
xor ebp, ebp
mov dword [esp + 0xc], 1
push esi
test byte [ebx + 4], 0x10
push edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebp
je 0x1007fd7b
push dword [esp + 0x38]
call sym.CoreFoundation.dll_CFDataGetBytePtr
push dword [esp + 0x3c]
mov edi, eax
call sym.CoreFoundation.dll_CFDataGetLength
mov esi, eax
pop ecx
pop ecx
test edi, edi
je 0x1007fd7b
test esi, esi
jle 0x1007fd7b
movsd xmm0, qword [esp + 0x3c]
xorps xmm1, xmm1
comisd xmm0, xmm1
mov ebx, dword [ebx + 0x14]
ja 0x1007fb82
comisd xmm1, xmm0
jbe 0x1007fb93
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
push edi
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
test edi, edi
je 0x1007fd77
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
mov ecx, 0x2734
cmove eax, ecx
cmp eax, ecx
jne 0x1007fd77
movsd xmm0, qword [esp + 0x3c]
xorps xmm1, xmm1
comisd xmm0, xmm1
jb 0x1007fd6e
push ebp
push dword [sym.CoreFoundation.dll_kCFAllocatorSystemDefault]
mov dword [esp + 0x20], 4
call sym.CoreFoundation.dll_CFDataCreateMutable
or edi, 0xffffffff
mov ebp, eax
pop ecx
pop ecx
cmp ebx, edi
je 0x1007fc6f
push ebp
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
push ebp
mov esi, eax
call sym.CoreFoundation.dll_CFDataGetLength
pop ecx
pop ecx
mov ecx, eax
mov dword [esp + 0x34], ecx
test ecx, ecx
je 0x1007fc2b
push esi
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x1007fc6f
mov ecx, dword [esp + 0x34]
test ecx, ecx
jle 0x1007fc2b
mov eax, dword [esi]
lea eax, [eax*4 + 8]
jmp 0x1007fc30
mov eax, 0x1004
cmp eax, ecx
jle 0x1007fc48
sub eax, ecx
push eax
push ebp
call sym.CoreFoundation.dll_CFDataIncreaseLength
push ebp
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
add esp, 0xc
mov esi, eax
xor eax, eax
cmp eax, dword [esi]
jae 0x1007fc5f
lea ecx, [esi + 4]
cmp dword [ecx], ebx
je 0x1007fc5d
inc eax
add ecx, 4
cmp eax, dword [esi]
jb 0x1007fc51
cmp eax, dword [esi]
jne 0x1007fc6f
cmp dword [esi], 0x400
jae 0x1007fc6f
mov dword [esi + eax*4 + 4], ebx
inc dword [esi]
movsd xmm0, qword [esp + 0x3c]
xorps xmm1, xmm1
comisd xmm1, xmm0
jae 0x1007fcad
comisd xmm0, xmmword [0x10145390]
jae 0x1007fcad
push ecx
push ecx
movsd qword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_floor]
movsd xmm0, qword [esp + 0x44]
fstp qword [esp + 0x30]
cvttsd2si eax, qword [esp + 0x30]
pop ecx
pop ecx
mov dword [esp + 0x20], eax
jmp 0x1007fcb5
mov dword [esp + 0x20], getpeername
push ecx
push ecx
movsd qword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_floor]
movsd xmm0, qword [esp + 0x44]
fstp qword [esp + 0x30]
subsd xmm0, qword [esp + 0x30]
mulsd xmm0, qword [0x10149990]
movsd qword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_floor]
fstp qword [esp + 0x30]
cvttsd2si eax, qword [esp + 0x30]
push ebp
mov dword [esp + 0x30], eax
call sym.CoreFoundation.dll_CFDataGetLength
add esp, 0xc
mov esi, eax
lea eax, [esp + 0x20]
shl esi, 3
push eax
push 0
push ebp
call sym.CoreFoundation.dll_CFDataGetMutableBytePtr
pop ecx
push eax
push 0
push esi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x1007fd29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], eax
jmp 0x1007fd5e
jne 0x1007fd30
push 0xfffffffffffffffe
pop edi
jmp 0x1007fd5e
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
push 0x1007
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
mov edi, dword [esp + 0x10]
xor ecx, ecx
test eax, eax
cmovne edi, ecx
mov dword [esp + 0x10], edi
neg edi
sbb edi, edi
push ebp
call sym.CoreFoundation.dll_CFRelease
movsd xmm0, qword [esp + 0x40]
xorps xmm1, xmm1
pop ecx
xor eax, eax
comisd xmm1, xmm0
cmova edi, eax
mov eax, edi
jmp 0x1007fd7e
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret