Function at 0x40fa20
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x68], 0
push esi
push edi
test ebx, ebx
jne 0x40fa64
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x48]
xorps xmm0, xmm0
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x34], 0x10
movups xmmword [ebp - 0x20], xmm0
movq qword [ebp - 0x10], xmm0
movups xmmword [ebp - 0x58], xmm0
test esi, esi
je 0x40fed3
mov al, byte [esi]
test al, al
je 0x40fed3
mov edi, esi
cmp al, 0x20
je 0x40fa9e
cmp al, 9
jne 0x40faa4
mov al, byte [esi + 1]
inc esi
jmp 0x40fa94
push 0x2c
mov ebx, esi
push esi
mov dword [ebp - 0x6c], ebx
call fcn.004248a0
mov esi, eax
add esp, 8
test esi, esi
je 0x40fac1
mov ecx, esi
sub ecx, edi
inc esi
jmp 0x40fad2
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40fac6
sub ecx, edx
lea esi, [edi + ecx]
add ecx, 0xffffffff
js 0x40fae7
mov al, byte [ebx + ecx]
cmp al, 0x20
je 0x40fae2
cmp al, 9
jne 0x40fae7
sub ecx, 1
jns 0x40fad7
lea ebx, [ecx + 1]
test ebx, ebx
je 0x40fa82
test esi, esi
je 0x40fed3
mov edi, dword [ebp - 0x6c]
xorps xmm0, xmm0
inc dword [ebp - 0x64]
mov eax, 2
movups xmmword [ebp - 0x30], xmm0
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 8]
movq qword [ebp - 0x10], xmm0
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x38]
push eax
push str._u._u._u._u:_u_n
push edi
movups xmmword [ebp - 0x20], xmm0
call fcn.004058e0
add esp, 0x20
cmp eax, 5
jne 0x40fb61
mov eax, dword [ebp - 0x38]
shl eax, 8
or eax, dword [ebp - 0x3c]
shl eax, 8
or eax, dword [ebp - 0x40]
shl eax, 8
or eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x28], eax
jmp 0x40fb7c
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 8]
push eax
push str._u_n
push edi
call fcn.004058e0
add esp, 0x10
cmp eax, 1
jne 0x40fb9d
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2a], ax
mov eax, dword [ebp - 0x5c]
test eax, eax
jns 0x40fb98
cmp eax, ebx
ja 0x40feaa
mov ecx, dword [ebp - 8]
jmp 0x40fba7
xor ecx, ecx
xor eax, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0x5c], eax
mov al, byte [edi + eax]
cmp al, 0x73
sete dl
cmp al, 0x72
mov byte [ebp - 0xc], dl
sete byte [ebp - 0xb]
cmp ecx, 0xffff
jae 0x40feaa
test al, al
je 0x40fbd8
cmp al, 0x73
je 0x40fbd8
cmp al, 0x72
je 0x40fbd8
cmp al, 0x2c
jne 0x40feaa
test dl, dl
je 0x40fc04
mov eax, dword [ebp - 0x60]
cmp dword [eax + 4], 0
jne 0x40fc04
push dword [ebp - 0x64]
mov dword [0x456bd0], eax
push str.Cannot_add_SSL_socket__entry__i_._Is__ssl_certificate_option_set_
push 0x456960
call fcn.004064e0
add esp, 0xc
jmp 0x40fa82
movzx eax, word [ebp - 0x2c]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x40fc3d
push dword [ebp - 0x64]
mov eax, dword [ebp - 0x60]
push str.cannot_create_socket__entry__i_
push 0x456960
mov dword [0x456bd0], eax
call fcn.004064e0
add esp, 0xc
jmp 0x40fa82
push 4
lea ecx, [ebp - 0x48]
push ecx
push 0xfffffffffffffffb
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x40fc72
push dword [ebp - 0x64]
mov eax, dword [ebp - 0x60]
push str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE__entry__i_
push 0x456960
mov dword [0x456bd0], eax
call fcn.004064e0
add esp, 0xc
cmp word [ebp - 0x2c], 2
jne 0x40fe88
push 0x10
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x34], 0x10
push eax
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x40fccf
mov eax, dword [ebp - 0x60]
mov dword [0x456bd0], eax
call fcn.0042df10
push dword [eax]
call fcn.00433516
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push ebx
push str.cannot_bind_to__.s:__d___s_
push 0x456960
call fcn.004064e0
add esp, 0x18
jmp 0x40fda9
push closesocket
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x40fd19
mov eax, dword [ebp - 0x60]
mov dword [0x456bd0], eax
call fcn.0042df10
push dword [eax]
call fcn.00433516
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push ebx
push str.cannot_listen_to__.s:__d___s_
push 0x456960
call fcn.004064e0
add esp, 0x18
jmp 0x40fda9
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40fd67
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebp - 0x60]
mov dword [0x456bd0], eax
call fcn.0042df10
push dword [eax]
call fcn.00433516
add esp, 4
push eax
push edi
push dword [ebp - 0x6c]
push ebx
push str.call_to_getsockname_failed__.s:__d___s_
push 0x456960
call fcn.004064e0
add esp, 0x18
jmp 0x40fda9
mov ebx, dword [ebp - 0x60]
mov eax, dword [ebx + 0xdc]
inc eax
lea eax, [eax + eax*4]
shl eax, 3
push eax
push dword [ebx + 0xd4]
call fcn.0042b3ae
mov edi, eax
add esp, 8
test edi, edi
jne 0x40fdbe
push str.Out_of_memory
push 0x44c068
push 0x456960
mov dword [0x456bd0], ebx
call fcn.004064e0
add esp, 0xc
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x30], 0xffffffff
jmp 0x40fa82
mov eax, dword [ebx + 0xdc]
lea eax, [eax*2 + 2]
push eax
push dword [ebx + 0xd8]
call fcn.0042b3ae
mov ebx, eax
add esp, 8
mov eax, dword [ebp - 0x60]
mov dword [0x456bd0], eax
test ebx, ebx
jne 0x40fe1d
push str.Out_of_memory
push 0x44c068
push 0x456960
call fcn.004064e0
add esp, 0xc
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
mov dword [ebp - 0x30], 0xffffffff
call fcn.00425f00
add esp, 4
jmp 0x40fa82
push 0
push 1
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov ecx, dword [ebp - 0x60]
movups xmm0, xmmword [ebp - 0x30]
mov eax, dword [ecx + 0xdc]
mov dword [ecx + 0xd4], edi
lea eax, [eax + eax*4]
movups xmmword [edi + eax*8], xmm0
movups xmm0, xmmword [ebp - 0x20]
movups xmmword [edi + eax*8 + 0x10], xmm0
movq xmm0, qword [ebp - 0x10]
movq qword [edi + eax*8 + 0x20], xmm0
push dword [ebp - 0x56]
mov dword [ecx + 0xd8], ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, dword [ebp - 0x60]
mov edx, dword [ebx + 0xdc]
mov ecx, dword [ebx + 0xd8]
mov word [ecx + edx*2], ax
inc dword [ebx + 0xdc]
inc dword [ebp - 0x68]
jmp 0x40fa82
push dword [ebp - 0x64]
mov eax, dword [ebp - 0x60]
push str.cannot_bind:_address_family_not_supported__entry__i_
push 0x456960
mov dword [0x456bd0], eax
call fcn.004064e0
add esp, 0xc
jmp 0x40fa82
mov eax, dword [ebp - 0x60]
push str._IP_ADDRESS:_PORT_sr_
push dword [ebp - 0x64]
mov dword [0x456bd0], eax
push edi
push ebx
push str._.s:_invalid_port_spec__entry__i_._Expecting_list_of:__s
push 0x456960
call fcn.004064e0
add esp, 0x18
jmp 0x40fa82
mov ecx, dword [ebp - 0x68]
cmp ecx, dword [ebp - 0x64]
je 0x40fee5
mov ecx, dword [ebp - 0x60]
call fcn.0040f9a0
xor ecx, ecx
mov eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret