Function at 0x40fb40
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44df3d
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x463040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40], ecx
push 1
push 0
push 0
push 6
push 1
push 2
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0x463bbc
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
lea ecx, [ebp - 0x18]
cmp edi, 0xffffffff
sete dl
call fcn.0040ee00
or eax, 0xffffffff
cmp edi, eax
cmove edi, eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 4], 0
cmp edi, eax
jne 0x40fc1b
cmp dword [ebp - 0x18], 0
jne 0x410051
mov ebx, dword fs:[0x2c]
mov eax, dword [0x46864c]
mov dword [ebp - 0x1c], 1
mov ecx, dword [ebx]
cmp eax, dword [ecx + 4]
jle 0x40fc0b
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], 0xffffffff
jne 0x40fc0b
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
mov dword [ebp - 0x18], 0x2719
mov dword [ebp - 0x14], 0x463bd4
jmp 0x40fc4a
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.0040ee00
mov ebx, dword fs:[0x2c]
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0x10
mov eax, 2
movlpd qword [ebp - 0x2c], xmm0
push 0x7f000001
mov word [ebp - 0x34], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x34]
xor eax, eax
mov ecx, edi
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x18]
push eax
push 0x10
call fcn.0040ee70
add esp, 8
cmp eax, 0xffffffff
jne 0x40fc98
cmp dword [ebp - 0x18], 0
jne 0x410051
cmp edi, 0xffffffff
jne 0x40fcec
mov ecx, dword [ebx]
mov eax, dword [0x46864c]
cmp eax, dword [ecx + 4]
jle 0x40fcdb
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], edi
jne 0x40fcdb
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x14], 0x463bd4
mov dword [ebp - 0x18], eax
jmp 0x40fd1f
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x10
push eax
lea eax, [ebp - 0x34]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov esi, eax
lea ecx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
test esi, esi
mov dword [ebp - 0x3c], eax
setne dl
call fcn.0040ee00
cmp esi, 0xffffffff
jne 0x40fd27
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x410051
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push 0
call esi
cmp dword [ebp - 0x30], eax
jne 0x40fd40
push 0x7f000001
call esi
mov dword [ebp - 0x30], eax
cmp edi, 0xffffffff
jne 0x40fd94
mov ecx, dword [ebx]
mov eax, dword [0x46864c]
cmp eax, dword [ecx + 4]
jle 0x40fd83
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], edi
jne 0x40fd83
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x14], 0x463bd4
mov dword [ebp - 0x18], eax
jmp 0x40fdb7
push closesocket
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov esi, eax
lea ecx, [ebp - 0x18]
test esi, esi
setne dl
call fcn.0040ee00
cmp esi, 0xffffffff
jne 0x40fdbf
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x410051
push 1
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
lea ecx, [ebp - 0x18]
cmp ebx, 0xffffffff
sete dl
call fcn.0040ee00
cmp ebx, 0xffffffff
mov eax, 0xffffffff
cmove ebx, eax
mov dword [ebp - 0x20], ebx
mov byte [ebp - 4], 1
cmp ebx, eax
jne 0x40fe01
cmp dword [ebp - 0x18], 0
jne 0x41005e
lea eax, [ebp - 0x18]
mov ecx, ebx
push eax
push dword [ebp - 0x3c]
lea edx, [ebp - 0x34]
call fcn.0040f0a0
add esp, 8
cmp eax, 0xffffffff
jne 0x40fe24
cmp dword [ebp - 0x18], 0
jne 0x41005e
cmp edi, 0xffffffff
jne 0x40fe80
mov edi, dword fs:[0x2c]
mov eax, dword [0x46864c]
mov ecx, dword [edi]
cmp eax, dword [ecx + 4]
jle 0x40fe6f
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], 0xffffffff
jne 0x40fe6f
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x14], 0x463bd4
or esi, 0xffffffff
jmp 0x40feb0
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
lea ecx, [ebp - 0x18]
cmp esi, 0xffffffff
sete dl
call fcn.0040ee00
mov edi, dword fs:[0x2c]
cmp esi, 0xffffffff
jne 0x40feae
mov eax, dword [ebp - 0x18]
or esi, esi
jmp 0x40feb3
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x3c], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x40fec7
test eax, eax
jne 0x41006b
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 1
push eax
lea eax, [ebp - 0x24]
mov byte [ebp - 0x35], 0
push eax
push ecx
lea edx, [ebp - 0x35]
mov ecx, ebx
call fcn.0040f430
add esp, 0xc
test eax, eax
je 0x40fef6
cmp dword [ebp - 0x18], 0
jne 0x41006b
mov dword [ebp - 0x1c], 1
cmp ebx, 0xffffffff
jne 0x40ff50
mov ecx, dword [edi]
mov eax, dword [0x46864c]
cmp eax, dword [ecx + 4]
jle 0x40ff40
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], ebx
jne 0x40ff40
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
mov dword [ebp - 0x18], 0x2719
mov dword [ebp - 0x14], 0x463bd4
jmp 0x40ff6e
push 4
lea eax, [ebp - 0x1c]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.0040ee00
lea eax, [ebp - 0x18]
mov dword [ebp - 0x24], 1
push eax
lea eax, [ebp - 0x24]
mov byte [ebp - 0x35], 0
push eax
push ecx
lea edx, [ebp - 0x35]
mov ecx, esi
call fcn.0040f430
add esp, 0xc
test eax, eax
je 0x40ff9d
cmp dword [ebp - 0x18], 0
jne 0x41006b
mov dword [ebp - 0x1c], 1
cmp esi, 0xffffffff
jne 0x40ffe9
mov ecx, dword [edi]
mov eax, dword [0x46864c]
cmp eax, dword [ecx + 4]
jle 0x410007
push 0x46864c
call fcn.00434878
add esp, 4
cmp dword [0x46864c], esi
jne 0x410007
push 0x4505c0
call fcn.00434812
add esp, 4
push 0x46864c
call fcn.00434827
add esp, 4
jmp 0x410007
push 4
lea eax, [ebp - 0x1c]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x18]
setne dl
call fcn.0040ee00
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x20], 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], ebx
call fcn.0040fae0
lea ecx, [ebp - 0x20]
call fcn.0040fae0
lea ecx, [ebp - 0x44]
call fcn.0040fae0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043435c
mov esp, ebp
pop ebp
ret
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.0040cbd0
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.0040cbd0
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x18]
call fcn.0040cbd0
int3