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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x654
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x2e
push 0
mov dword [ebp - 0x1c], 0xffffffff
mov ebx, dword [edi + 0x18]
mov dword [ebp - 8], ebx
mov byte [ebp - 0xd8], 0
lea eax, [ebx + 0x2d0]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0xd7]
push eax
call fcn.10051710
mov edx, dword [edi + 0x55c]
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x24], edx
xor esi, esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
mov byte [ebp - 1], 1
mov dword [ebp - 0x10], eax
test edx, edx
je 0x100191cc
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10019035
sub ecx, ebx
cmp ecx, 1
jbe 0x100191c9
mov al, byte [edx]
cmp al, 0x5b
jne 0x1001906f
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [ebp - 0x10], eax
call fcn.10051a80
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x100191c9
mov esi, ebx
sub esi, dword [ebp - 0x10]
jmp 0x100190ad
cmp al, 0x3a
jne 0x10019077
mov ebx, edx
jmp 0x100190ad
push 0x3a
push edx
call fcn.10051a80
mov ebx, eax
add esp, 8
mov eax, dword [ebp - 0x24]
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ebx, ebx
je 0x100191a6
lea ecx, [ebp - 0xa0]
mov esi, ebx
push ecx
push eax
push 0x17
sub esi, eax
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x10019110
test ebx, ebx
je 0x1001911e
push 0x3a
push ebx
call fcn.10051a80
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1001911e
push 0xa
lea eax, [ebx + 1]
push 0
push eax
call fcn.10051694
push eax
call fcn.1004d9c0
movzx eax, ax
push 0x2d
push ebx
mov dword [ebp - 0x14], eax
call fcn.10051a80
add esp, 0x18
test eax, eax
je 0x10019198
push 0xa
inc eax
push 0
push eax
call fcn.10051694
push eax
call fcn.1004d9c0
mov ecx, dword [ebp - 0x14]
add esp, 0x10
movzx eax, ax
mov dword [ebp - 0xc], eax
cmp cx, ax
jbe 0x1001911e
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x10]
test esi, esi
je 0x100191c9
cmp esi, 0x32
jae 0x100196df
push esi
push ecx
lea eax, [ebp - 0x10c]
push eax
call fcn.10050b30
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x654]
add esp, 0xc
mov byte [ebp + esi - 0x10c], 0
push 0x401
push eax
lea eax, [ebp - 0x10c]
push eax
mov eax, dword [ebx + 0x24]
push dword [ebx + 0x3a4]
add eax, 0x10
push eax
call fcn.10026650
add esp, 4
push eax
mov eax, dword [ebx + 0x24]
push dword [eax]
call sym.libcurl.dll_curl_pushheader_byname
add esp, 0x18
sub eax, 0
je 0x100191be
dec eax
je 0x100196df
dec eax
jne 0x100191cc
jmp 0x10019261
mov ecx, dword [ebp - 0x14]
movzx eax, cx
mov dword [ebp - 0xc], eax
jmp 0x1001911e
mov esi, eax
lea edx, [esi + 1]
jmp 0x100191b0
mov al, byte [esi]
inc esi
test al, al
jne 0x100191b0
sub esi, edx
jmp 0x10019121
lea esi, [ebp - 0x10c]
jmp 0x10019267
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x80
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [ebx + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1001921a
push pe_nt_image_headers32
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100419a0
push eax
push str.getsockname___failed:__s
push edi
call fcn.1000fec0
add esp, 0x18
jmp 0x100196df
mov ax, word [ebp - 0xa8]
push 0x401
cmp ax, 0x17
je 0x10019240
lea ecx, [ebp - 0x654]
movzx eax, ax
push ecx
lea ecx, [ebp - 0xa4]
push ecx
push eax
jmp 0x10019250
lea eax, [ebp - 0x654]
push eax
lea eax, [ebp - 0xa0]
push eax
push 0x17
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x100196df
mov byte [ebp - 1], 0
lea esi, [ebp - 0x654]
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push esi
push edi
call fcn.1001dc70
add esp, 0x14
cmp eax, 1
jne 0x1001928b
lea eax, [ebp - 0x20]
push eax
push edi
call fcn.10002d50
add esp, 8
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x100196d0
mov ebx, dword [eax]
push eax
push edi
call fcn.1001e000
add esp, 8
test ebx, ebx
je 0x100196d0
xor esi, esi
lea esp, [esp]
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 0x3ae]
push eax
push 0
push ebx
push edi
call fcn.10006e30
add esp, 0x14
test eax, eax
je 0x100192e0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, dword [ebx + 0x1c]
mov esi, eax
test ebx, ebx
jne 0x100192b0
jmp 0x100192e4
test ebx, ebx
jne 0x1001930a
push pe_nt_image_headers32
lea eax, [ebp - 0x250]
push eax
push esi
call fcn.100419a0
push eax
push str.socket_failure:__s
push edi
call fcn.1000fec0
add esp, 0x18
jmp 0x100196df
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10019321
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006b968]
jmp 0x10019326
mov eax, 0x1006bb2c
push eax
push str.__s__ftp_state_use_port____opened_socket
push edi
call fcn.100100b0
push dword [ebx + 0x10]
lea eax, [ebp - 0xa8]
push dword [ebx + 0x18]
push eax
call fcn.10050b30
mov eax, dword [ebx + 0x10]
add esp, 0x18
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cmp ax, word [ebp - 0xc]
movzx esi, ax
ja 0x100196c0
mov eax, dword [sym.imp.WS2_32.dll_htons]
push esi
call eax
push dword [ebp - 0x18]
mov word [ebp - 0xa6], ax
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1001943f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 1], 0
je 0x100193ff
cmp eax, 0x2741
jne 0x100193ff
push pe_nt_image_headers32
lea eax, [ebp - 0x250]
push eax
push 0x2741
call fcn.100419a0
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.1000ff60
add esp, 0x1c
mov dword [ebp - 0x18], 0x80
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xa8]
push eax
mov eax, dword [ebp - 8]
push dword [eax + 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x100191ee
mov eax, dword [ebp - 0x14]
movzx esi, ax
cmp si, word [ebp - 0xc]
mov byte [ebp - 1], 0
jmp 0x10019357
cmp eax, 0x2740
je 0x1001940b
cmp eax, 0xd
jne 0x10019415
inc esi
cmp si, word [ebp - 0xc]
jmp 0x10019357
push pe_nt_image_headers32
lea ecx, [ebp - 0x250]
push ecx
push eax
call fcn.100419a0
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.1000fec0
add esp, 0x1c
jmp 0x100196df
cmp si, word [ebp - 0xc]
ja 0x100196c0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x80
push eax
lea eax, [ebp - 0xa8]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x100191ee
mov eax, dword [edi + 0x18]
test eax, eax
je 0x10019483
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006b968]
jmp 0x10019488
mov eax, 0x1006bb2c
movzx esi, si
push esi
push eax
push str.__s__ftp_state_use_port____socket_bound_to_port__d
push edi
call fcn.100100b0
add esp, 0x10
push 1
push dword [ebp - 0x1c]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x100194d6
push pe_nt_image_headers32
lea eax, [ebp - 0x250]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.100419a0
push eax
push str.socket_failure:__s
push edi
call fcn.1000fec0
add esp, 0x18
jmp 0x100196df
mov eax, dword [edi + 0x18]
test eax, eax
je 0x100194ed
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006b968]
jmp 0x100194f2
mov eax, 0x1006bb2c
push esi
push eax
push str.__s__ftp_state_use_port____listening_on__d
push edi
call fcn.100100b0
push 0x2f
lea eax, [ebp - 0xd8]
push eax
push ebx
call fcn.1001dc20
mov ebx, dword [ebp - 8]
add esp, 0x1c
cmp byte [ebx + 0x251], 0
jne 0x1001952d
cmp byte [ebx + 0x24c], 0
je 0x1001952d
mov byte [ebx + 0x251], 1
lea eax, [ebp - 0x1c]
push eax
push 1
push ebx
push edi
call fcn.10006bf0
mov ebx, eax
add esp, 0x10
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x100196e4
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], 0xffffffff
cmp esi, 2
je 0x100195c3
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0xa8]
mov eax, dword [ebp - 8]
lea esp, [esp]
cmp byte [eax + 0x251], 0
jne 0x1001957d
test esi, esi
je 0x100195ba
cmp esi, 1
jne 0x10019588
cmp cx, 2
jne 0x100195ba
movzx eax, cx
sub eax, 2
je 0x10019595
sub eax, 0x15
jne 0x100195b7
push dword [ebp - 0xa6]
call ebx
movzx eax, ax
mov dword [ebp - 0xc], eax
test esi, esi
je 0x1001966c
cmp esi, 1
je 0x100195e4
mov cx, word [ebp - 0xa8]
mov eax, dword [ebp - 8]
inc esi
cmp esi, 2
jne 0x10019570
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
push 0x1c
push edi
mov dword [eax + 0xa0], esi
call fcn.10016730
add esp, 8
test ebx, ebx
je 0x10019725
jmp 0x100196e4
lea edx, [ebp - 0x150]
mov edi, 0x2c
lea ebx, [ebp - 0xd8]
mov cl, byte [ebx]
test cl, cl
je 0x1001960a
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc ebx
jne 0x100195f5
mov eax, dword [ebp - 0xc]
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 + 8]
lea eax, [ebp - 0x150]
push eax
push str.PORT
push 0x1006bf6c
push dword [ebp - 0x28]
push edi
call fcn.100336d0
mov ebx, eax
add esp, 0x28
test ebx, ebx
je 0x100195c3
push ebx
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.1000fec0
add esp, 0x10
jmp 0x100195d7
movzx eax, ax
push eax
lea eax, [ebp - 0xd8]
push eax
xor eax, eax
cmp word [ebp - 0xa8], 2
setne al
inc eax
push eax
push str.EPRT
push str._s__d_s_hu
push dword [ebp - 0x28]
push edi
call fcn.100336d0
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x100195c3
push ebx
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.1000fec0
add esp, 0x10
jmp 0x100195d7
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.1000fec0
add esp, 8
jmp 0x100196df
push esi
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.1000fec0
add esp, 0xc
mov ebx, 0x1e
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x37e], 0
je 0x1001971e
test esi, esi
je 0x10019704
movzx eax, byte [esi + 0x37e]
mov eax, dword [eax*4 + 0x1006b968]
jmp 0x10019709
mov eax, 0x1006bb2c
push dword [0x1006b968]
push eax
push str.__s_______s_
push edi
call fcn.100100b0
add esp, 0x10
mov byte [esi + 0x37e], 0
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x1001973a
push eax
push dword [ebp - 8]
push edi
call fcn.10006e00
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret