// File: CoinBlack[P]blackcoin-seeder/main.cpp
// Function: ThreadSeeder
void* ThreadSeeder(void*) {
  vector<string> vDnsSeeds;
  for (const string& seed: vSeeds) {
    size_t len = seed.size();
    if (len > 6 && !seed.compare(len - 6, 6, ".onion")) {
      db.Add(CService(seed.c_str(), GetDefaultPort()), true);
    } else {
      vDnsSeeds.push_back(seed);
    }
  }
  do {
    for (const string& seed: vDnsSeeds) {
      vector<CNetAddr> ips;
      LookupHost(seed.c_str(), ips);
      for (vector<CNetAddr>::iterator it = ips.begin(); it != ips.end(); it++) {
        db.Add(CService(*it, GetDefaultPort()), true);
      }
    }
    Sleep(1800000);
  } while(1);
  return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x25f30
leaq 0x29bc1(%rip), %rax     # 0x4d910
movq %rax, -0x28(%rbp)
leaq 0x29bb6(%rip), %rdi     # 0x4d910
callq 0x25fb0
movq %rax, -0x30(%rbp)
leaq 0x29ba6(%rip), %rdi     # 0x4d910
callq 0x25fe0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x26010
testb $0x1, %al
jne 0x23d89
jmp 0x23e9e
leaq -0x30(%rbp), %rdi
callq 0x26050
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4370
movq %rax, -0x48(%rbp)
cmpq $0x6, -0x48(%rbp)
jbe 0x23e7d
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq $-0x6, %rsi
leaq 0x11ffe(%rip), %rcx     # 0x35dbf
movl $0x6, %edx
callq 0x4680
movl %eax, -0x12c(%rbp)
jmp 0x23dd3
movl -0x12c(%rbp), %eax
cmpl $0x0, %eax
jne 0x23e7d
movq -0x40(%rbp), %rdi
callq 0x41e0
movq %rax, -0x138(%rbp)
movzbl 0x297e7(%rip), %edi     # 0x4d5e0
andl $0x1, %edi
callq 0x240a0
movw %ax, -0x12e(%rbp)
jmp 0x23e0a
movq -0x138(%rbp), %rsi
movw -0x12e(%rbp), %ax
movzwl %ax, %edx
leaq -0x98(%rbp), %rdi
xorl %ecx, %ecx
callq 0x14e70
jmp 0x23e2b
movw -0x88(%rbp), %cx
movq %rsp, %rax
movw %cx, 0x10(%rax)
movups -0x98(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x18e90
jmp 0x23e53
leaq 0x2978e(%rip), %rdi     # 0x4d5e8
leaq -0x80(%rbp), %rsi
movl $0x1, %edx
callq 0x26070
jmp 0x23e6a
jmp 0x23e8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x24089
movq -0x40(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x260f0
jmp 0x23e8c
jmp 0x23e8e
jmp 0x23e90
leaq -0x30(%rbp), %rdi
callq 0x26160
jmp 0x23d73
jmp 0x23ea0
leaq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x25fb0
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
callq 0x25fe0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x26010
testb $0x1, %al
jne 0x23eed
jmp 0x2405b
leaq -0xa8(%rbp), %rdi
callq 0x26050
movq %rax, -0xb8(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x15820
movq -0xb8(%rbp), %rdi
callq 0x41e0
movq -0x140(%rbp), %rsi
movq %rax, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xfe30
jmp 0x23f37
leaq -0xd0(%rbp), %rdi
callq 0x162f0
movq %rax, -0xd8(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x16170
movq %rax, -0xe0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x26180
testb $0x1, %al
jne 0x23f79
jmp 0x2403e
leaq -0xd8(%rbp), %rdi
callq 0x261c0
movq %rax, -0x150(%rbp)
movzbl 0x2964d(%rip), %edi     # 0x4d5e0
andl $0x1, %edi
callq 0x240a0
movw %ax, -0x142(%rbp)
jmp 0x23fa4
movq -0x150(%rbp), %rsi
movw -0x142(%rbp), %ax
movzwl %ax, %edx
leaq -0x120(%rbp), %rdi
callq 0x14bb0
jmp 0x23fc3
movw -0x110(%rbp), %cx
movq %rsp, %rax
movw %cx, 0x10(%rax)
movups -0x120(%rbp), %xmm0
movups %xmm0, (%rax)
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
callq 0x18e90
jmp 0x23fee
leaq 0x295f3(%rip), %rdi     # 0x4d5e8
leaq -0x108(%rbp), %rsi
movl $0x1, %edx
callq 0x26070
jmp 0x24008
jmp 0x2400a
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
callq 0x261e0
movq %rax, -0x128(%rbp)
jmp 0x23f4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x15930
jmp 0x24089
leaq -0xd0(%rbp), %rdi
callq 0x15930
leaq -0xa8(%rbp), %rdi
callq 0x26160
jmp 0x23ed1
movl $0x1b7740, %edi         # imm = 0x1B7740
callq 0x23130
jmp 0x24067
jmp 0x24069
movb $0x1, %al
testb $0x1, %al
jne 0x23ea0
jmp 0x24075
leaq -0x20(%rbp), %rdi
callq 0x25f50
xorl %eax, %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x25f50
movq -0x50(%rbp), %rdi
callq 0x4840
nopl (%rax,%rax)