Function at 0x1000d677
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x26c
push ebx
push esi
mov esi, dword [esp + 0x278]
xor ebx, ebx
test esi, esi
je 0x1000da13
push edi
mov edi, dword [esp + 0x284]
push 2
pop ecx
push 0x17
pop eax
test edi, 0x10000000
je 0x1000d6b9
and edi, 0xefffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x284], edi
jmp 0x1000d6bf
mov eax, ecx
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x1000d6cb
inc edi
mov dword [esp + 0x284], edi
push ebp
push 0
push edi
push eax
call dword [sym.imp.WSOCK32.DLL_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x1000da11
push 0x17
pop ecx
cmp dword [esp + 0x18], ecx
jne 0x1000d755
cmp dword [0x1003ffc0], ebx
je 0x1000da0a
lea eax, [esp + 0x64]
push eax
push esi
push ecx
call fcn.1000d5b4
add esp, 0xc
test eax, eax
jg 0x1000d74b
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push esi
call dword [0x1003ffcc]
test eax, eax
jne 0x1000da0a
mov eax, dword [esp + 0x1c]
lea edi, [esp + 0x64]
push eax
mov esi, dword [eax + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [0x1003ffd0]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x288]
mov dword [esp + 0x10], eax
jmp 0x1000d793
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x1000d793
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
mov ecx, eax
mov dword [esp + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x1000d783
push esi
call dword [sym.imp.WSOCK32.DLL_gethostbyname]
test eax, eax
je 0x1000d77f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
jmp 0x1000d783
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 0xffffffff
setne al
test eax, eax
je 0x1000da0a
mov esi, dword [esp + 0x290]
cmp dword [esp + 0x294], ebx
jne 0x1000d7ab
test esi, esi
je 0x1000d81c
cmp byte [esi], bl
je 0x1000d81c
push 0x10
lea eax, [esp + 0x24]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
mov word [esp + 0x20], ax
cmp dword [esp + 0x294], ebx
je 0x1000d7df
push dword [esp + 0x294]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x22], ax
test esi, esi
je 0x1000d802
cmp byte [esi], bl
je 0x1000d802
push esi
call fcn.10035780
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.DLL_inet_addr]
push esi
mov dword [esp + 0x28], eax
call fcn.10035770
jmp 0x1000d806
and dword [esp + 0x24], ebx
push 0x10
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x1000da0a
xor eax, eax
inc eax
cmp edi, eax
jne 0x1000d9bd
mov esi, dword [esp + 0x18]
push 0x17
pop edi
cmp esi, edi
jne 0x1000d86c
push 0x1c
lea eax, [esp + 0x4c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov word [esp + 0x48], di
push dword [esp + 0x284]
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x4a], ax
lea esi, [esp + 0x64]
lea edi, [esp + 0x50]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x18]
jmp 0x1000d89f
push 0x10
lea eax, [esp + 0x34]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 2
pop eax
push dword [esp + 0x284]
mov word [esp + 0x34], ax
call dword [sym.imp.WSOCK32.DLL_htons]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x34], eax
mov edi, dword [esp + 0x28c]
test edi, edi
jle 0x1000d977
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 1
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x1000da0a
cmp esi, 0x17
jne 0x1000d8dc
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x1000d8e2
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x1000da0a
mov eax, edi
mov dword [esp + 0x78], ebp
cdq
mov ecx, 0x3e8
idiv ecx
xor esi, esi
mov dword [esp + 0x17c], ebp
mov dword [esp + 0x40], eax
inc esi
imul eax, eax, 0x3e8
mov dword [esp + 0x74], esi
mov dword [esp + 0x178], esi
sub edi, eax
imul eax, edi, 0x3e8
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x17c]
push eax
lea eax, [esp + 0x7c]
push eax
push 0
lea eax, [ebp + 1]
push eax
call dword [sym.imp.WSOCK32.DLL_select]
cmp eax, esi
jne 0x1000d95f
lea eax, [esp + 0x74]
push eax
push ebp
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
je 0x1000d95f
mov ebx, esi
and dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x1000d99c
cmp esi, 0x17
jne 0x1000d984
push 0x1c
lea eax, [esp + 0x4c]
jmp 0x1000d98a
push 0x10
lea eax, [esp + 0x34]
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x1000da0a
xor esi, esi
inc esi
mov ebx, esi
test ebx, ebx
je 0x1000da0a
push 0x10
push 0
push dword [0x1003fab8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x1000da0a
mov dword [ebx], esi
mov dword [ebx + 8], ebp
jmp 0x1000da04
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x1000da0a
push 0x20
push eax
push dword [0x1003fab8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x1000da0a
push 2
pop eax
mov dword [ebx], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x284]
mov dword [ebx + 0x10], ebp
mov dword [ebx + 8], eax
and dword [ebx + 0xc], 0
jmp 0x1000da11
push ebp
call dword [sym.imp.WSOCK32.DLL_closesocket]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x26c
ret 0x18