Function at 0x438660
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
sub esp, 0x30
cmp ecx, 0x10
jae 0x438692
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x438685
call fcn.0053fcd2
mov dword [eax], 0x16
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
movups xmm1, xmmword [eax]
movups xmm0, xmmword [eax]
psrldq xmm1, 4
movd edi, xmm1
movups xmmword [ebp - 0x30], xmm0
bswap edi
cmp edi, 0x7f000001
jne 0x4386e4
cmp dword [esi + 0x14], 6
jne 0x4386e4
test byte [esi + 0x58], 0x80
je 0x4386e4
cmp dword [0x5eaa74], 3
jne 0x4386e4
push 0
push dword [esi]
mov dword [ebp - 8], 1
call fcn.00436d40
mov ecx, dword [ebp + 0x10]
add esp, 8
jmp 0x4386eb
mov dword [ebp - 8], 0
cmp edi, 0x7f000001
jne 0x438701
cmp word [esi + 0x78], 0
mov dword [ebp + 0xc], 1
je 0x438708
mov dword [ebp + 0xc], 0
push ebx
push ecx
lea eax, [ebp - 0x30]
xor ebx, ebx
push eax
push dword [esi + 0x60]
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_connect]
push eax
call fcn.00539b90
mov edi, eax
add esp, 4
test edi, edi
je 0x43883c
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx]
add eax, 0x28f0
mov dword [ebp - 0x10], eax
mov eax, dword [eax]
test eax, eax
jne 0x43874b
call fcn.0053fcd2
cmp dword [eax], 0x2740
jne 0x438838
cmp dword [ebp + 0xc], 0
je 0x438838
cmp ebx, 2
jge 0x438838
push dword [esi + 0x14]
mov edi, dword [esi + 0x58]
push dword [esi + 0x10]
mov eax, dword [esi + 0x60]
and edi, 0x80
push dword [esi + 0xc]
mov dword [ebp - 0xc], eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x60], eax
test eax, eax
js 0x43882e
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
xor eax, eax
test edi, edi
setne al
push eax
push dword [esi]
call fcn.00436d40
add esp, 8
mov ebx, 2
xorps xmm0, xmm0
movups xmmword [ebp - 0x20], xmm0
mov word [ebp - 0x20], bx
call fcn.0053b8b0
cdq
mov ecx, 0xfa00
idiv ecx
push 0x10
add edx, 0x3e8
mov dword [ebp - 0x1c], 0x100007f
mov ah, dl
mov al, dh
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push eax
push dword [esi]
call fcn.00438030
add esp, 0xc
test eax, eax
jne 0x4387b5
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebp + 0x10]
mov ebx, dword [ebp - 4]
lea eax, [ebp - 0x30]
push eax
push dword [esi + 0x60]
inc ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_connect]
push eax
call fcn.00539b90
mov edi, eax
add esp, 4
mov eax, dword [ebp - 0x10]
test edi, edi
jne 0x438740
jmp 0x43883c
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x438849
inc dword [0x5fe808]
mov dword [esi + 8], 1
cmp dword [ebp - 8], 0
je 0x438913
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x43886a
call fcn.0053fcd2
mov eax, dword [eax]
mov esi, dword [esi]
push 0x5fe820
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], 1
call fcn.00427d70
mov eax, dword [0x5fe84c]
push 0x5fe820
mov ebx, dword [eax + esi*4]
call fcn.00427d80
add esp, 8
test byte [ebx + 0x58], 1
je 0x4388ef
push 0x5fe820
call fcn.00427d70
mov eax, dword [0x5fe84c]
push 0x5fe820
mov esi, dword [eax + esi*4]
call fcn.00427d80
add esp, 8
lea eax, [ebp + 0x10]
push eax
push 0x8004667e
push dword [esi + 0x60]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
call fcn.00539b90
add esp, 4
test eax, eax
je 0x4388ef
push str.failed_ioctl_FIOBIO_:__m
push 0x360003
call fcn.00422d60
add esp, 8
jmp 0x4388f6
or dword [ebx + 0x58], 0x80
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28f0]
test eax, eax
jne 0x43890e
call fcn.0053fcd2
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret