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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x55ca98]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x5c], 1
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], eax
test ebx, ebx
jne 0x47c499
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005091c5
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
mov dword [ebp - 0x54], 0x10
push esi
mov esi, dword [ebx + 0x7ccc]
push edi
movups xmmword [ebp - 0x2c], xmm0
movups xmmword [ebp - 0x1c], xmm0
movq qword [ebp - 0xc], xmm0
movups xmmword [ebp - 0x3c], xmm0
nop dword [eax]
test esi, esi
je 0x47c7af
mov al, byte [esi]
test al, al
je 0x47c7af
mov edi, esi
cmp al, 0x20
je 0x47c4dc
cmp al, 9
jne 0x47c4e2
mov al, byte [esi + 1]
inc esi
jmp 0x47c4d2
push 0x2c
mov ebx, esi
push esi
mov dword [ebp - 0x48], ebx
call sub.VCRUNTIME140.dll_strchr
mov esi, eax
add esp, 8
test esi, esi
je 0x47c4ff
mov ecx, esi
sub ecx, edi
inc esi
jmp 0x47c510
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47c504
sub ecx, edx
lea esi, [edi + ecx]
lea eax, [ecx - 1]
test eax, eax
js 0x47c529
mov cl, byte [eax + ebx]
cmp cl, 0x20
je 0x47c524
cmp cl, 9
jne 0x47c529
sub eax, 1
jns 0x47c517
add eax, 1
mov dword [ebp - 0x44], eax
je 0x47c4c0
test esi, esi
je 0x47c7af
inc dword [ebp - 0x4c]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0047a200
add esp, 0xc
test eax, eax
je 0x47c4c0
mov edi, dword [ebp - 0x58]
xor ecx, ecx
cmp edi, 0x63
mov eax, 6
cmove eax, ecx
push eax
movzx eax, word [ebp - 0x28]
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x2c], eax
cmp eax, 0xffffffff
je 0x47c4c0
push 4
lea ecx, [ebp - 0x5c]
push ecx
push 0xfffffffffffffffb
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp edi, 4
jg 0x47c6b9
cmp word [ebp - 0x28], 2
jne 0x47c6b9
push 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x54], 0x10
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x47c604
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push str.cannot_bind_to__.s:__d___s_
push 0x3e7d
push str.set_ports_option
push dword [ebp - 0x40]
push 0
call fcn.0040d4d0
add esp, 0x24
jmp 0x47c6b9
mov ebx, dword [ebp - 0x40]
push 0xa
push 0
mov edi, dword [ebx + 0x7ce8]
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
cmp eax, 1
jl 0x47c78a
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x47c66d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push str.cannot_listen_to__.s:__d___s_
push 0x3ec1
push str.set_ports_option
push ebx
push 0
call fcn.0040d4d0
add esp, 0x24
jmp 0x47c6b9
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x47c74d
mov ax, word [ebp - 0x3c]
cmp ax, word [ebp - 0x28]
jne 0x47c74d
mov ax, word [ebp - 0x3a]
mov word [ebp - 0x26], ax
mov eax, dword [ebx + 0xc]
inc eax
lea eax, [eax + eax*4]
shl eax, 3
push eax
push dword [ebx + 4]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov edi, eax
add esp, 8
test edi, edi
jne 0x47c6ce
push dword [ebp - 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x2c], 0xffffffff
jmp 0x47c4c0
mov eax, dword [ebx + 0xc]
lea eax, [eax*8 + 8]
push eax
push dword [ebx + 8]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x47c70a
push dword [ebp - 0x2c]
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
mov dword [ebp - 0x2c], 0xffffffff
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x47c4c0
push 0
push 1
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov ecx, dword [ebp - 0x40]
movups xmm0, xmmword [ebp - 0x2c]
mov eax, dword [ecx + 0xc]
mov dword [ecx + 4], edi
lea eax, [eax + eax*4]
movups xmmword [edi + eax*8], xmm0
movups xmm0, xmmword [ebp - 0x1c]
movups xmmword [edi + eax*8 + 0x10], xmm0
movq xmm0, qword [ebp - 0xc]
movq qword [edi + eax*8 + 0x20], xmm0
inc dword [ecx + 0xc]
inc dword [ebp - 0x50]
mov dword [ecx + 8], ebx
jmp 0x47c4c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
push eax
push edi
push dword [ebp - 0x48]
push dword [ebp - 0x44]
push str.call_to_getsockname_failed__.s:__d___s_
push 0x3ed0
push str.set_ports_option
push ebx
push 0
call fcn.0040d4d0
add esp, 0x28
jmp 0x47c6b9
push edi
push str.listen_backlog
push str._s_value___s__is_invalid
push 0x3eb4
push str.set_ports_option
push ebx
push 0
call fcn.0040d4d0
add esp, 0x1c
jmp 0x47c6b9
mov ecx, dword [ebp - 0x50]
pop edi
pop esi
cmp ecx, dword [ebp - 0x4c]
je 0x47c7c6
push dword [ebp - 0x40]
call fcn.00473c00
add esp, 4
xor ecx, ecx
mov eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.005091c5
mov esp, ebp
pop ebp
ret