// File: Vanuan[P]pocketbook_free_swupdate/PocketBookUpdate.cpp
// Function: PocketBookUpdate::print()
void PocketBookUpdate::print()
{
  cout << "Header part: " << endl;

  unsigned int offset = 0;
  unsigned int size = 0;

  size = printField(0);
  const char * tab = "\t\t\t\t\t\t\t";
  cout << tab;
  cout.write(header->magic, size);
  cout << endl;

  size = printField(1);
  cout << tab;
  cout.write(header->model, size);
  cout << endl;

  size = printField(2);
  cout << tab;
  cout << endl;
  size = printField(3);
  cout << tab;
  cout << endl;
  size = printField(4);
  cout << tab;
  cout << header->unknownUInt32;
  cout << endl;
  size = printField(5);
  cout << tab;
  cout << endl;
  size = printField(6);
  cout << tab;
  cout << endl;

  cout << "Firmware partitions: " << endl;
  printParts();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x7a65(%rip), %rdi      # 0xbfd0
leaq 0x3b64(%rip), %rsi      # 0x80d6
callq 0x3250
movq %rax, %rdi
movq 0x7a3f(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
xorl %esi, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
leaq 0x3b3b(%rip), %rax      # 0x80e4
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
movq 0x7a18(%rip), %rdi      # 0xbfd0
callq 0x3250
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x10(%rbp), %eax
movl %eax, %edx
movq 0x79ff(%rip), %rdi      # 0xbfd0
callq 0x3360
movq 0x79f3(%rip), %rdi      # 0xbfd0
movq 0x79dc(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x79cb(%rip), %rdi      # 0xbfd0
callq 0x3250
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
addq $0x10, %rsi
movl -0x10(%rbp), %eax
movl %eax, %edx
movq 0x79ae(%rip), %rdi      # 0xbfd0
callq 0x3360
movq 0x79a2(%rip), %rdi      # 0xbfd0
movq 0x798b(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x797a(%rip), %rdi      # 0xbfd0
callq 0x3250
movq 0x796e(%rip), %rdi      # 0xbfd0
movq 0x7957(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x3, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x7946(%rip), %rdi      # 0xbfd0
callq 0x3250
movq 0x793a(%rip), %rdi      # 0xbfd0
movq 0x7923(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x4, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x7912(%rip), %rdi      # 0xbfd0
callq 0x3250
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl 0xc0(%rax), %esi
movq 0x78f8(%rip), %rdi      # 0xbfd0
callq 0x3370
movq 0x78ec(%rip), %rdi      # 0xbfd0
movq 0x78d5(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x5, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x78c4(%rip), %rdi      # 0xbfd0
callq 0x3250
movq 0x78b8(%rip), %rdi      # 0xbfd0
movq 0x78a1(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
movl $0x6, %esi
callq 0x44b0
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rsi
movq 0x7890(%rip), %rdi      # 0xbfd0
callq 0x3250
movq 0x7884(%rip), %rdi      # 0xbfd0
movq 0x786d(%rip), %rsi      # 0xbfc0
callq 0x3290
movq 0x7871(%rip), %rdi      # 0xbfd0
leaq 0x3986(%rip), %rsi      # 0x80ec
callq 0x3250
movq %rax, %rdi
movq 0x784b(%rip), %rsi      # 0xbfc0
callq 0x3290
movq -0x20(%rbp), %rdi
callq 0x4790
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)