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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
mov eax, dword [0x1007e7e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
push 0x2e
push 0
mov dword [ebp - 0x664], edi
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x63c], eax
add eax, 0x2d0
mov dword [ebp - 0x658], eax
lea eax, [ebp - 0x33]
push eax
mov dword [ebp - 0x654], 0x1e
mov dword [ebp - 0x644], 0xffffffff
mov byte [ebp - 0x34], 0
call fcn.10053f40
mov edx, dword [edi + 0x55c]
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x65c], edx
xor esi, esi
mov dword [ebp - 0x660], 0
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x650], 0
mov byte [ebp - 0x635], 1
mov dword [ebp - 0x634], ecx
test edx, edx
je 0x1001a337
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x640], eax
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001a170
sub ecx, dword [ebp - 0x640]
cmp ecx, 1
jbe 0x1001a337
mov al, byte [edx]
cmp al, 0x5b
jne 0x1001a1b2
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [ebp - 0x634], eax
call fcn.100542b0
add esp, 8
test eax, eax
je 0x1001a337
mov esi, eax
sub esi, dword [ebp - 0x634]
jmp 0x1001a200
cmp al, 0x3a
jne 0x1001a1ba
mov eax, edx
jmp 0x1001a200
push 0x3a
push edx
call fcn.100542b0
mov ecx, dword [ebp - 0x65c]
add esp, 8
mov dword [ebp - 0x640], eax
mov edx, ecx
mov dword [ebp - 0x634], edx
test eax, eax
je 0x1001a31c
mov esi, eax
lea eax, [ebp - 0x628]
push eax
push ecx
push 0x17
sub esi, ecx
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x1001a277
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x1001a28b
push 0x3a
push eax
call fcn.100542b0
add esp, 8
mov dword [ebp - 0x65c], eax
test eax, eax
je 0x1001a28b
push 0xa
inc eax
push 0
push eax
call fcn.10053874
push eax
call fcn.1004fda0
push 0x2d
push dword [ebp - 0x65c]
movzx eax, ax
mov dword [ebp - 0x648], eax
call fcn.100542b0
add esp, 0x18
test eax, eax
je 0x1001a308
push 0xa
inc eax
push 0
push eax
call fcn.10053874
push eax
call fcn.1004fda0
mov ecx, dword [ebp - 0x648]
add esp, 0x10
movzx eax, ax
mov dword [ebp - 0x650], eax
cmp cx, ax
jbe 0x1001a28b
mov dword [ebp - 0x650], 0
mov dword [ebp - 0x648], 0
mov edx, dword [ebp - 0x634]
test esi, esi
je 0x1001a337
cmp esi, 0x32
jae 0x1001a8f4
push esi
push edx
lea eax, [ebp - 0x68]
push eax
call fcn.100538f0
add esp, 0xc
mov byte [ebp + esi - 0x68], 0
lea eax, [ebp - 0x5b0]
push 0x401
push eax
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebp - 0x63c]
push dword [eax + 0x3a4]
mov eax, dword [eax + 0x24]
add eax, 0x10
push eax
call fcn.10027e50
mov esi, dword [ebp - 0x63c]
add esp, 4
push eax
mov eax, dword [esi + 0x24]
push dword [eax]
call sym.libcurl.dll_curl_pushheader_byname
add esp, 0x18
sub eax, 0
je 0x1001a32f
dec eax
je 0x1001a8f4
dec eax
jne 0x1001a33d
jmp 0x1001a3db
mov ecx, dword [ebp - 0x648]
movzx eax, cx
mov dword [ebp - 0x650], eax
jmp 0x1001a28b
mov esi, ecx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1001a321
sub esi, ecx
jmp 0x1001a291
lea eax, [ebp - 0x68]
jmp 0x1001a3e1
mov esi, dword [ebp - 0x63c]
lea eax, [ebp - 0x64c]
mov dword [ebp - 0x64c], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [esi + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1001a391
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100437b0
push eax
push str.getsockname___failed:__s
push edi
call fcn.10010ab0
add esp, 0x18
jmp 0x1001a8f4
mov ax, word [ebp - 0x630]
push 0x401
cmp ax, 0x17
je 0x1001a3b7
lea ecx, [ebp - 0x5b0]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x62c]
push ecx
push eax
jmp 0x1001a3c7
lea eax, [ebp - 0x5b0]
push eax
lea eax, [ebp - 0x628]
push eax
push 0x17
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x1001a8f4
mov byte [ebp - 0x635], 0
lea eax, [ebp - 0x5b0]
lea ecx, [ebp - 0x660]
mov dword [ebp - 0x634], eax
push ecx
push 0
push 0
push eax
push edi
call fcn.1001f010
add esp, 0x14
cmp eax, 1
jne 0x1001a411
lea eax, [ebp - 0x660]
push eax
push edi
call fcn.10002ed0
add esp, 8
mov eax, dword [ebp - 0x660]
test eax, eax
je 0x1001a8e0
mov esi, dword [eax]
push eax
push edi
mov dword [ebp - 0x640], esi
call fcn.1001f3b0
add esp, 8
test esi, esi
je 0x1001a8e0
mov dword [ebp - 0x634], 0
lea eax, [ebp - 0x644]
push eax
mov eax, dword [ebp - 0x63c]
movzx eax, byte [eax + 0x3ae]
push eax
push 0
push esi
push edi
call fcn.10007130
add esp, 0x14
test eax, eax
je 0x1001a483
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
mov dword [ebp - 0x634], eax
mov dword [ebp - 0x640], esi
test esi, esi
jne 0x1001a443
jmp 0x1001a48d
test esi, esi
jne 0x1001a4b3
mov eax, dword [ebp - 0x634]
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.100437b0
push eax
push str.socket_failure:__s
push edi
call fcn.10010ab0
add esp, 0x18
jmp 0x1001a8f4
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a4ca
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d8f8]
jmp 0x1001a4cf
mov eax, 0x1006db1c
push eax
push str.__s__ftp_state_use_port____opened_socket
push edi
call fcn.10010ce0
push dword [esi + 0x10]
lea eax, [ebp - 0x630]
push dword [esi + 0x18]
push eax
call fcn.100538f0
mov eax, dword [esi + 0x10]
add esp, 0x18
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp - 0x648]
cmp ax, word [ebp - 0x650]
movzx esi, ax
ja 0x1001a8d0
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [ebp - 0x64c]
mov word [ebp - 0x62e], ax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x644]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1001a613
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x635], 0
je 0x1001a5d0
cmp eax, 0x2741
jne 0x1001a5d0
push 0x100
lea eax, [ebp - 0x1ac]
push eax
push 0x2741
call fcn.100437b0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.10010b70
add esp, 0x1c
mov dword [ebp - 0x64c], 0x80
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x630]
push eax
mov eax, dword [ebp - 0x63c]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1001a365
mov eax, dword [ebp - 0x648]
movzx esi, ax
cmp si, word [ebp - 0x650]
mov byte [ebp - 0x635], 0
jmp 0x1001a509
cmp eax, 0x2740
je 0x1001a5dc
cmp eax, 0xd
jne 0x1001a5e9
inc esi
cmp si, word [ebp - 0x650]
jmp 0x1001a509
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.100437b0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.10010ab0
add esp, 0x1c
jmp 0x1001a8f4
cmp si, word [ebp - 0x650]
ja 0x1001a8d0
lea eax, [ebp - 0x64c]
mov dword [ebp - 0x64c], 0x80
push eax
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x644]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1001a365
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a663
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d8f8]
jmp 0x1001a668
mov eax, 0x1006db1c
movzx esi, si
push esi
push eax
push str.__s__ftp_state_use_port____socket_bound_to_port__d
push edi
call fcn.10010ce0
add esp, 0x10
push 1
push dword [ebp - 0x644]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1001a6b9
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100437b0
push eax
push str.socket_failure:__s
push edi
call fcn.10010ab0
add esp, 0x18
jmp 0x1001a8f4
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a6d0
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d8f8]
jmp 0x1001a6d5
mov eax, 0x1006db1c
push esi
push eax
push str.__s__ftp_state_use_port____listening_on__d
push edi
call fcn.10010ce0
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x640]
call fcn.1001efc0
mov eax, dword [ebp - 0x63c]
add esp, 0x1c
cmp byte [eax + 0x251], 0
jne 0x1001a715
cmp byte [eax + 0x24c], 0
je 0x1001a715
mov byte [eax + 0x251], 1
lea ecx, [ebp - 0x644]
push ecx
push 1
push eax
push edi
call fcn.10006ef0
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x654], esi
test esi, esi
jne 0x1001a8f4
mov dword [ebp - 0x644], 0xffffffff
cmp ebx, 2
je 0x1001a7bc
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x63c]
lea ebx, [ebx]
cmp byte [eax + 0x251], 0
jne 0x1001a76d
test ebx, ebx
je 0x1001a7b0
cmp ebx, 1
jne 0x1001a778
cmp cx, 2
jne 0x1001a7b0
movzx eax, cx
sub eax, 2
je 0x1001a785
sub eax, 0x15
jne 0x1001a7aa
push dword [ebp - 0x62e]
call esi
movzx eax, ax
mov dword [ebp - 0x640], eax
test ebx, ebx
je 0x1001a876
cmp ebx, 1
je 0x1001a7e0
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x63c]
inc ebx
cmp ebx, 2
jne 0x1001a760
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x658]
push 0x1c
push edi
mov dword [eax + 0xa0], ebx
call fcn.10017610
add esp, 8
test esi, esi
je 0x1001a93b
jmp 0x1001a8f4
lea edx, [ebp - 0xac]
mov edi, 0x2c
lea esi, [ebp - 0x34]
mov edi, edi
mov cl, byte [esi]
test cl, cl
je 0x1001a805
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x1001a7f0
mov eax, dword [ebp - 0x640]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call sym.libcurl.dll_curl_msnprintf
mov edi, dword [ebp - 0x664]
lea eax, [ebp - 0xac]
push eax
push str.PORT
push 0x1006df5c
push dword [ebp - 0x658]
push edi
call fcn.10035600
mov esi, eax
add esp, 0x28
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1001a7bc
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.10010ab0
add esp, 0x10
jmp 0x1001a7d3
movzx eax, ax
push eax
lea eax, [ebp - 0x34]
push eax
xor eax, eax
cmp word [ebp - 0x630], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x658]
push edi
call fcn.10035600
mov esi, eax
add esp, 0x1c
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1001a7bc
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.10010ab0
add esp, 0x10
jmp 0x1001a7d3
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.10010ab0
add esp, 8
jmp 0x1001a8f4
push dword [ebp - 0x634]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.10010ab0
add esp, 0xc
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x37e], 0
je 0x1001a92e
test esi, esi
je 0x1001a914
movzx eax, byte [esi + 0x37e]
mov eax, dword [eax*4 + 0x1006d8f8]
jmp 0x1001a919
mov eax, 0x1006db1c
push dword [0x1006d8f8]
push eax
push str.__s_______s_
push edi
call fcn.10010ce0
add esp, 0x10
mov byte [esi + 0x37e], 0
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x644]
cmp eax, 0xffffffff
je 0x1001a956
push eax
push dword [ebp - 0x63c]
push edi
call fcn.10007100
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100526c8
mov esp, ebp
pop ebp
ret