Function at 0x40f550
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 0x47e22d
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x49d140]
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 - 0x28], 0
mov dword [ebp - 0x24], 0x49dbf8
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
lea ecx, [ebp - 0x28]
cmp edi, 0xffffffff
sete dl
call fcn.0040e5f0
or eax, 0xffffffff
cmp edi, eax
cmove edi, eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 4], 0
cmp edi, eax
jne 0x40f62b
cmp dword [ebp - 0x28], 0
jne 0x40fa61
mov ebx, dword fs:[0x2c]
mov eax, dword [0x4a2a0c]
mov dword [ebp - 0x34], 1
mov ecx, dword [ebx]
cmp eax, dword [ecx + 4]
jle 0x40f61b
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], 0xffffffff
jne 0x40f61b
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov dword [ebp - 0x28], 0x2719
mov dword [ebp - 0x24], 0x49dc28
jmp 0x40f65a
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x28]
setne dl
call fcn.0040e5f0
mov ebx, dword fs:[0x2c]
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0x10
mov eax, 2
movlpd qword [ebp - 0x18], xmm0
push 0x7f000001
mov word [ebp - 0x20], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x1c], eax
lea edx, [ebp - 0x20]
xor eax, eax
mov ecx, edi
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x28]
push eax
push 0x10
call fcn.0040e660
add esp, 8
cmp eax, 0xffffffff
jne 0x40f6a8
cmp dword [ebp - 0x28], 0
jne 0x40fa61
cmp edi, 0xffffffff
jne 0x40f6fc
mov ecx, dword [ebx]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x40f6eb
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], edi
jne 0x40f6eb
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x24], 0x49dc28
mov dword [ebp - 0x28], eax
jmp 0x40f72f
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x10
push eax
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov esi, eax
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x30]
test esi, esi
mov dword [ebp - 0x30], eax
setne dl
call fcn.0040e5f0
cmp esi, 0xffffffff
jne 0x40f737
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40fa61
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push 0
call esi
cmp dword [ebp - 0x1c], eax
jne 0x40f750
push 0x7f000001
call esi
mov dword [ebp - 0x1c], eax
cmp edi, 0xffffffff
jne 0x40f7a4
mov ecx, dword [ebx]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x40f793
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], edi
jne 0x40f793
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x24], 0x49dc28
mov dword [ebp - 0x28], eax
jmp 0x40f7c7
push bind
push edi
call dword [sym.imp.WS2_32.dll_listen]
mov esi, eax
lea ecx, [ebp - 0x28]
test esi, esi
setne dl
call fcn.0040e5f0
cmp esi, 0xffffffff
jne 0x40f7cf
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40fa61
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 - 0x28]
cmp ebx, 0xffffffff
sete dl
call fcn.0040e5f0
cmp ebx, 0xffffffff
mov eax, 0xffffffff
cmove ebx, eax
mov dword [ebp - 0x3c], ebx
mov byte [ebp - 4], 1
cmp ebx, eax
jne 0x40f811
cmp dword [ebp - 0x28], 0
jne 0x40fa6e
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
push dword [ebp - 0x30]
lea edx, [ebp - 0x20]
call fcn.0040e870
add esp, 8
cmp eax, 0xffffffff
jne 0x40f834
cmp dword [ebp - 0x28], 0
jne 0x40fa6e
cmp edi, 0xffffffff
jne 0x40f890
mov edi, dword fs:[0x2c]
mov eax, dword [0x4a2a0c]
mov ecx, dword [edi]
cmp eax, dword [ecx + 4]
jle 0x40f87f
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], 0xffffffff
jne 0x40f87f
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov eax, 0x2719
mov dword [ebp - 0x24], 0x49dc28
or esi, 0xffffffff
jmp 0x40f8c0
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
lea ecx, [ebp - 0x28]
cmp esi, 0xffffffff
sete dl
call fcn.0040e5f0
mov edi, dword fs:[0x2c]
cmp esi, 0xffffffff
jne 0x40f8be
mov eax, dword [ebp - 0x28]
or esi, esi
jmp 0x40f8c3
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 2
cmp esi, 0xffffffff
jne 0x40f8d7
test eax, eax
jne 0x40fa7b
lea eax, [ebp - 0x28]
mov dword [ebp - 0x38], 1
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 0x29], 0
push eax
push ecx
lea edx, [ebp - 0x29]
mov ecx, ebx
call fcn.0040ee60
add esp, 0xc
test eax, eax
je 0x40f906
cmp dword [ebp - 0x28], 0
jne 0x40fa7b
mov dword [ebp - 0x34], 1
cmp ebx, 0xffffffff
jne 0x40f960
mov ecx, dword [edi]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x40f950
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], ebx
jne 0x40f950
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
mov dword [ebp - 0x28], 0x2719
mov dword [ebp - 0x24], 0x49dc28
jmp 0x40f97e
push 4
lea eax, [ebp - 0x34]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x28]
setne dl
call fcn.0040e5f0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x38], 1
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 0x29], 0
push eax
push ecx
lea edx, [ebp - 0x29]
mov ecx, esi
call fcn.0040ee60
add esp, 0xc
test eax, eax
je 0x40f9ad
cmp dword [ebp - 0x28], 0
jne 0x40fa7b
mov dword [ebp - 0x34], 1
cmp esi, 0xffffffff
jne 0x40f9f9
mov ecx, dword [edi]
mov eax, dword [0x4a2a0c]
cmp eax, dword [ecx + 4]
jle 0x40fa17
push 0x4a2a0c
call fcn.004584c4
add esp, 4
cmp dword [0x4a2a0c], esi
jne 0x40fa17
push 0x484d10
call fcn.00458aa9
add esp, 4
push 0x4a2a0c
call fcn.00458473
add esp, 4
jmp 0x40fa17
push 4
lea eax, [ebp - 0x34]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
lea ecx, [ebp - 0x28]
setne dl
call fcn.0040e5f0
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x3c], 0xffffffff
mov dword [eax], esi
mov dword [eax + 4], ebx
call fcn.0040f510
lea ecx, [ebp - 0x3c]
call fcn.0040f510
lea ecx, [ebp - 0x44]
call fcn.0040f510
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.00458460
mov esp, ebp
pop ebp
ret
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x28]
call fcn.0040c570
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x28]
call fcn.0040c570
mov edx, str.socket_select_interrupter
lea ecx, [ebp - 0x28]
call fcn.0040c570
int3