Function at 0x1000f520
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
test eax, eax
push ebx
push esi
push edi
mov esi, ecx
jge 0x1000f53e
pop edi
pop esi
mov eax, 0xfffffffc
pop ebx
add esp, 0x14
ret 0x10
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1000f54c
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ebx, dword [esp + 0x28]
mov eax, ebx
dec eax
je 0x1000f5b2
dec eax
je 0x1000f57a
dec eax
jne 0x1000f5cc
push 0xff
push 3
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
je 0x1000f5cc
mov dword [esi + 0x10], 3
jmp 0x1000f5cc
push 0
push 2
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
je 0x1000f5cc
lea ecx, [esp + 0x28]
push 4
push ecx
push 0x20
push 0xffff
push eax
mov dword [esi + 0x10], 2
mov dword [esp + 0x3c], 1
call sub.WS2_32.dll_setsockopt
jmp 0x1000f5cc
push 0
push 1
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
je 0x1000f5cc
mov dword [esi + 0x10], 1
mov eax, dword [esi + 0x10]
test eax, eax
jne 0x1000f5e1
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 0x14
ret 0x10
xor edi, edi
cmp ebx, 3
mov dword [esp + 0xc], 1
jne 0x1000f62a
mov eax, dword [esi + 0xc]
lea edx, [esp + 0xc]
push 4
push edx
push 2
push edi
push eax
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x1000f60d
mov edi, 0xfffffffa
test edi, edi
mov dword [esi + 0x14], 4
je 0x1000f659
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x14
ret 0x10
mov al, byte [esp + 0x2c]
test al, al
je 0x1000f649
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 4
push ecx
push 4
push 0xffff
push edx
call sub.WS2_32.dll_setsockopt
mov eax, ebx
dec eax
neg eax
sbb eax, eax
and eax, 2
add eax, 2
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x24]
mov word [esp + 0x10], 2
push eax
call sub.WS2_32.dll_htons
mov word [esp + 0x12], ax
mov eax, dword [esp + 0x30]
xor edi, edi
cmp eax, edi
je 0x1000f686
cmp byte [eax], 0
je 0x1000f686
push eax
call sub.WS2_32.dll_inet_addr
jmp 0x1000f68c
push edi
call sub.WS2_32.dll_htonl
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0x10]
push 0x10
push ecx
push edx
mov dword [esp + 0x20], eax
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x1000f6c2
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 8], eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
pop edi
pop esi
mov eax, 0xfffffffb
pop ebx
add esp, 0x14
ret 0x10
cmp ebx, 1
jne 0x1000f6f4
mov ecx, dword [esi + 0xc]
push 5
push ecx
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x1000f6f4
call sub.WS2_32.dll_WSAGetLastError
mov edx, dword [esi]
mov ecx, esi
mov dword [esi + 8], eax
call dword [edx + 4]
pop edi
pop esi
mov eax, 0xfffffff8
pop ebx
add esp, 0x14
ret 0x10
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
jne 0x1000f70a
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 0x14
ret 0x10
lea ecx, [esp + 0x2c]
lea edx, [esi + 0x1c]
push ecx
push edx
push eax
mov dword [esp + 0x38], 0x10
mov word [esi + 0x1e], di
mov dword [esi + 0x20], edi
call sub.WS2_32.dll_getsockname
push 5
push 1
mov ecx, esi
call fcn.1000f0a0
mov ax, word [esi + 0x1e]
push eax
call sub.WS2_32.dll_ntohs
pop edi
pop esi
and eax, 0xffff
pop ebx
add esp, 0x14
ret 0x10