// File: tenup-coin[P]seeder/netbase.cpp
// Function: CNetAddr::SetSpecial(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool CNetAddr::SetSpecial(const std::string &strName)
{
    if (strName.size()>6 && strName.substr(strName.size() - 6, 6) == ".onion") {
        std::vector<unsigned char> vchAddr = DecodeBase32(strName.substr(0, strName.size() - 6).c_str());
        if (vchAddr.size() != 16-sizeof(pchOnionCat))
            return false;
        memcpy(ip, pchOnionCat, sizeof(pchOnionCat));
        for (unsigned int i=0; i<16-sizeof(pchOnionCat); i++)
            ip[i + sizeof(pchOnionCat)] = vchAddr[i];
        return true;
    }
    if (strName.size()>11 && strName.substr(strName.size() - 11, 11) == ".oc.b32.i2p") {
        std::vector<unsigned char> vchAddr = DecodeBase32(strName.substr(0, strName.size() - 11).c_str());
        if (vchAddr.size() != 16-sizeof(pchGarliCat))
            return false;
        memcpy(ip, pchOnionCat, sizeof(pchGarliCat));
        for (unsigned int i=0; i<16-sizeof(pchGarliCat); i++)
            ip[i + sizeof(pchGarliCat)] = vchAddr[i];
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4380
movq %rax, %rcx
movb $0x0, -0x39(%rbp)
xorl %eax, %eax
cmpq $0x6, %rcx
movb %al, -0xf5(%rbp)
jbe 0x12f2c
movq -0x18(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x4380
movq -0x118(%rbp), %rsi
movq %rax, %rdx
addq $-0x6, %rdx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x110(%rbp)
movl $0x6, %ecx
callq 0x44f0
movq -0x110(%rbp), %rdi
movb $0x1, -0x39(%rbp)
leaq 0x204b6(%rip), %rsi     # 0x333c7
callq 0xdba0
movb %al, -0x101(%rbp)
jmp 0x12f1e
movb -0x101(%rbp), %al
movb %al, -0xf5(%rbp)
jmp 0x12f2c
movb -0xf5(%rbp), %al
movb %al, -0x119(%rbp)
testb $0x1, -0x39(%rbp)
jne 0x12f40
jmp 0x12f49
leaq -0x38(%rbp), %rdi
callq 0x42f0
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x12f58
jmp 0x130a6
movq -0x18(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x4380
movq -0x138(%rbp), %rsi
movq %rax, %rcx
addq $-0x6, %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x128(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x44f0
movq -0x130(%rbp), %rdi
callq 0x41e0
movq -0x128(%rbp), %rdx
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
callq 0x318d0
jmp 0x12fb5
leaq -0x88(%rbp), %rdi
callq 0x42f0
leaq -0x68(%rbp), %rdi
callq 0x15510
cmpq $0xa, %rax
je 0x13022
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0x13098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x39(%rbp)
jne 0x12ff7
jmp 0x13000
leaq -0x38(%rbp), %rdi
callq 0x42f0
jmp 0x132ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x42f0
jmp 0x132ce
movq -0x100(%rbp), %rax
movl 0x202a5(%rip), %ecx     # 0x332d4
movl %ecx, (%rax)
movw 0x202a0(%rip), %cx      # 0x332d8
movw %cx, 0x4(%rax)
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpq $0xa, %rax
jae 0x1308a
movl -0x90(%rbp), %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x15530
movq %rax, %rcx
movq -0x100(%rbp), %rax
movb (%rcx), %dl
movl -0x90(%rbp), %ecx
movb %dl, 0x6(%rax,%rcx)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x13046
movb $0x1, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x15550
jmp 0x132c0
movq -0x18(%rbp), %rdi
callq 0x4380
movq %rax, %rcx
movb $0x0, -0xb1(%rbp)
xorl %eax, %eax
cmpq $0xb, %rcx
movb %al, -0x139(%rbp)
jbe 0x1312d
movq -0x18(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x4380
movq -0x150(%rbp), %rsi
movq %rax, %rdx
addq $-0xb, %rdx
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movl $0xb, %ecx
callq 0x44f0
movq -0x148(%rbp), %rdi
movb $0x1, -0xb1(%rbp)
leaq 0x202bc(%rip), %rsi     # 0x333ce
callq 0xdba0
movb %al, -0x13a(%rbp)
jmp 0x1311f
movb -0x13a(%rbp), %al
movb %al, -0x139(%rbp)
jmp 0x1312d
movb -0x139(%rbp), %al
movb %al, -0x151(%rbp)
testb $0x1, -0xb1(%rbp)
jne 0x13144
jmp 0x13150
leaq -0xb0(%rbp), %rdi
callq 0x42f0
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x1315f
jmp 0x132bc
movq -0x18(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x4380
movq -0x170(%rbp), %rsi
movq %rax, %rcx
addq $-0xb, %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x160(%rbp)
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x44f0
movq -0x168(%rbp), %rdi
callq 0x41e0
movq -0x160(%rbp), %rdx
movq %rax, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x318d0
jmp 0x131bf
leaq -0xf0(%rbp), %rdi
callq 0x42f0
leaq -0xd0(%rbp), %rdi
callq 0x15510
cmpq $0xa, %rax
je 0x13235
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0x132ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0xb1(%rbp)
jne 0x13207
jmp 0x13213
leaq -0xb0(%rbp), %rdi
callq 0x42f0
jmp 0x132ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x42f0
jmp 0x132ce
movq -0x100(%rbp), %rax
movl 0x20092(%rip), %ecx     # 0x332d4
movl %ecx, (%rax)
movw 0x2008d(%rip), %cx      # 0x332d8
movw %cx, 0x4(%rax)
movl $0x0, -0xf4(%rbp)
movl -0xf4(%rbp), %eax
cmpq $0xa, %rax
jae 0x132a0
movl -0xf4(%rbp), %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
callq 0x15530
movq %rax, %rcx
movq -0x100(%rbp), %rax
movb (%rcx), %dl
movl -0xf4(%rbp), %ecx
movb %dl, 0x6(%rax,%rcx)
movl -0xf4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xf4(%rbp)
jmp 0x13259
movb $0x1, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x15550
jmp 0x132c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x47f0
nopw (%rax,%rax)