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

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x562850]
xor eax, esp
mov dword [esp + 0x9ac], eax
push ebx
mov ebx, dword [esp + 0x9bc]
lea eax, [esp + 0xad]
push ebp
push esi
mov esi, dword [esp + 0x9c0]
push edi
push 0xff
push 0
mov ebp, dword [esi]
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], 0xffffffff
mov byte [esp + 0xc4], 0
call fcn.004bc610
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov edi, dword [ebp + 0x370]
xor ebp, ebp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0
mov ecx, dword [ecx + 0x370]
mov dword [esp + 0x20], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x28], ebp
test ecx, ecx
je 0x4f9785
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9615
sub ecx, edx
cmp ecx, 1
jbe 0x4f9785
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9630
sub ecx, edx
cmp ecx, 0x16
jae 0x4f9645
mov ecx, 0x16
jmp 0x4f9659
mov ecx, edi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f9650
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x563b70]
mov ebp, eax
add esp, 8
mov dword [esp + 0x28], ebp
test ebp, ebp
jne 0x4f967a
lea eax, [ebp + 0x1b]
jmp 0x4f9c62
cmp byte [edi], 0x3a
je 0x4f96a9
push 0x3a
push edi
call fcn.004ba840
add esp, 8
mov dword [esp + 0x30], eax
test eax, eax
je 0x4f972e
mov ecx, eax
sub ecx, edi
push ecx
push edi
push ebp
call fcn.004baa00
mov edi, dword [esp + 0x3c]
add esp, 0xc
test edi, edi
je 0x4f973f
push 0x3a
push edi
call fcn.004ba840
mov edi, eax
add esp, 8
test edi, edi
je 0x4f973f
push 0xa
lea ecx, [edi + 1]
push 0
push ecx
call fcn.004bb2ea
push eax
call fcn.004dfed0
movzx eax, ax
push 0x2d
push edi
mov dword [esp + 0x3c], eax
call fcn.004ba840
add esp, 0x18
test eax, eax
je 0x4f9721
push 0xa
inc eax
push 0
push eax
call fcn.004bb2ea
push eax
call fcn.004dfed0
mov ecx, dword [esp + 0x34]
add esp, 0x10
movzx eax, ax
mov dword [esp + 0x20], eax
cmp cx, ax
jbe 0x4f973f
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
jmp 0x4f973f
mov ecx, dword [esp + 0x24]
movzx eax, cx
mov dword [esp + 0x20], eax
jmp 0x4f973f
mov ecx, ebp
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x4f9732
cmp byte [ebp], 0
je 0x4f9785
push 0x401
lea eax, [esp + 0x1bc]
push eax
mov eax, dword [esi + 0x4c]
push ebp
push dword [esi + 0x88]
push dword [eax + 0x18]
call fcn.004d3f70
add esp, 4
push eax
mov eax, dword [esi + 0x4c]
push dword [eax + 4]
call fcn.004d3f70
add esp, 0x18
sub eax, 0
je 0x4f97d2
dec eax
je 0x4f9c5d
dec eax
je 0x4f97fb
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x168]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4f97d6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004eb050
push eax
push str.getsockname___failed:__s
push dword [esp + 0x28]
call fcn.004ddeb0
push ebp
call dword [0x563b64]
add esp, 0x18
jmp 0x4f9c5d
mov edi, ebp
jmp 0x4f9802
push 0x401
lea eax, [esp + 0x1bc]
push eax
lea eax, [esp + 0x44]
push eax
movzx eax, word [esp + 0x44]
push eax
call fcn.004eb880
add esp, 0x10
mov byte [esp + 0x13], 0
lea edi, [esp + 0x1b8]
lea eax, [esp + 0x2c]
push eax
push 0
push edi
push esi
call fcn.004d4a10
add esp, 0x10
cmp eax, 1
jne 0x4f9826
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.004d40a0
add esp, 8
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4f9c41
mov ebp, dword [eax]
push eax
push dword [esp + 0x1c]
call fcn.004d4ba0
add esp, 8
test ebp, ebp
je 0x4f9c41
push dword [esp + 0x28]
call dword [0x563b64]
add esp, 4
mov dword [esp + 0x14], 0xffffffff
xor edi, edi
lea eax, [esp + 0x14]
push eax
push 0
push ebp
push esi
call fcn.004defc0
add esp, 0x10
mov dword [esp + 0x28], eax
test eax, eax
je 0x4f988a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [ebp + 0x1c]
mov edi, eax
test ebp, ebp
jne 0x4f9860
jmp 0x4f988e
test ebp, ebp
jne 0x4f98ac
push edi
push esi
call fcn.004eb050
push eax
push str.socket_failure:__s
push dword [esp + 0x28]
call fcn.004ddeb0
add esp, 0x14
jmp 0x4f9c5d
push dword [ebp + 0x10]
lea eax, [esp + 0x3c]
push dword [ebp + 0x18]
push eax
call fcn.004bbf70
mov eax, dword [ebp + 0x10]
add esp, 0xc
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
movzx edi, ax
cmp ax, word [esp + 0x20]
ja 0x4f9981
cmp word [esp + 0x38], 2
jne 0x4f98ec
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
push dword [esp + 0x1c]
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4f99f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [esp + 0x13], 0
je 0x4f9969
cmp eax, 0x2741
jne 0x4f9969
push eax
push esi
call fcn.004eb050
push eax
movzx eax, di
mov edi, dword [esp + 0x24]
push eax
push str.bind_port_hu__on_non_local_address_failed:__s_n
push edi
call fcn.004ddf80
add esp, 0x18
mov dword [esp + 0x1c], 0x80
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x168]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4f999e
mov eax, dword [esp + 0x24]
movzx edi, ax
mov byte [esp + 0x13], 0
jmp 0x4f9976
cmp eax, 0x2740
je 0x4f9975
cmp eax, 0xd
jne 0x4f99c9
inc edi
cmp di, word [esp + 0x20]
jbe 0x4f98d8
push str.bind___failed__we_ran_out_of_ports_
push dword [esp + 0x1c]
call fcn.004ddeb0
push dword [esp + 0x1c]
push esi
call fcn.004de760
jmp 0x4f9c5a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004eb050
push eax
push str.getsockname___failed:__s
push edi
call fcn.004ddeb0
push dword [esp + 0x28]
push esi
call fcn.004de760
add esp, 0x1c
jmp 0x4f9c5d
push eax
push esi
call fcn.004eb050
push eax
movzx eax, di
push eax
push str.bind_port_hu__failed:__s
push dword [esp + 0x2c]
call fcn.004ddeb0
push dword [esp + 0x2c]
push esi
call fcn.004de760
add esp, 0x20
jmp 0x4f9c5d
cmp di, word [esp + 0x20]
ja 0x4f9981
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4f9a38
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004eb050
push eax
push str.getsockname___failed:__s
push dword [esp + 0x28]
jmp 0x4f99b2
push 1
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4f9a64
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.004eb050
push eax
push str.socket_failure:__s
push dword [esp + 0x28]
jmp 0x4f99b2
push 0x100
lea eax, [esp + 0xbc]
push eax
push ebp
call fcn.004d49e0
add esp, 0xc
cmp ebx, 2
je 0x4f9ad1
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x38]
lea ebx, [ebx]
cmp byte [esi + 0x22c], 0
jne 0x4f9a9d
test ebx, ebx
je 0x4f9acb
cmp ebx, 1
jne 0x4f9aa8
cmp cx, 2
jne 0x4f9acb
movzx eax, cx
sub eax, 2
jne 0x4f9acb
push dword [esp + 0x3a]
call edi
movzx ebp, ax
test ebx, ebx
je 0x4f9bd1
cmp ebx, 1
je 0x4f9b29
mov cx, word [esp + 0x38]
inc ebx
cmp ebx, 2
jne 0x4f9a90
mov ebp, dword [esp + 0x28]
lea edi, [esi + 0x3f8]
mov dword [edi + 0x5c], ebx
mov eax, dword [esi + 0x16c]
cmp eax, 0xffffffff
je 0x4f9afd
push eax
push esi
call fcn.004de760
add esp, 8
mov dword [esi + 0x16c], 0xffffffff
mov eax, dword [esp + 0x14]
mov dword [esi + 0x16c], eax
mov eax, ebp
mov dword [esi + 0x4a4], 0
mov byte [esi + 0x225], 1
mov dword [esi + 0x460], 0x1c
jmp 0x4f9c62
lea edx, [esp + 0x5bc]
mov esi, 0x2c
lea edi, [esp + 0xb8]
lea esp, [esp]
mov cl, byte [edi]
test cl, cl
je 0x4f9b55
cmp cl, 0x2e
movzx eax, cl
cmove eax, esi
mov byte [edx], al
inc edx
inc edi
jne 0x4f9b40
mov ecx, ebp
mov byte [edx], 0
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
call fcn.004e0070
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x5d0]
push eax
push str.PORT
push 0x54f86c
lea edi, [esi + 0x3f8]
push edi
call fcn.005066b0
mov ebp, eax
add esp, 0x24
test ebp, ebp
je 0x4f9adb
push ebp
call fcn.004eb130
push eax
push str.Failure_sending_PORT_command:__s
push dword [esp + 0x24]
call fcn.004ddeb0
push dword [esp + 0x24]
push esi
call fcn.004de760
add esp, 0x18
mov dword [esi + 0x460], 0
mov eax, ebp
jmp 0x4f9c62
push ebp
lea eax, [esp + 0xbc]
push eax
xor eax, eax
lea edi, [esi + 0x3f8]
cmp word [esp + 0x40], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push edi
call fcn.005066b0
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x4f9adb
push ebp
call fcn.004eb130
push eax
push str.Failure_sending_EPRT_command:__s
push dword [esp + 0x24]
call fcn.004ddeb0
push dword [esp + 0x24]
push esi
call fcn.004de760
mov dword [edi + 0x5c], 1
add esp, 0x18
mov dword [esi + 0x460], 0
mov eax, ebp
jmp 0x4f9c62
push edi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push dword [esp + 0x20]
call fcn.004ddeb0
push dword [esp + 0x34]
call dword [0x563b64]
add esp, 0x10
mov eax, 0x1e
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ba5ad
add esp, 0x9b0
ret