Function at 0x4f2a10
Capabilities:
Convert ip address from string
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x660
mov eax, dword [0x5df040]
xor eax, esp
mov dword [esp + 0x65c], eax
push ebx
mov ebx, dword [esp + 0x66c]
push ebp
push esi
push edi
mov edi, dword [esp + 0x674]
push 0x2e
push 0
mov dword [esp + 0x44], edi
mov eax, dword [edi + 0x18]
mov dword [esp + 0x2c], eax
add eax, 0x3f0
mov dword [esp + 0x38], eax
lea eax, [esp + 0xc9]
push eax
mov dword [esp + 0x20], 0x1e
mov dword [esp + 0x2c], 0xffffffff
mov byte [esp + 0xcc], 0
call fcn.00548bf0
mov ecx, dword [edi + 0x55c]
add esp, 0xc
xor ebp, ebp
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x34], 0
test ecx, ecx
je 0x4f2c8a
mov edx, ecx
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4f2ab4
sub edx, esi
cmp edx, 1
jbe 0x4f2c8a
mov al, byte [ecx]
cmp al, 0x5b
jne 0x4f2af7
lea ebp, [ecx + 1]
mov esi, ebp
push 0x5d
push esi
call fcn.00549620
mov ecx, eax
add esp, 8
xor eax, eax
test ecx, ecx
cmove ebp, eax
mov eax, ecx
mov dword [esp + 0x34], ebp
sub eax, esi
mov ebp, ecx
neg ebp
sbb ebp, ebp
and ebp, eax
jmp 0x4f2b2f
cmp al, 0x3a
je 0x4f2b37
push 0x3a
push ecx
call fcn.00549620
mov esi, eax
add esp, 8
mov eax, dword [esp + 0x28]
mov ebp, esi
mov dword [esp + 0x34], eax
test ebp, ebp
je 0x4f2b90
lea ecx, [esp + 0x48]
sub ebp, eax
push ecx
push eax
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
lea ecx, [eax - 1]
neg ecx
sbb ecx, ecx
and ecx, esi
xor esi, esi
xor edx, edx
test ecx, ecx
je 0x4f2ba3
push 0x3a
push ecx
call fcn.00549620
add esp, 8
mov dword [esp + 0x28], eax
xor esi, esi
xor edx, edx
test eax, eax
je 0x4f2ba3
push 0xa
push edx
inc eax
push eax
call fcn.0055fc82
push eax
call fcn.004bcaa0
push 0x2d
push dword [esp + 0x3c]
movzx esi, ax
call fcn.00549620
add esp, 0x18
test eax, eax
je 0x4f2b8c
push 0xa
inc eax
push 0
push eax
call fcn.0055fc82
push eax
call fcn.004bcaa0
add esp, 0x10
movzx edx, ax
jmp 0x4f2ba3
mov edx, esi
jmp 0x4f2ba3
mov ebp, eax
lea ecx, [ebp + 1]
mov al, byte [ebp]
inc ebp
test al, al
jne 0x4f2b95
sub ebp, ecx
xor esi, esi
xor edx, edx
xor ecx, ecx
movzx eax, dx
cmp si, dx
cmovbe ecx, eax
movzx eax, cx
xor ecx, ecx
mov dword [esp + 0x18], eax
cmp si, dx
movzx eax, si
cmovbe ecx, eax
movzx eax, cx
mov dword [esp + 0x28], eax
test ebp, ebp
je 0x4f2c78
cmp ebp, 0x32
jae 0x4f31e4
push ebp
push dword [esp + 0x38]
lea eax, [esp + 0xf8]
push eax
call fcn.00548d90
mov esi, dword [esp + 0x30]
lea eax, [esp + 0x274]
add esp, 0xc
mov byte [esp + ebp + 0xf0], 0
push 0x401
push eax
lea eax, [esp + 0xf8]
push eax
mov eax, dword [esi + 0x24]
push dword [esi + 0x4c8]
add eax, 0x10
push eax
call fcn.0050e7e0
add esp, 4
push eax
mov eax, dword [esi + 0x24]
push dword [eax]
call fcn.00424050
add esp, 0x18
sub eax, 0
je 0x4f2c4d
sub eax, 1
je 0x4f31e4
sub eax, 1
jne 0x4f2c56
lea esi, [esp + 0x268]
jmp 0x4f2c58
lea esi, [esp + 0xf0]
jmp 0x4f2c58
xor esi, esi
mov eax, dword [esp + 0x28]
movzx ebp, ax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], ebp
movzx ebp, ax
mov dword [esp + 0x18], ebp
test esi, esi
jne 0x4f2d26
jmp 0x4f2c8a
movzx ecx, ax
mov eax, dword [esp + 0x18]
movzx eax, ax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x44]
push eax
mov eax, dword [esp + 0x2c]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4f2cdd
push 0x100
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b8fc0
push eax
push str.getsockname___failed:__s
push edi
call fcn.004cefe0
add esp, 0x18
jmp 0x4f31e4
mov ax, word [esp + 0x40]
cmp ax, 0x17
je 0x4f2cf1
lea ecx, [esp + 0x44]
movzx eax, ax
jmp 0x4f2cfa
lea ecx, [esp + 0x48]
mov eax, 0x17
push 0x401
lea edx, [esp + 0x26c]
movzx eax, ax
push edx
push ecx
push eax
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x4f31e4
xor al, al
lea esi, [esp + 0x268]
mov byte [esp + 0x13], al
lea eax, [esp + 0x38]
push eax
push 0
push 0
push esi
push edi
call fcn.004d9260
add esp, 0x14
cmp eax, 1
jne 0x4f2d4c
lea eax, [esp + 0x38]
push eax
push edi
call fcn.004c2c70
add esp, 8
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4f31d5
mov ebp, dword [eax]
push eax
push edi
call fcn.004d97f0
add esp, 8
test ebp, ebp
je 0x4f31d5
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x28]
movzx eax, byte [eax + 0x4d2]
push eax
push 0
push ebp
push edi
call fcn.00503230
add esp, 0x14
test eax, eax
je 0x4f2dc3
call esi
mov ebp, dword [ebp + 0x1c]
test ebp, ebp
jne 0x4f2d72
push 0x100
lea ecx, [esp + 0x16c]
push ecx
push eax
call fcn.004b8fc0
push eax
push str.socket_failure:__s
push edi
call fcn.004cefe0
add esp, 0x18
jmp 0x4f31e4
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4f2dda
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x595ff8]
jmp 0x4f2ddf
mov eax, 0x59627c
push eax
push str.__s__ftp_state_use_port____opened_socket
push edi
call fcn.004cf220
push dword [ebp + 0x10]
lea eax, [esp + 0x50]
push dword [ebp + 0x18]
push eax
call fcn.00548d90
mov eax, dword [ebp + 0x10]
add esp, 0x18
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
movzx esi, ax
cmp ax, word [esp + 0x18]
ja 0x4f31c5
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [esp + 0x1c]
mov word [esp + 0x46], ax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4f2f00
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x4f2eba
cmp eax, 0x2741
jne 0x4f2eba
push 0x100
lea eax, [esp + 0x16c]
push eax
push 0x2741
call fcn.004b8fc0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.004cf0b0
add esp, 0x1c
mov dword [esp + 0x1c], 0x80
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x44]
push eax
mov eax, dword [esp + 0x2c]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4f2cb0
mov eax, dword [esp + 0x2c]
movzx esi, ax
xor al, al
mov byte [esp + 0x13], al
jmp 0x4f2e17
cmp eax, 0x2740
je 0x4f2ec6
cmp eax, 0xd
jne 0x4f2ed5
inc esi
mov byte [esp + 0x13], cl
movzx eax, si
mov esi, eax
jmp 0x4f2e0c
push 0x100
lea ecx, [esp + 0x16c]
push ecx
push eax
call fcn.004b8fc0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.004cefe0
add esp, 0x1c
jmp 0x4f31e4
cmp si, word [esp + 0x18]
ja 0x4f31c5
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x80
push eax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4f2cb0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4f2f46
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x595ff8]
jmp 0x4f2f4b
mov eax, 0x59627c
movzx esi, si
push esi
push eax
push str.__s__ftp_state_use_port____socket_bound_to_port__d
push edi
call fcn.004cf220
add esp, 0x10
push 1
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4f2f9b
push 0x100
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b8fc0
push eax
push str.socket_failure:__s
push edi
call fcn.004cefe0
add esp, 0x18
jmp 0x4f31e4
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4f2fb2
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x595ff8]
jmp 0x4f2fb7
mov eax, 0x59627c
push esi
push eax
push str.__s__ftp_state_use_port____listening_on__d
push edi
call fcn.004cf220
push 0x2f
lea eax, [esp + 0xd4]
push eax
push ebp
call fcn.004d9210
mov ebp, dword [esp + 0x40]
add esp, 0x1c
cmp byte [ebp + 0x251], 0
jne 0x4f2ff4
cmp byte [ebp + 0x24c], 0
je 0x4f2ff4
mov byte [ebp + 0x251], 1
lea eax, [esp + 0x20]
push eax
push 1
push ebp
push edi
call fcn.00502fe0
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x14], ecx
test ecx, ecx
jne 0x4f31e4
mov dword [esp + 0x20], 0xffffffff
cmp ebx, 2
je 0x4f307e
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x40]
nop dword [eax + eax]
cmp byte [ebp + 0x251], 0
jne 0x4f303d
test ebx, ebx
je 0x4f3074
cmp ebx, 1
jne 0x4f3048
cmp cx, 2
jne 0x4f3074
movzx eax, cx
sub eax, 2
je 0x4f3055
sub eax, 0x15
jne 0x4f3074
push dword [esp + 0x42]
call esi
movzx ebp, ax
test ebx, ebx
je 0x4f3145
cmp ebx, 1
je 0x4f30b4
mov cx, word [esp + 0x40]
mov ebp, dword [esp + 0x24]
inc ebx
cmp ebx, 2
jne 0x4f3030
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x30]
mov dword [esi + 0xa0], ebx
mov esi, dword [edi + 0x18]
mov dword [esp + 0x14], ecx
mov al, byte [esi + 0x49e]
cmp al, 0x1c
je 0x4f31b8
test esi, esi
je 0x4f319b
movzx eax, al
mov eax, dword [eax*4 + 0x595ff8]
jmp 0x4f31a0
lea edx, [esp + 0x124]
mov edi, 0x2c
lea esi, [esp + 0xc0]
mov cl, byte [esi]
test cl, cl
je 0x4f30de
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
add esi, 1
jne 0x4f30c7
movzx ecx, bp
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.004d4310
mov esi, dword [esp + 0x44]
lea eax, [esp + 0x138]
mov edi, dword [esp + 0x50]
push eax
push 0x596089
push 0x595b48
push esi
push edi
call fcn.0050d210
mov ecx, eax
add esp, 0x28
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x4f3082
push ecx
call fcn.004b9130
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.004cefe0
add esp, 0x10
jmp 0x4f31e4
mov esi, dword [esp + 0x30]
movzx eax, bp
push eax
lea eax, [esp + 0xc4]
push eax
xor eax, eax
cmp word [esp + 0x48], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push esi
push edi
call fcn.0050d210
mov ecx, eax
add esp, 0x1c
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x4f3082
push ecx
call fcn.004b9130
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.004cefe0
add esp, 0x10
jmp 0x4f31e4
mov eax, 0x59627c
push str.PORT
push eax
push str.__s_______s_
push edi
call fcn.004cf220
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov byte [esi + 0x49e], 0x1c
test ecx, ecx
je 0x4f3225
jmp 0x4f31e4
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.004cefe0
add esp, 8
jmp 0x4f31e4
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.004cefe0
add esp, 0xc
mov esi, dword [edi + 0x18]
mov al, byte [esi + 0x49e]
test al, al
je 0x4f321a
test esi, esi
je 0x4f3201
movzx eax, al
mov eax, dword [eax*4 + 0x595ff8]
jmp 0x4f3206
mov eax, 0x59627c
push str.STOP
push eax
push str.__s_______s_
push edi
call fcn.004cf220
add esp, 0x10
mov ecx, dword [esp + 0x14]
mov byte [esi + 0x49e], 0
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x4f3242
push eax
push dword [esp + 0x28]
push edi
call fcn.00503200
mov eax, dword [esp + 0x20]
add esp, 0xc
jmp 0x4f3244
mov eax, ecx
mov ecx, dword [esp + 0x66c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423495
add esp, 0x660
ret