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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x178
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 4], 0xffffffff
xor edi, edi
sub eax, 1
je 0x4ac86c
sub eax, 1
je 0x4ac862
push 0x6cd5c8
push 0x800007f2
push str.c:_buildslave_steam_rel_client_hotfix_win32_build_srccommon_net.cpp
call fcn.00522050
add esp, 0xc
test al, al
jne 0x4ac874
int3
mov esi, 2
lea edi, [esi + 0xf]
jmp 0x4ac874
mov esi, 1
lea edi, [esi + 5]
mov ecx, dword [ebp + 0xc]
mov dl, byte [ebp + 0x18]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ecx]
mov dword [ebp - 0x44], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x40], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x14]
mov dword [ebp - 0x30], eax
test dl, dl
je 0x4ac8fa
test ebx, 0x800
je 0x4ac8fa
lea ecx, [ebp - 0x44]
call fcn.004bde40
test al, al
jne 0x4ac8ea
mov eax, 4
mov dword [ebp - 0x34], 0
mov word [ebp - 0x30], ax
mov eax, dword [0x6dd0c8]
mov dword [ebp - 0x44], eax
mov eax, dword [0x6dd0cc]
mov dword [ebp - 0x40], eax
mov eax, dword [0x6dd0d0]
mov dword [ebp - 0x3c], eax
mov eax, dword [0x6dd0d4]
mov dword [ebp - 0x38], eax
jmp 0x4ac8f7
cmp word [ebp - 0x30], 3
jne 0x4ac8f7
and ebx, 0xfffff7ff
mov dl, byte [ebp + 0x18]
mov eax, ebx
mov ecx, 2
and eax, 0x800
mov dword [ebp + 0x10], eax
je 0x4ac99b
mov ecx, 0x17
lea eax, [ebp - 4]
push eax
push 1
push edi
push esi
push ecx
call fcn.004db720
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4ac9fe
push esi
call fcn.004e5580
and dword [ebp - 0x28], 0xff0fffff
xor ecx, ecx
push esi
push eax
push str.CreateBoundSocket:_failed_to_create_socket__error__s___d__n
lea eax, [ebp - 0xc]
mov byte [ebp - 0x25], 0
and dword [ebp - 0x28], 0xfff00000
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x2c], 0
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x24], ecx
push eax
push 1
push 2
push 1
push 0xb
push ecx
push ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 3
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
call fcn.00450b00
add esp, 0x34
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test dl, dl
je 0x4ac914
mov eax, 4
cmp ax, word [ebp - 0x30]
jne 0x4ac914
push 0
push 0x30
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x44]
call fcn.004be980
push 0
push 0
lea ecx, [ebp - 0x2c]
call fcn.00457a50
lea ecx, [ebp - 0x78]
push ecx
push str.CreateBoundSocket:_asked_to_bind_to_local_v6_address___s___but_k_uNetFlagAllowIPv6_was_not_specified__n
lea ecx, [eax + 0x20]
push ecx
lea ecx, [eax + 8]
push ecx
push eax
push 1
push 2
push 1
push 0xb
push 0
push 0
call fcn.00450b00
add esp, 0x2c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x10], 0
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
je 0x4aca20
push 4
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
push 0x1b
push 0x29
push dword [ebp - 4]
call esi
cmp byte [ebp + 0x18], 0
je 0x4accbc
mov edi, dword [ebp + 0x14]
mov byte [ebp + 0x1b], 0
test edi, edi
je 0x4aca58
mov eax, dword [ebp - 0x44]
mov dword [edi], eax
mov eax, dword [ebp - 0x40]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x38]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x14], eax
test ebx, 0x400
je 0x4aca79
push 4
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 1
push eax
push 4
push 0xffff
push dword [ebp - 4]
call esi
movzx eax, word [ebp - 0x2e]
movzx edx, ax
mov dword [ebp - 0x48], eax
lea eax, [edx + 1]
movzx edi, ax
mov dword [ebp + 0x10], edi
test dx, dx
je 0x4acaaf
test bl, 2
je 0x4acaaf
lea eax, [edx + 0x190]
mov esi, 0xffff
cmp eax, esi
movzx ecx, ax
cmova ecx, esi
movzx edi, cx
mov dword [ebp + 0x10], edi
mov eax, edx
mov esi, edx
cmp ax, di
jae 0x4acb0d
jmp 0x4acac0
push 0x80
lea eax, [ebp - 0xf8]
mov word [ebp - 0x2e], si
push eax
lea ecx, [ebp - 0x44]
call fcn.004be6c0
push eax
lea eax, [ebp - 0xf8]
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4acc15
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
cmp edi, 0x2740
jne 0x4acb9d
mov edi, dword [ebp + 0x10]
inc esi
cmp si, di
jb 0x4acac0
mov al, byte [ebp + 0x1b]
xor ecx, ecx
cmp cx, si
je 0x4accbc
test al, al
jne 0x4accbc
push dword [ebp - 4]
call fcn.004db700
xor eax, eax
and dword [ebp - 0x28], 0xff0fffff
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
movzx eax, di
dec eax
mov byte [ebp - 0x25], 0
push eax
mov eax, dword [ebp - 0x48]
and dword [ebp - 0x28], 0xfff00000
movzx eax, ax
push eax
push str.CreateBoundSocket:_::bind_couldnt_find_an_open_port_between__u_and__u_n
lea eax, [ebp - 0xc]
mov dword [ebp - 0x2c], 0
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x10], 3
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push 2
push 1
push 0xb
push 0
push 0
call fcn.00450b00
add esp, 0x34
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.004e5580
push edi
push eax
and dword [ebp - 0x28], 0xff0fffff
xor ecx, ecx
movzx eax, si
push eax
push str.CreateBoundSocket:_::bind_to_port__d_returned_error__s__d__n
lea eax, [ebp - 0xc]
mov byte [ebp - 0x25], 0
and dword [ebp - 0x28], 0xfff00000
push eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x2c], 0
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x24], ecx
push eax
push 1
push 2
push 1
push 0xb
push ecx
push ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 3
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
call fcn.00450b00
push dword [ebp - 4]
call fcn.004db700
add esp, 0x3c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x14]
mov al, 1
mov byte [ebp + 0x1b], al
test edi, edi
je 0x4accb4
xor eax, eax
mov dword [ebp - 8], 3
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp + 0xc]
push eax
lea eax, [ebp - 0x178]
mov dword [ebp + 0xc], 0x80
push eax
push dword [ebp - 4]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4acc82
lea eax, [ebp - 6]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x178]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004be1d0
mov ax, word [ebp - 6]
mov word [edi + 0x16], ax
mov edi, dword [ebp + 0x10]
jmp 0x4acb0d
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.getsockname_failed_in_BGetBoundAddr_with_error:__d
push 0x69a
push str.c:_buildslave_steam_rel_client_hotfix_win32_build_srccommon_net.cpp
call fcn.00522070
add esp, 0x10
test al, al
jne 0x4acca4
int3
mov ax, word [ebp - 6]
mov word [edi + 0x16], ax
mov edi, dword [ebp + 0x10]
jmp 0x4acb0d
mov edi, dword [ebp + 0x10]
jmp 0x4acb10
mov esi, dword [ebp + 8]
test bl, 1
jne 0x4accdd
cmp esi, 2
mov ecx, 0x7bd5d0
sete al
movzx eax, al
push eax
push 1
push dword [ebp - 4]
call fcn.004df300
push ebx
push esi
push dword [ebp - 4]
call fcn.004ae350
add esp, 0xc
test eax, eax
je 0x4acd0b
push eax
push str.Unable_to_set_default_socket_options__error__d
push 0x890
push str.c:_buildslave_steam_rel_client_hotfix_win32_build_srccommon_net.cpp
call fcn.00522070
add esp, 0x10
test al, al
jne 0x4acd0b
int3
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret