Function at 0x1002a900
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 [0x1007d820]
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.10064710
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 0x1002ab77
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 0x1002a9b0
sub ecx, dword [ebp - 0x640]
cmp ecx, 1
jbe 0x1002ab77
mov al, byte [edx]
cmp al, 0x5b
jne 0x1002a9f2
lea eax, [edx + 1]
push 0x5d
push eax
mov dword [ebp - 0x634], eax
call fcn.10064a80
add esp, 8
test eax, eax
je 0x1002ab77
mov esi, eax
sub esi, dword [ebp - 0x634]
jmp 0x1002aa40
cmp al, 0x3a
jne 0x1002a9fa
mov eax, edx
jmp 0x1002aa40
push 0x3a
push edx
call fcn.10064a80
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 0x1002ab5c
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 0x1002aab7
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x1002aacb
push 0x3a
push eax
call fcn.10064a80
add esp, 8
mov dword [ebp - 0x65c], eax
test eax, eax
je 0x1002aacb
push 0xa
inc eax
push 0
push eax
call fcn.1006403c
push eax
call fcn.10060600
push 0x2d
push dword [ebp - 0x65c]
movzx eax, ax
mov dword [ebp - 0x648], eax
call fcn.10064a80
add esp, 0x18
test eax, eax
je 0x1002ab48
push 0xa
inc eax
push 0
push eax
call fcn.1006403c
push eax
call fcn.10060600
mov ecx, dword [ebp - 0x648]
add esp, 0x10
movzx eax, ax
mov dword [ebp - 0x650], eax
cmp cx, ax
jbe 0x1002aacb
mov dword [ebp - 0x650], 0
mov dword [ebp - 0x648], 0
mov edx, dword [ebp - 0x634]
test esi, esi
je 0x1002ab77
cmp esi, 0x32
jae 0x1002b134
push esi
push edx
lea eax, [ebp - 0x68]
push eax
call fcn.100640c0
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.100386b0
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 0x1002ab6f
dec eax
je 0x1002b134
dec eax
jne 0x1002ab7d
jmp 0x1002ac1b
mov ecx, dword [ebp - 0x648]
movzx eax, cx
mov dword [ebp - 0x650], eax
jmp 0x1002aacb
mov esi, ecx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x1002ab61
sub esi, ecx
jmp 0x1002aad1
lea eax, [ebp - 0x68]
jmp 0x1002ac21
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 0x1002abd1
push pe_nt_image_headers32
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10054020
push eax
push 0x10004b90
push edi
call fcn.10021300
add esp, 0x18
jmp 0x1002b134
mov ax, word [ebp - 0x630]
push 0x401
cmp ax, 0x17
je 0x1002abf7
lea ecx, [ebp - 0x5b0]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x62c]
push ecx
push eax
jmp 0x1002ac07
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 0x1002b134
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.1002f850
add esp, 0x14
cmp eax, 1
jne 0x1002ac51
lea eax, [ebp - 0x660]
push eax
push edi
call fcn.10013760
add esp, 8
mov eax, dword [ebp - 0x660]
test eax, eax
je 0x1002b120
mov esi, dword [eax]
push eax
push edi
mov dword [ebp - 0x640], esi
call fcn.1002fbf0
add esp, 8
test esi, esi
je 0x1002b120
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.100179c0
add esp, 0x14
test eax, eax
je 0x1002acc3
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 0x1002ac83
jmp 0x1002accd
test esi, esi
jne 0x1002acf3
mov eax, dword [ebp - 0x634]
push pe_nt_image_headers32
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.10054020
push eax
push 0x10004be0
push edi
call fcn.10021300
add esp, 0x18
jmp 0x1002b134
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1002ad0a
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x10004728]
jmp 0x1002ad0f
mov eax, 0x100048ec
push eax
push 0x10004bf4
push edi
call fcn.10021530
push dword [esi + 0x10]
lea eax, [ebp - 0x630]
push dword [esi + 0x18]
push eax
call fcn.100640c0
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 0x1002b110
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 0x1002ae53
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [ebp - 0x635], 0
je 0x1002ae10
cmp eax, 0x2741
jne 0x1002ae10
push pe_nt_image_headers32
lea eax, [ebp - 0x1ac]
push eax
push 0x2741
call fcn.10054020
push eax
movzx eax, si
push eax
push 0x10004c20
push edi
call fcn.100213c0
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 0x1002aba5
mov eax, dword [ebp - 0x648]
movzx esi, ax
cmp si, word [ebp - 0x650]
mov byte [ebp - 0x635], 0
jmp 0x1002ad49
cmp eax, 0x2740
je 0x1002ae1c
cmp eax, 0xd
jne 0x1002ae29
inc esi
cmp si, word [ebp - 0x650]
jmp 0x1002ad49
push pe_nt_image_headers32
lea ecx, [ebp - 0x1ac]
push ecx
push eax
call fcn.10054020
push eax
movzx eax, si
push eax
push 0x10004c50
push edi
call fcn.10021300
add esp, 0x1c
jmp 0x1002b134
cmp si, word [ebp - 0x650]
ja 0x1002b110
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 0x1002aba5
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1002aea3
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x10004728]
jmp 0x1002aea8
mov eax, 0x100048ec
movzx esi, si
push esi
push eax
push 0x10004c90
push edi
call fcn.10021530
add esp, 0x10
push 1
push dword [ebp - 0x644]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1002aef9
push pe_nt_image_headers32
lea eax, [ebp - 0x1ac]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.10054020
push eax
push 0x10004be0
push edi
call fcn.10021300
add esp, 0x18
jmp 0x1002b134
mov eax, dword [edi + 0x18]
test eax, eax
je 0x1002af10
movzx eax, byte [eax + 0x37e]
mov eax, dword [eax*4 + 0x10004728]
jmp 0x1002af15
mov eax, 0x100048ec
push esi
push eax
push 0x10004cc4
push edi
call fcn.10021530
push 0x2f
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x640]
call fcn.1002f800
mov eax, dword [ebp - 0x63c]
add esp, 0x1c
cmp byte [eax + 0x251], 0
jne 0x1002af55
cmp byte [eax + 0x24c], 0
je 0x1002af55
mov byte [eax + 0x251], 1
lea ecx, [ebp - 0x644]
push ecx
push 1
push eax
push edi
call fcn.10017780
mov esi, eax
add esp, 0x10
mov dword [ebp - 0x654], esi
test esi, esi
jne 0x1002b134
mov dword [ebp - 0x644], 0xffffffff
cmp ebx, 2
je 0x1002affc
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 0x1002afad
test ebx, ebx
je 0x1002aff0
cmp ebx, 1
jne 0x1002afb8
cmp cx, 2
jne 0x1002aff0
movzx eax, cx
sub eax, 2
je 0x1002afc5
sub eax, 0x15
jne 0x1002afea
push dword [ebp - 0x62e]
call esi
movzx eax, ax
mov dword [ebp - 0x640], eax
test ebx, ebx
je 0x1002b0b6
cmp ebx, 1
je 0x1002b020
mov cx, word [ebp - 0x630]
mov eax, dword [ebp - 0x63c]
inc ebx
cmp ebx, 2
jne 0x1002afa0
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x658]
push 0x1c
push edi
mov dword [eax + 0xa0], ebx
call fcn.10027e60
add esp, 8
test esi, esi
je 0x1002b17b
jmp 0x1002b134
lea edx, [ebp - 0xac]
mov edi, 0x2c
lea esi, [ebp - 0x34]
mov edi, edi
mov cl, byte [esi]
test cl, cl
je 0x1002b045
cmp cl, 0x2e
movzx eax, cl
cmove eax, edi
mov byte [edx], al
inc edx
inc esi
jne 0x1002b030
mov eax, dword [ebp - 0x640]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push 0x10004d24
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 0x100047c1
push 0x10004d2c
push dword [ebp - 0x658]
push edi
call fcn.10045ee0
mov esi, eax
add esp, 0x28
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1002affc
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push 0x10004d34
push edi
call fcn.10021300
add esp, 0x10
jmp 0x1002b013
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 0x100047bc
push 0x10004cf0
push dword [ebp - 0x658]
push edi
call fcn.10045ee0
mov esi, eax
add esp, 0x1c
mov dword [ebp - 0x654], esi
test esi, esi
je 0x1002affc
push esi
call sym.libcurl.dll_curl_easy_strerror
push eax
push 0x10004d00
push edi
call fcn.10021300
add esp, 0x10
jmp 0x1002b013
push 0x10004c6c
push edi
call fcn.10021300
add esp, 8
jmp 0x1002b134
push dword [ebp - 0x634]
push 0x10004bac
push edi
call fcn.10021300
add esp, 0xc
mov esi, dword [edi + 0x18]
cmp byte [esi + 0x37e], 0
je 0x1002b16e
test esi, esi
je 0x1002b154
movzx eax, byte [esi + 0x37e]
mov eax, dword [eax*4 + 0x10004728]
jmp 0x1002b159
mov eax, 0x100048ec
push dword [0x10004728]
push eax
push 0x100048f0
push edi
call fcn.10021530
add esp, 0x10
mov byte [esi + 0x37e], 0
mov esi, dword [ebp - 0x654]
mov eax, dword [ebp - 0x644]
cmp eax, 0xffffffff
je 0x1002b196
push eax
push dword [ebp - 0x63c]
push edi
call fcn.10017990
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100631a7
mov esp, ebp
pop ebp
ret