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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x100a370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x40c], 1
mov dword [0x100ba40], edi
mov ebx, 0x100b960
mov eax, dword [0x100b9e0]
push eax
push 0x100b8c0
push ebx
mov dword [0x100b9e4], eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [0x100c2d0], edi
je 0x1006afc
cmp word [0x100b960], 2
jne 0x1006aec
mov dword [0x100b964], edi
jmp 0x1006afc
mov esi, 0x1001794
mov edi, 0x100b968
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
cmp dword [0x100eec4], edi
je 0x1006b0c
xor eax, eax
mov word [0x100b962], ax
mov eax, dword [0x100a364]
cmp eax, 0xffffffff
je 0x1006b1d
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
movzx eax, word [0x100b960]
push edi
xor esi, esi
inc esi
push esi
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x100a364], eax
cmp eax, 0xffffffff
je 0x1006cc3
cmp dword [0x100eec4], edi
jne 0x1006b6a
push 4
lea ecx, [ebp - 0x40c]
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jl 0x1006cd8
mov eax, dword [0x100a364]
push dword [0x100b9e4]
push ebx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x1006ce6
test byte [0x100c2d8], 1
je 0x1006bb9
push 4
lea eax, [ebp - 0x40c]
push eax
push esi
push 0xffff
push dword [0x100a364]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x1006bb9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2768
call fcn.01005b70
push 0x100b9e4
push ebx
push dword [0x100a364]
mov dword [0x100b9e4], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jl 0x1006cf4
push esi
push dword [0x100a364]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jl 0x1006d02
cmp dword [0x100eec4], edi
je 0x1006d34
movzx eax, word [0x100b960]
dec eax
dec eax
je 0x1006c6d
sub eax, 0x15
je 0x1006c16
push 5
pop eax
jmp 0x1006caf
mov esi, dword [0x100b978]
push 2
push edi
push edi
push 0x401
lea eax, [ebp - 0x408]
push eax
push dword [0x100b9e4]
mov dword [0x100b978], edi
push ebx
call dword [sym.imp.WS2_32.dll_getnameinfo]
movzx eax, word [0x100b962]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
lea eax, [ebp - 0x408]
push eax
push 0x1001624
call fcn.0100682a
add esp, 0xc
mov dword [0x100b978], esi
jmp 0x1006caa
movzx eax, byte [0x100b963]
push eax
movzx eax, byte [0x100b962]
push eax
movzx eax, byte [0x100b967]
push eax
movzx eax, byte [0x100b966]
push eax
movzx eax, byte [0x100b965]
push eax
movzx eax, byte [0x100b964]
push eax
push 0x100160c
call fcn.0100682a
add esp, 0x1c
cmp eax, 5
jne 0x1006d28
cmp dword [0x100eec4], 0xffffffff
jne 0x1006d28
mov dword [0x100eec4], edi
jmp 0x1006ab9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2758
call fcn.01005b70
mov eax, esi
jmp 0x1006d36
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2767
jmp 0x1006d0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275a
jmp 0x1006d0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275d
jmp 0x1006d0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2769
call fcn.01005b70
push dword [0x100a364]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [0x100a364], 0xffffffff
jmp 0x1006cd4
xor ecx, ecx
cmp eax, 2
setne cl
mov eax, ecx
jmp 0x1006d36
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01008359
leave
ret