Function at 0x10125800
Capabilities:
Get local ipv4 addresses
Get socket information
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x103573d4
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x618
mov eax, dword [0x103fbc90]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x4b0], ecx
call fcn.10065830
test eax, eax
je 0x10125860
call fcn.10065830
mov dword [ebp - 0x580], eax
push 5
mov ecx, dword [ebp - 0x580]
call fcn.100783d0
movzx eax, al
test eax, eax
jne 0x10125865
jmp 0x101258fc
push 0
push 0
push 0x10363ef5
push 0x67
push 0x10363fe0
push 5
lea ecx, [ebp - 0x2ac]
call fcn.10070940
mov dword [ebp - 0x588], eax
mov ecx, dword [ebp - 0x588]
mov dword [ebp - 0x58c], ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x58c]
call fcn.1006e8c0
mov dword [ebp - 0x590], eax
push str.Listening_on_port
mov ecx, dword [ebp - 0x590]
call fcn.1005ec90
mov dword [ebp - 0x594], eax
lea edx, [ebp + 8]
push edx
mov ecx, dword [ebp - 0x594]
call fcn.10085eb0
mov dword [ebp - 0x598], eax
mov eax, dword [ebp - 0x598]
push eax
call fcn.10065830
mov ecx, eax
call fcn.100732a0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2ac]
call fcn.10072330
xor ecx, ecx
mov dword [ebp - 0x5b8], ecx
mov dword [ebp - 0x5b4], ecx
mov dword [ebp - 0x5b0], ecx
mov dword [ebp - 0x5ac], ecx
mov dword [ebp - 0x5a8], ecx
mov dword [ebp - 0x5a4], ecx
mov dword [ebp - 0x5a0], ecx
mov dword [ebp - 0x59c], ecx
mov dword [ebp - 0x5b4], 0
mov dword [ebp - 0x5b0], 1
mov dword [ebp - 0x5ac], 6
mov dword [ebp - 0x5b8], 9
mov dword [ebp - 0x4bc], 0
movzx edx, word [ebp + 8]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.100ae390
add esp, 8
mov dword [ebp - 0x4c4], eax
lea ecx, [ebp - 0x4bc]
push ecx
lea edx, [ebp - 0x5b8]
push edx
mov ecx, dword [ebp - 0x4c4]
call fcn.1004e7c0
push eax
push 0
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x4c8], eax
lea ecx, [ebp - 0x2c]
call fcn.1004e8e0
cmp dword [ebp - 0x4c8], 0
je 0x101259d1
push str.Resolution_failed_for_local_address
lea ecx, [ebp - 0x604]
call fcn.10070e00
push 0x103cffd0
lea eax, [ebp - 0x604]
push eax
call fcn.103171fa
mov dword [ebp - 4], 1
push 0x17
mov ecx, dword [ebp - 0x4bc]
push ecx
mov ecx, 0x103641f7
call fcn.101260e0
mov dword [ebp - 0x4cc], eax
mov edx, dword [ebp - 0x4cc]
mov dword [ebp - 0x4b8], edx
cmp dword [ebp - 0x4b8], 0
jne 0x10125a55
push 2
mov eax, dword [ebp - 0x4bc]
push eax
mov ecx, 0x103641f7
call fcn.101260e0
mov dword [ebp - 0x4d0], eax
mov ecx, dword [ebp - 0x4d0]
mov dword [ebp - 0x4b8], ecx
cmp dword [ebp - 0x4b8], 0
jne 0x10125a55
push str.No_suitable_address_family_found
lea ecx, [ebp - 0x610]
call fcn.10070e00
push 0x103cffd0
lea edx, [ebp - 0x610]
push edx
call fcn.103171fa
mov eax, dword [ebp - 0x4b0]
add eax, 8
push eax
lea ecx, [ebp - 0x5c8]
call fcn.1006fc30
mov dword [ebp - 0x5bc], eax
mov byte [ebp - 4], 2
call fcn.10065830
mov dword [ebp - 0x4d4], eax
cmp dword [ebp - 0x4d4], 0
je 0x10125abd
call fcn.10065830
mov dword [ebp - 0x4d8], eax
mov ecx, dword [ebp - 0x4d8]
mov dword [ebp - 0x4dc], ecx
push 6
mov ecx, dword [ebp - 0x4dc]
call fcn.100783d0
mov byte [ebp - 0x4b1], al
movzx edx, byte [ebp - 0x4b1]
test edx, edx
jne 0x10125ac2
jmp 0x10125b63
push 0
push 0
push 0x10363ef6
push 0x81
push 0x1036405c
push 6
lea ecx, [ebp - 0x3ac]
call fcn.10070940
mov dword [ebp - 0x4e0], eax
mov eax, dword [ebp - 0x4e0]
mov dword [ebp - 0x4e4], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x4e4]
call fcn.1006e8c0
mov dword [ebp - 0x4e8], eax
mov ecx, dword [ebp - 0x4e8]
mov dword [ebp - 0x4ec], ecx
push str.Creating_TCP_server_socket
mov ecx, dword [ebp - 0x4ec]
call fcn.1005ec90
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x4f0]
mov dword [ebp - 0x4f4], edx
call fcn.10065830
mov dword [ebp - 0x4f8], eax
mov eax, dword [ebp - 0x4f4]
push eax
mov ecx, dword [ebp - 0x4f8]
call fcn.100732a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x3ac]
call fcn.10072330
push 6
push 1
mov ecx, dword [ebp - 0x4b8]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x4b0]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x4b0]
cmp dword [edx + 4], 0xffffffff
jne 0x10125bad
push str.TCP_server_socket_creation_failed
lea ecx, [ebp - 0x61c]
call fcn.10070e00
push 0x103cffd0
lea eax, [ebp - 0x61c]
push eax
call fcn.103171fa
mov dword [ebp - 0x4fc], 1
mov dword [ebp - 0x500], 0
push 4
lea ecx, [ebp - 0x4fc]
push ecx
push 4
push 0xffff
mov edx, dword [ebp - 0x4b0]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 0x4b8]
cmp dword [ecx + 4], 0x17
jne 0x10125c0a
push 4
lea edx, [ebp - 0x500]
push edx
push 0x1b
push 0x29
mov eax, dword [ebp - 0x4b0]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0x504], 1
lea edx, [ebp - 0x504]
push edx
push 0x8004667e
mov eax, dword [ebp - 0x4b0]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jge 0x10125c55
push str.Failed_to_set_socket_non_blocking_mode
lea ecx, [ebp - 0x5d4]
call fcn.10070e00
push 0x103cffd0
lea edx, [ebp - 0x5d4]
push edx
call fcn.103171fa
mov eax, dword [ebp - 0x4b8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x4b8]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x4b0]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x10125e04
call fcn.10065830
mov dword [ebp - 0x508], eax
cmp dword [ebp - 0x508], 0
je 0x10125cca
call fcn.10065830
mov dword [ebp - 0x50c], eax
mov eax, dword [ebp - 0x50c]
mov dword [ebp - 0x510], eax
push 3
mov ecx, dword [ebp - 0x510]
call fcn.100783d0
mov byte [ebp - 0x4b2], al
movzx ecx, byte [ebp - 0x4b2]
test ecx, ecx
jne 0x10125ccf
jmp 0x10125de3
push 0
push 0
push 0x10363ef7
push 0x9b
push 0x103640e4
push 3
lea ecx, [ebp - 0x4ac]
call fcn.10070940
mov dword [ebp - 0x514], eax
mov edx, dword [ebp - 0x514]
mov dword [ebp - 0x518], edx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x518]
call fcn.1006e8c0
mov dword [ebp - 0x51c], eax
mov eax, dword [ebp - 0x51c]
mov dword [ebp - 0x520], eax
push str.TCP_server_socket_binding_on_port
mov ecx, dword [ebp - 0x520]
call fcn.1005ec90
mov dword [ebp - 0x524], eax
mov ecx, dword [ebp - 0x524]
mov dword [ebp - 0x528], ecx
lea edx, [ebp + 8]
push edx
mov ecx, dword [ebp - 0x528]
call fcn.10085eb0
mov dword [ebp - 0x52c], eax
mov eax, dword [ebp - 0x52c]
mov dword [ebp - 0x530], eax
push str._failed__errno
mov ecx, dword [ebp - 0x530]
call fcn.1005ec90
mov dword [ebp - 0x534], eax
mov ecx, dword [ebp - 0x534]
mov dword [ebp - 0x53c], ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x538], eax
lea edx, [ebp - 0x538]
push edx
mov ecx, dword [ebp - 0x53c]
call fcn.100c81d0
mov dword [ebp - 0x540], eax
mov eax, dword [ebp - 0x540]
mov dword [ebp - 0x544], eax
call fcn.10065830
mov dword [ebp - 0x548], eax
mov ecx, dword [ebp - 0x544]
push ecx
mov ecx, dword [ebp - 0x548]
call fcn.100732a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x4ac]
call fcn.10072330
push str.TCP_server_socket_binding_failed
lea ecx, [ebp - 0x5e0]
call fcn.10070e00
push 0x103cffd0
lea edx, [ebp - 0x5e0]
push edx
call fcn.103171fa
mov dword [ebp - 0x5c0], 0xa
push 0xa
mov eax, dword [ebp - 0x4b0]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x10125f68
call fcn.10065830
mov dword [ebp - 0x54c], eax
cmp dword [ebp - 0x54c], 0
je 0x10125e71
call fcn.10065830
mov dword [ebp - 0x550], eax
mov edx, dword [ebp - 0x550]
mov dword [ebp - 0x554], edx
push 3
mov ecx, dword [ebp - 0x554]
call fcn.100783d0
mov byte [ebp - 0x4b3], al
movzx eax, byte [ebp - 0x4b3]
test eax, eax
jne 0x10125e76
jmp 0x10125f47
push 0
push 0
push 0x10363f22
push 0xa3
push str.rtc::impl::TcpServer::listen
push 3
lea ecx, [ebp - 0x1ac]
call fcn.10070940
mov dword [ebp - 0x558], eax
mov ecx, dword [ebp - 0x558]
mov dword [ebp - 0x55c], ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x55c]
call fcn.1006e8c0
mov dword [ebp - 0x560], eax
mov edx, dword [ebp - 0x560]
mov dword [ebp - 0x564], edx
push str.TCP_server_socket_listening_failed__errno
mov ecx, dword [ebp - 0x564]
call fcn.1005ec90
mov dword [ebp - 0x568], eax
mov eax, dword [ebp - 0x568]
mov dword [ebp - 0x570], eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x56c], eax
lea ecx, [ebp - 0x56c]
push ecx
mov ecx, dword [ebp - 0x570]
call fcn.100c81d0
mov dword [ebp - 0x574], eax
mov edx, dword [ebp - 0x574]
mov dword [ebp - 0x578], edx
call fcn.10065830
mov dword [ebp - 0x57c], eax
mov eax, dword [ebp - 0x578]
push eax
mov ecx, dword [ebp - 0x57c]
call fcn.100732a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1ac]
call fcn.10072330
push str.TCP_server_socket_listening_failed
lea ecx, [ebp - 0x628]
call fcn.10070e00
push 0x103cffd0
lea ecx, [ebp - 0x628]
push ecx
call fcn.103171fa
movzx edx, word [ebp + 8]
test edx, edx
je 0x10125f82
mov eax, dword [ebp - 0x4b0]
mov cx, word [ebp + 8]
mov word [eax], cx
jmp 0x10126043
mov dword [ebp - 0x584], 0x80
lea edx, [ebp - 0x584]
push edx
lea eax, [ebp - 0xac]
push eax
mov ecx, dword [ebp - 0x4b0]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x10125fcf
push 0x103641cc
lea ecx, [ebp - 0x5ec]
call fcn.10070e00
push 0x103cffd0
lea eax, [ebp - 0x5ec]
push eax
call fcn.103171fa
movzx ecx, word [ebp - 0xac]
mov dword [ebp - 0x4c0], ecx
cmp dword [ebp - 0x4c0], 2
je 0x10125ff0
cmp dword [ebp - 0x4c0], 0x17
je 0x10126009
jmp 0x10126022
movzx edx, word [ebp - 0xaa]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x4b0]
mov word [ecx], ax
jmp 0x10126043
movzx edx, word [ebp - 0xaa]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x4b0]
mov word [ecx], ax
jmp 0x10126043
push str.Unknown_address_family
lea ecx, [ebp - 0x5f8]
call fcn.10070db0
push 0x103d3bb4
lea edx, [ebp - 0x5f8]
push edx
call fcn.103171fa
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x5c8]
call fcn.10071ed0
jmp 0x10126099
mov dword [ebp - 4], 0xffffffff
jmp 0x101260a9
mov edx, dword [ebp - 0x4bc]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10314cf5
mov esp, ebp
pop ebp
ret 4