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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x528
cmp dword [ebp + 8], 0xffffffff
je 0x1000d192
mov eax, dword [ebp + 0xc]
push eax
call fcn.1000ef40
add esp, 4
test eax, eax
jbe 0x1000d192
cmp dword [ebp + 0x14], 0
jge 0x1000d19c
mov eax, 0xfffffffe
jmp 0x1000d39d
mov word [ebp - 0x10], 2
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0xc], eax
mov dx, word [ebp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
mov dword [ebp - 0x18], 0
cmp dword [ebp + 0x14], 0
jne 0x1000d1d4
mov dword [ebp - 0x14], 0x2dc6c0
jmp 0x1000d1e0
mov eax, dword [ebp + 0x14]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 1
lea ecx, [ebp - 0x1c]
push ecx
push 0x8004667e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000d207
or eax, 0xffffffff
jmp 0x1000d39d
push 0x10
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000d377
mov dword [ebp - 0x524], 4
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x528], 0
jmp 0x1000d24f
mov edx, dword [ebp - 0x528]
add edx, 1
mov dword [ebp - 0x528], edx
mov eax, dword [ebp - 0x528]
cmp eax, dword [ebp - 0x120]
jae 0x1000d273
mov ecx, dword [ebp - 0x528]
mov edx, dword [ebp + ecx*4 - 0x11c]
cmp edx, dword [ebp + 8]
jne 0x1000d271
jmp 0x1000d273
jmp 0x1000d240
mov eax, dword [ebp - 0x528]
cmp eax, dword [ebp - 0x120]
jne 0x1000d2a9
cmp dword [ebp - 0x120], 0x40
jae 0x1000d2a9
mov ecx, dword [ebp - 0x528]
mov edx, dword [ebp + 8]
mov dword [ebp + ecx*4 - 0x11c], edx
mov eax, dword [ebp - 0x120]
add eax, 1
mov dword [ebp - 0x120], eax
xor ecx, ecx
test ecx, ecx
jne 0x1000d234
lea edx, [ebp - 0x18]
push edx
push 0
lea eax, [ebp - 0x120]
push eax
push 0
mov ecx, dword [ebp + 8]
add ecx, 1
push ecx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x1000d34c
lea edx, [ebp - 0x524]
push edx
lea eax, [ebp - 0x520]
push eax
push 0x1007
push 0xffff
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_getsockopt]
lea edx, [ebp - 0x520]
test edx, edx
jne 0x1000d324
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000d31f
or eax, 0xffffffff
jmp 0x1000d39d
or eax, 0xffffffff
jmp 0x1000d39d
mov dword [ebp - 0x1c], 0
lea edx, [ebp - 0x1c]
push edx
push 0x8004667e
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000d348
or eax, 0xffffffff
jmp 0x1000d39d
xor eax, eax
jmp 0x1000d39d
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x1c]
push ecx
push 0x8004667e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000d370
or eax, 0xffffffff
jmp 0x1000d39d
mov eax, 0xfffffffd
jmp 0x1000d39d
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x1c]
push eax
push 0x8004667e
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1000d39b
or eax, 0xffffffff
jmp 0x1000d39d
xor eax, eax
mov esp, ebp
pop ebp
ret