Function at 0x1001a040
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 [0x1007e820]
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.10053f70
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 0x1001a2b7
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 0x1001a0f0
sub ecx, dword [ebp - 0x640]
cmp ecx, 1
jbe 0x1001a2b7
mov al, byte [edx]
cmp al, 0x5b
jne 0x1001a132
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [ebp - 0x634], eax
call fcn.100542e0
add esp, 8
test eax, eax
je 0x1001a2b7
mov esi, eax
sub esi, dword [ebp - 0x634]
jmp 0x1001a180
cmp al, 0x3a
jne 0x1001a13a
mov eax, edx
jmp 0x1001a180
push 0x3a
push edx
call fcn.100542e0
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 0x1001a29c
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 0x1001a1f7
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x1001a20b
push 0x3a
push eax
call fcn.100542e0
add esp, 8
mov dword [ebp - 0x65c], eax
test eax, eax
je 0x1001a20b
push 0xa
inc eax
push 0
push eax
call fcn.10053ef4
push eax
call fcn.1004fd00
push 0x2d
push dword [ebp - 0x65c]
movzx eax, ax
mov dword [ebp - 0x648], eax
call fcn.100542e0
add esp, 0x18
test eax, eax
je 0x1001a288
push 0xa
inc eax
push 0
push eax
call fcn.10053ef4
push eax
call fcn.1004fd00
mov ecx, dword [ebp - 0x648]
add esp, 0x10
movzx eax, ax
mov dword [ebp - 0x650], eax
cmp cx, ax
jbe 0x1001a20b
mov dword [ebp - 0x650], 0
mov dword [ebp - 0x648], 0
mov edx, dword [ebp - 0x634]
test esi, esi
je 0x1001a2b7
cmp esi, 0x32
jae 0x1001a874
push esi
push edx
lea eax, [ebp - 0x68]
push eax
call fcn.10053390
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.10027dd0
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 0x1001a2af
dec eax
je 0x1001a874
dec eax
jne 0x1001a2bd
jmp 0x1001a35b
mov ecx, dword [ebp - 0x648]
movzx eax, cx
mov dword [ebp - 0x650], eax
jmp 0x1001a20b
mov esi, ecx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1001a2a1
sub esi, ecx
jmp 0x1001a211
lea eax, [ebp - 0x68]
jmp 0x1001a361
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 0x1001a311
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043740
push eax
push str.getsockname___failed:__s
push edi
call fcn.10010a90
add esp, 0x18
jmp 0x1001a874
mov ax, word [ebp - 0x630]
push 0x401
cmp ax, 0x17
je 0x1001a337
lea ecx, [ebp - 0x5b0]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x62c]
push ecx
push eax
jmp 0x1001a347
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 0x1001a874
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.1001efa0
add esp, 0x14
cmp eax, 1
jne 0x1001a391
lea eax, [ebp - 0x660]
push eax
push edi
call fcn.10002ee0
add esp, 8
mov eax, dword [ebp - 0x660]
test eax, eax
je 0x1001a860
mov esi, dword [eax]
push eax
push edi
mov dword [ebp - 0x640], esi
call fcn.1001f340
add esp, 8
test esi, esi
je 0x1001a860
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.10007140
add esp, 0x14
test eax, eax
je 0x1001a403
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 0x1001a3c3
jmp 0x1001a40d
test esi, esi
jne 0x1001a433
mov eax, dword [ebp - 0x634]
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.10043740
push eax
push str.socket_failure:__s
push edi
call fcn.10010a90
add esp, 0x18
jmp 0x1001a874
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a44a
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d958]
jmp 0x1001a44f
mov eax, 0x1006db1c
push eax
push str.__s__ftp_state_use_port____opened_socket
push edi
call fcn.10010cc0
push dword [esi + 0x10]
lea eax, [ebp - 0x630]
push dword [esi + 0x18]
push eax
call fcn.10053390
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 0x1001a850
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 0x1001a593
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x635], 0
je 0x1001a550
cmp eax, 0x2741
jne 0x1001a550
push 0x100
lea eax, [ebp - 0x1ac]
push eax
push 0x2741
call fcn.10043740
push eax
movzx eax, si
push eax
push str.bind_port_hu__on_non_local_address_failed:__s
push edi
call fcn.10010b50
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 0x1001a2e5
mov eax, dword [ebp - 0x648]
movzx esi, ax
cmp si, word [ebp - 0x650]
mov byte [ebp - 0x635], 0
jmp 0x1001a489
cmp eax, 0x2740
je 0x1001a55c
cmp eax, 0xd
jne 0x1001a569
inc esi
cmp si, word [ebp - 0x650]
jmp 0x1001a489
push 0x100
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.10043740
push eax
movzx eax, si
push eax
push str.bind_port_hu__failed:__s
push edi
call fcn.10010a90
add esp, 0x1c
jmp 0x1001a874
cmp si, word [ebp - 0x650]
ja 0x1001a850
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 0x1001a2e5
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a5e3
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d958]
jmp 0x1001a5e8
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.10010cc0
add esp, 0x10
push 1
push dword [ebp - 0x644]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1001a639
push 0x100
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10043740
push eax
push str.socket_failure:__s
push edi
call fcn.10010a90
add esp, 0x18
jmp 0x1001a874
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1001a650
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x1006d958]
jmp 0x1001a655
mov eax, 0x1006db1c
push esi
push eax
push str.__s__ftp_state_use_port____listening_on__d
push edi
call fcn.10010cc0
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x640]
call fcn.1001ef50
mov eax, dword [ebp - 0x63c]
add esp, 0x1c
cmp byte [eax + 0x251], 0
jne 0x1001a695
cmp byte [eax + 0x24c], 0
je 0x1001a695
mov byte [eax + 0x251], 1
lea ecx, [ebp - 0x644]
push ecx
push 1
push eax
push edi
call fcn.10006f00
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x654], esi
test esi, esi
jne 0x1001a874
mov dword [ebp - 0x644], 0xffffffff
cmp ebx, 2
je 0x1001a73c
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 0x1001a6ed
test ebx, ebx
je 0x1001a730
cmp ebx, 1
jne 0x1001a6f8
cmp cx, 2
jne 0x1001a730
movzx eax, cx
sub eax, 2
je 0x1001a705
sub eax, 0x15
jne 0x1001a72a
push dword [ebp - 0x62e]
call esi
movzx eax, ax
mov dword [ebp - 0x640], eax
test ebx, ebx
je 0x1001a7f6
cmp ebx, 1
je 0x1001a760
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x63c]
inc ebx
cmp ebx, 2
jne 0x1001a6e0
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x658]
push 0x1c
push edi
mov dword [eax + 0xa0], ebx
call fcn.100175a0
add esp, 8
test esi, esi
je 0x1001a8bb
jmp 0x1001a874
lea edx, [ebp - 0xac]
mov edi, 0x2c
lea esi, [ebp - 0x34]
mov edi, edi
mov cl, byte [esi]
test cl, cl
je 0x1001a785
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x1001a770
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.10035550
mov esi, eax
add esp, 0x28
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1001a73c
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_PORT_command:__s
push edi
call fcn.10010a90
add esp, 0x10
jmp 0x1001a753
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.10035550
mov esi, eax
add esp, 0x1c
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1001a73c
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push str.Failure_sending_EPRT_command:__s
push edi
call fcn.10010a90
add esp, 0x10
jmp 0x1001a753
push str.bind___failed__we_ran_out_of_ports
push edi
call fcn.10010a90
add esp, 8
jmp 0x1001a874
push dword [ebp - 0x634]
push str.failed_to_resolve_the_address_provided_to_PORT:__s
push edi
call fcn.10010a90
add esp, 0xc
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x37e], 0
je 0x1001a8ae
test esi, esi
je 0x1001a894
movzx eax, byte [esi + 0x37e]
mov eax, dword [eax*4 + 0x1006d958]
jmp 0x1001a899
mov eax, 0x1006db1c
push dword [0x1006d958]
push eax
push str.__s_______s_
push edi
call fcn.10010cc0
add esp, 0x10
mov byte [esi + 0x37e], 0
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x644]
cmp eax, 0xffffffff
je 0x1001a8d6
push eax
push dword [ebp - 0x63c]
push edi
call fcn.10007110
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100528f7
mov esp, ebp
pop ebp
ret