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

Disassembly:
sub esp, 0x660
mov eax, dword [0x5a83f8]
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 0x2f
push 0
mov dword [esp + 0x44], edi
mov ebp, dword [edi + 0x18]
mov dword [esp + 0x34], 0x1e
mov dword [esp + 0x20], ebp
mov dword [esp + 0x30], 0xffffffff
lea eax, [ebp + 0x3f0]
mov dword [esp + 0x38], eax
lea eax, [esp + 0xc8]
push eax
call fcn.004efc10
mov edx, dword [edi + 0x55c]
xor eax, eax
add esp, 0xc
mov dword [esp + 0x38], edx
xor esi, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov byte [esp + 0x13], 1
mov dword [esp + 0x14], eax
test edx, edx
je 0x456cd6
mov ecx, edx
lea ebp, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x456b30
sub ecx, ebp
cmp ecx, 1
jbe 0x456cd2
mov al, byte [edx]
cmp al, 0x5b
jne 0x456b6c
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [esp + 0x1c], eax
call fcn.004efd70
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x456cd2
mov esi, ebp
sub esi, dword [esp + 0x14]
jmp 0x456baa
cmp al, 0x3a
jne 0x456b74
mov ebp, edx
jmp 0x456baa
push 0x3a
push edx
call fcn.004efd70
mov ebp, eax
add esp, 8
mov eax, dword [esp + 0x38]
mov edx, eax
mov dword [esp + 0x14], edx
test ebp, ebp
je 0x456cb3
lea ecx, [esp + 0x48]
mov esi, ebp
push ecx
push eax
push 0x17
sub esi, eax
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x456c10
test ebp, ebp
je 0x456c20
push 0x3a
push ebp
call fcn.004efd70
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x456c20
push 0xa
lea eax, [ebp + 1]
push 0
push eax
call fcn.004fe22a
push eax
call fcn.0041db30
movzx eax, ax
push 0x2d
push ebp
mov dword [esp + 0x34], eax
call fcn.004efd70
add esp, 0x18
test eax, eax
je 0x456ca3
push 0xa
inc eax
push 0
push eax
call fcn.004fe22a
push eax
call fcn.0041db30
mov ecx, dword [esp + 0x2c]
add esp, 0x10
movzx eax, ax
mov dword [esp + 0x20], eax
cmp cx, ax
jbe 0x456c20
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x14]
test esi, esi
je 0x456cd2
cmp esi, 0x32
jae 0x457231
push esi
push edx
lea eax, [esp + 0xf8]
push eax
call fcn.004effe0
mov ebp, dword [esp + 0x24]
lea eax, [esp + 0x274]
add esp, 0xc
mov byte [esp + esi + 0xf0], 0
push 0x401
push eax
lea eax, [esp + 0xf8]
push eax
mov eax, dword [ebp + 0x24]
push dword [ebp + 0x4c8]
add eax, 0x10
push eax
call fcn.0046ca30
add esp, 4
push eax
mov eax, dword [ebp + 0x24]
push dword [eax]
call fcn.004301b0
add esp, 0x18
sub eax, 0
je 0x456cc6
sub eax, 1
je 0x457231
sub eax, 1
jne 0x456cd6
jmp 0x456d69
mov ecx, dword [esp + 0x1c]
movzx eax, cx
mov dword [esp + 0x20], eax
jmp 0x456c20
mov esi, eax
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x456cb8
sub esi, ecx
jmp 0x456c24
lea esi, [esp + 0xf0]
jmp 0x456d70
mov ebp, dword [esp + 0x18]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x80
push eax
lea eax, [esp + 0x44]
push eax
push dword [ebp + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x456d25
push 0x100
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041a0b0
push eax
push str.getsockname___failed:__s
push edi
call fcn.0042ff10
add esp, 0x18
jmp 0x457231
mov ax, word [esp + 0x40]
push 0x401
cmp ax, 0x17
je 0x456d48
lea ecx, [esp + 0x26c]
movzx eax, ax
push ecx
lea ecx, [esp + 0x4c]
push ecx
push eax
jmp 0x456d57
lea eax, [esp + 0x26c]
push eax
lea eax, [esp + 0x50]
push eax
push 0x17
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x457231
mov byte [esp + 0x13], 0
lea esi, [esp + 0x268]
lea eax, [esp + 0x34]
push eax
push 0
push 0
push esi
push edi
call fcn.00439e80
add esp, 0x14
cmp eax, 1
jne 0x456d96
lea eax, [esp + 0x34]
push eax
push edi
call fcn.00423c30
add esp, 8
mov eax, dword [esp + 0x34]
test eax, eax
je 0x457222
mov ebp, dword [eax]
push eax
push edi
call fcn.0043a230
add esp, 8
test ebp, ebp
je 0x457222
xor esi, esi
nop dword [eax + eax]
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + 0x4d2]
push eax
push 0
push ebp
push edi
call fcn.004623a0
add esp, 0x14
test eax, eax
je 0x456df2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, dword [ebp + 0x1c]
mov esi, eax
test ebp, ebp
jne 0x456dc0
jmp 0x456df6
test ebp, ebp
jne 0x456e1d
push 0x100
lea eax, [esp + 0x16c]
push eax
push esi
call fcn.0041a0b0
push eax
push str.socket_failure:__s
push edi
call fcn.0042ff10
add esp, 0x18
jmp 0x457231
mov eax, dword [edi + 0x18]
test eax, eax
je 0x456e34
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x557188]
jmp 0x456e39
mov eax, 0x557400
push eax
push str.__s__ftp_state_use_port____opened_socket
push edi
call fcn.00430160
push dword [ebp + 0x10]
lea eax, [esp + 0x50]
push dword [ebp + 0x18]
push eax
call fcn.004effe0
mov eax, dword [ebp + 0x10]
add esp, 0x18
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
cmp ax, word [esp + 0x20]
movzx esi, ax
ja 0x457212
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [esp + 0x24]
mov word [esp + 0x46], ax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x456f59
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [esp + 0x13], 0
je 0x456f17
cmp eax, 0x2741
jne 0x456f17
push 0x100
lea eax, [esp + 0x16c]
push eax
push 0x2741
call fcn.0041a0b0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.0042ffe0
add esp, 0x1c
mov dword [esp + 0x24], 0x80
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x44]
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x456cf8
mov eax, dword [esp + 0x1c]
movzx esi, ax
cmp si, word [esp + 0x20]
mov byte [esp + 0x13], 0
jmp 0x456e6b
cmp eax, 0x2740
je 0x456f23
cmp eax, 0xd
jne 0x456f2e
inc esi
cmp si, word [esp + 0x20]
jmp 0x456e6b
push 0x100
lea ecx, [esp + 0x16c]
push ecx
push eax
call fcn.0041a0b0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.0042ff10
add esp, 0x1c
jmp 0x457231
cmp si, word [esp + 0x20]
ja 0x457212
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x80
push eax
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x456cf8
mov eax, dword [edi + 0x18]
test eax, eax
je 0x456f9f
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x557188]
jmp 0x456fa4
mov eax, 0x557400
movzx esi, si
push esi
push eax
push str.__s__ftp_state_use_port____socket_bound_to_port__d
push edi
call fcn.00430160
add esp, 0x10
push 1
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x456ff4
push 0x100
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0041a0b0
push eax
push str.socket_failure:__s
push edi
call fcn.0042ff10
add esp, 0x18
jmp 0x457231
mov eax, dword [edi + 0x18]
test eax, eax
je 0x45700b
movzx eax, byte [eax + 0x49e]
mov eax, dword [eax*4 + 0x557188]
jmp 0x457010
mov eax, 0x557400
push esi
push eax
push str.__s__ftp_state_use_port____listening_on__d
push edi
call fcn.00430160
push 0x2f
lea eax, [esp + 0xd4]
push eax
push ebp
call fcn.00439e40
mov ebp, dword [esp + 0x34]
add esp, 0x1c
cmp byte [ebp + 0x251], 0
jne 0x45704d
cmp byte [ebp + 0x24c], 0
je 0x45704d
mov byte [ebp + 0x251], 1
lea eax, [esp + 0x28]
push eax
push 1
push ebp
push edi
call fcn.00462150
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x2c], ecx
test ecx, ecx
jne 0x457231
mov dword [esp + 0x28], 0xffffffff
cmp ebx, 2
je 0x4570ce
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esp + 0x40]
cmp byte [ebp + 0x251], 0
jne 0x457091
test ebx, ebx
je 0x4570c8
cmp ebx, 1
jne 0x45709c
cmp cx, 2
jne 0x4570c8
movzx eax, cx
sub eax, 2
je 0x4570a9
sub eax, 0x15
jne 0x4570c8
push dword [esp + 0x42]
call esi
movzx ebp, ax
test ebx, ebx
je 0x457191
cmp ebx, 1
je 0x457103
mov cx, word [esp + 0x40]
mov ebp, dword [esp + 0x18]
inc ebx
cmp ebx, 2
jne 0x457084
mov esi, dword [esp + 0x30]
mov dword [esi + 0xa0], ebx
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x49e], 0x1c
je 0x457201
test esi, esi
je 0x4571e7
movzx eax, byte [esi + 0x49e]
mov eax, dword [eax*4 + 0x557188]
jmp 0x4571ec
lea edx, [esp + 0x124]
mov edi, 0x2c
lea esi, [esp + 0xc0]
mov cl, byte [esi]
test cl, cl
je 0x45712d
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
add esi, 1
jne 0x457116
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.00435230
mov esi, dword [esp + 0x44]
lea eax, [esp + 0x138]
mov edi, dword [esp + 0x50]
push eax
push 0x5572d1
push 0x556cc0
push esi
push edi
call fcn.0046b700
mov ecx, eax
add esp, 0x28
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x4570d2
push ecx
call fcn.0041a220
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.0042ff10
add esp, 0x10
jmp 0x457208
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.0046b700
mov ecx, eax
add esp, 0x1c
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x4570d2
push ecx
call fcn.0041a220
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.0042ff10
add esp, 0x10
jmp 0x457208
mov eax, 0x557400
push dword [0x5571f8]
push eax
push str.__s_______s_
push edi
call fcn.00430160
add esp, 0x10
mov byte [esi + 0x49e], 0x1c
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x457276
jmp 0x457231
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.0042ff10
add esp, 8
jmp 0x457231
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.0042ff10
add esp, 0xc
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x49e], 0
je 0x45726b
test esi, esi
je 0x457251
movzx eax, byte [esi + 0x49e]
mov eax, dword [eax*4 + 0x557188]
jmp 0x457256
mov eax, 0x557400
push dword [0x557188]
push eax
push str.__s_______s_
push edi
call fcn.00430160
add esp, 0x10
mov ecx, dword [esp + 0x2c]
mov byte [esi + 0x49e], 0
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x457293
push eax
push dword [esp + 0x1c]
push edi
call fcn.00462370
mov eax, dword [esp + 0x38]
add esp, 0xc
jmp 0x457295
mov eax, ecx
mov ecx, dword [esp + 0x66c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046ec22
add esp, 0x660
ret