Function at 0x10018ef0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
xor esi, esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, dword [0x1003c9a0]
cmp eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
mov dword [edi], 0xffffffff
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 1
jne 0x10018f50
push esi
call fcn.10018ce0
mov dword [0x1003c9a0], eax
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x24]
push edx
push esi
push ecx
call eax
mov ebx, dword [sym.imp.WS2_32.dll_WSASetLastError]
mov esi, eax
push esi
call ebx
test esi, esi
jne 0x10018fbf
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x10018fd2
mov eax, dword [0x1003c9a0]
test eax, eax
jne 0x10018f8b
push eax
call fcn.10018ce0
mov dword [0x1003c9a0], eax
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x24]
push ecx
push 0
push esi
call eax
mov esi, eax
push esi
call ebx
test esi, esi
je 0x10018fd2
mov eax, dword [0x1003c9a4]
test eax, eax
mov edi, dword [esp + 0x14]
jne 0x10018fbc
push 2
call fcn.10018ce0
mov dword [0x1003c9a4], eax
push edi
call eax
call fcn.1001e4a1
mov dword [eax], esi
mov eax, 0xf
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
test eax, eax
mov ebx, eax
je 0x100190fd
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [edi], eax
je 0x100190ee
mov ecx, dword [ebx + 4]
cmp ecx, 2
je 0x1001900e
cmp ecx, 0x17
jne 0x100190e1
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp + 0x10], 0
mov ecx, dword [ebx + 0x18]
mov word [ecx + 2], ax
je 0x10019054
mov esi, dword [esp + 0x18]
test esi, esi
je 0x1001904c
lea ecx, [ecx]
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x18]
mov ecx, dword [edi]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x10019054
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x10019030
mov edx, dword [edi]
push edx
jmp 0x100190e2
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x18]
mov edx, dword [edi]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [esp + 0x10], eax
call fcn.1001e4a1
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
mov esi, dword [esp + 0x10]
test esi, esi
je 0x100190c0
call fcn.1001e4a1
cmp dword [eax], 0x2734
je 0x1001909a
call fcn.1001e4a1
cmp dword [eax], 0x2733
jne 0x100190df
test esi, esi
jge 0x100190c0
call fcn.1001e4a1
cmp dword [eax], 0x2734
je 0x100190b8
call fcn.1001e4a1
cmp dword [eax], 0x2733
jne 0x100190c0
mov dword [esp + 0x10], 0xffffffff
mov edx, dword [edi]
lea ecx, [esp + 0x1c]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x28], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x100190f9
mov eax, dword [edi]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x10018fe0
mov eax, dword [esp + 0x14]
mov esi, eax
mov eax, dword [0x1003c9a4]
test eax, eax
jne 0x10019114
push 2
call fcn.10018ce0
mov dword [0x1003c9a4], eax
push esi
call eax
cmp dword [ebp + 0x10], 0
je 0x10019139
mov eax, dword [0x1003c9a4]
test eax, eax
mov esi, dword [esp + 0x18]
jne 0x10019136
push 2
call fcn.10018ce0
mov dword [0x1003c9a4], eax
push esi
call eax
test ebx, ebx
mov eax, 0xe
je 0x10019146
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret