Function at 0x417180
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x140
mov cl, byte [0x42d680]
push ebx
push ebp
mov ebp, dword [esp + 0x14c]
push esi
push edi
mov eax, dword [ebp + 0x164]
mov byte [esp + 0x50], cl
mov dword [esp + 0x3c], eax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
mov ebx, dword [ebp]
xor esi, esi
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebx + 0x70]
mov byte [esp + 0x13], 0
cmp eax, esi
mov dword [esp + 0x14], esi
je 0x417284
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
push eax
call edi
cmp eax, 0xffffffff
je 0x4171f3
mov edx, dword [ebx + 0x70]
push esi
push edx
push eax
call fcn.00413990
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x41727e
mov ecx, dword [ebx + 0x70]
lea eax, [esp + 0x50]
push 0x100
push eax
push ecx
call fcn.0040a8b0
add esp, 0xc
test eax, eax
je 0x417229
lea edx, [esp + 0x50]
push edx
call edi
lea ecx, [esp + 0x50]
push esi
push ecx
push eax
call fcn.00413990
add esp, 0xc
mov dword [esp + 0x14], eax
jmp 0x41727e
mov edi, dword [ebx + 0x70]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jbe 0x417284
lea edx, [esp + 0x24]
lea eax, [esp + 0x50]
push edx
push esi
push eax
push ebp
mov dword [esp + 0x34], esi
call fcn.0040ab40
add esp, 0x10
cmp eax, 1
jne 0x417266
lea ecx, [esp + 0x24]
push ecx
push ebp
call fcn.00413b30
add esp, 8
mov eax, dword [esp + 0x24]
cmp eax, esi
je 0x417284
mov edx, dword [eax]
push eax
push ebx
mov dword [esp + 0x1c], edx
call fcn.0040ad00
add esp, 8
cmp dword [esp + 0x14], esi
jne 0x4172b6
mov edx, dword [ebp + 0x98]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x4172b1
push 0x42b360
jmp 0x41749c
mov byte [esp + 0x13], 1
push esi
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x417497
mov eax, dword [ebp + 0x9c]
cmp eax, 0xffffffff
je 0x4172de
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov al, byte [esp + 0x13]
mov dword [ebp + 0x9c], edi
test al, al
jne 0x417312
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
mov dword [esp + 0x2c], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x30], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x34], edx
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x30], esi
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x2c]
push 0x10
push ecx
push edi
mov word [esp + 0x3a], si
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x417490
lea edx, [esp + 0x28]
lea eax, [esp + 0x40]
push edx
push eax
push edi
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x417354
push 0x42b360
jmp 0x41749c
mov ecx, dword [esp + 0x42]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
push 1
push edi
mov esi, eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x417378
push 0x42b344
jmp 0x41749c
mov al, byte [esp + 0x13]
push 0x100
test al, al
je 0x41739b
lea edx, [esp + 0x54]
lea eax, [esp + 0x34]
push edx
push eax
push 2
call fcn.00413820
add esp, 0x10
jmp 0x4173ad
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x54]
push ecx
push edx
call fcn.0040a970
add esp, 0xc
lea eax, [esp + 0x1e]
lea ecx, [esp + 0x1c]
push eax
lea edx, [esp + 0x1e]
push ecx
lea eax, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x60]
push 0x42a130
push ecx
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x18
cmp eax, 4
jne 0x4174a5
mov edx, dword [esp + 0x1e]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1a]
and esi, 0xffff
and edx, 0xffff
push esi
push edx
mov edx, dword [esp + 0x20]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
push 0x42b314
push ebx
call fcn.004149c0
mov ecx, dword [esp + 0x3a]
mov edx, dword [esp + 0x38]
mov eax, esi
and ecx, 0xffff
and eax, 0xff
and edx, 0xffff
shr esi, 8
push eax
mov eax, dword [esp + 0x3a]
push esi
push ecx
mov ecx, dword [esp + 0x40]
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
push 0x42b2fc
push ebp
call fcn.00419840
add esp, 0x3c
test eax, eax
jne 0x4174aa
mov edx, dword [esp + 0x14]
push edx
call fcn.00413960
mov eax, dword [esp + 0x40]
push 0x19
push ebp
mov dword [eax + 0x48], 2
call fcn.00416f10
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret
push 0x42b2e0
jmp 0x41749c
push 0x42b2c8
push ebx
call fcn.00414a30
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x140
ret