Function at 0x10055cd
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 [0x1008390]
and dword [0x1009660], 0
push ebx
push esi
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0x40c], 1
mov ebx, 0x1009580
mov ecx, dword [0x1009600]
mov dword [0x1009604], ecx
mov eax, ecx
shr ecx, 2
mov esi, 0x1009500
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
cmp dword [0x1009ef4], eax
rep movsb byte es:[edi], byte [esi]
je 0x1005643
cmp word [0x1009580], 2
jne 0x1005635
mov dword [0x1009584], eax
jmp 0x1005643
mov esi, 0x1001594
mov edi, 0x1009588
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [0x100cae0], eax
je 0x1005651
mov word [0x1009582], ax
mov eax, dword [0x1008384]
or edi, 0xffffffff
cmp eax, edi
je 0x1005664
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
movsx eax, word [0x1009580]
push 0
push 1
push eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, edi
mov dword [0x1008384], eax
je 0x10057fa
xor esi, esi
cmp dword [0x100cae0], esi
jne 0x10056b1
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 0x100580d
mov eax, dword [0x1008384]
push dword [0x1009604]
push ebx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x100581b
test byte [0x1009efc], 1
je 0x1005701
push 4
lea eax, [ebp - 0x40c]
push eax
push 1
push 0xffff
push dword [0x1008384]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x1005701
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2768
call fcn.01006573
push 0x1009604
push ebx
push dword [0x1008384]
mov dword [0x1009604], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jl 0x1005829
push 1
push dword [0x1008384]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jl 0x1005837
cmp dword [0x100cae0], esi
je 0x100586b
movsx eax, word [0x1009580]
dec eax
dec eax
je 0x10057a5
sub eax, 0x15
je 0x100575f
push 5
pop eax
jmp 0x10057e7
push 2
push esi
push esi
push 0x401
lea eax, [ebp - 0x408]
push eax
push dword [0x1009604]
push ebx
call dword [sym.imp.WS2_32.dll_getnameinfo]
xor eax, eax
mov ax, word [0x1009582]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
lea eax, [ebp - 0x408]
push eax
push 0x100155c
call fcn.0100538b
add esp, 0xc
jmp 0x10057e2
movzx eax, byte [0x1009583]
push eax
movzx eax, byte [0x1009582]
push eax
movzx eax, byte [0x1009587]
push eax
movzx eax, byte [0x1009586]
push eax
movzx eax, byte [0x1009585]
push eax
movzx eax, byte [0x1009584]
push eax
push 0x1001544
call fcn.0100538b
add esp, 0x1c
cmp eax, 5
jne 0x100585f
cmp dword [0x100cae0], edi
jne 0x100585f
mov dword [0x100cae0], esi
jmp 0x10055f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2758
call fcn.01006573
jmp 0x100585a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2767
jmp 0x1005843
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275a
jmp 0x1005843
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x275d
jmp 0x1005843
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2769
call fcn.01006573
push dword [0x1008384]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x1008384], edi
xor eax, eax
inc eax
jmp 0x100586d
xor ecx, ecx
cmp eax, 2
setne cl
mov eax, ecx
jmp 0x100586d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01006192
leave
ret