user: 这段汇编代码用C语言表示是什么样的：

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x638,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2628(%rsp)
  xor    %eax,%eax
  lea    0x220(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    0x190(%rsp),%rdi
  mov    $0x11,%ecx
  rep stos %rax,%es:(%rdi)
  lea    0xe20(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    0x1220(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    0x1620(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    0x1a20(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  lea    0x1e20(%rsp),%rdi
  mov    $0x7f,%ecx
  rep stos %rax,%es:(%rdi)
  movl   $0x0,(%rdi)
  movq   $0x0,0xb0(%rsp)
  movq   $0x0,0xb8(%rsp)
  movq   $0x0,0xc0(%rsp)
  movq   $0x0,0xc8(%rsp)
  movq   $0x0,0xd0(%rsp)
  movq   $0x0,0xd8(%rsp)
  movq   $0x0,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movl   $0x0,0xf0(%rsp)
  lea    D152(%rip),%rsi
  lea    D12(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  mov    $0x0,%r12d
  lea    D157(%rip),%r13
  test   %rax,%rax
  je     L315
L365:
  lea    0x2220(%rsp),%rbp
L102:
  mov    %rbx,%rdx
  mov    $0xff,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L209
  cmpl   $0x23,0x2220(%rsp)
  je     L102
  cmp    $0x3,%r12d
  jle    L457
L337:
  cmp    $0x4,%r12d
  ja     L492
  mov    %r12d,%eax
  movslq 0x0(%r13,%rax,4),%rax
  add    %r13,%rax
  notrack jmp *%rax
L315:
  lea    D73(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%r12d
  jmp    L472
L457:
  lea    0x2220(%rsp),%rdi
  call   <strlen@plt>
  mov    %eax,%r15d
  lea    -0x1(%rax),%eax
  movslq %eax,%rdx
  cmpl   $0xa,0x2220(%rsp,%rdx,4)
  je     L30
L96:
  movslq %r15d,%rax
  movl   $0x0,0x2220(%rsp,%rax,4)
  jmp    L337
L30:
  movslq %r15d,%r15
  movl   $0x0,0x2220(%rsp,%r15,4)
  mov    %eax,%r15d
  jmp    L96
  lea    0x1(%r15),%edx
  lea    0x2220(%rsp),%rsi
  lea    0x1220(%rsp),%rdi
  call   <memcpy@plt>
L492:
  add    $0x1,%r12d
  jmp    L365
  lea    0x1(%r15),%edx
  lea    0x2220(%rsp),%rsi
  lea    0x1620(%rsp),%rdi
  call   <memcpy@plt>
  jmp    L492
  lea    0x1(%r15),%edx
  lea    0x2220(%rsp),%rsi
  lea    0x1a20(%rsp),%rdi
  call   <memcpy@plt>
  jmp    L492
  lea    0x1(%r15),%edx
  lea    0x2220(%rsp),%rsi
  lea    0x1e20(%rsp),%rdi
  call   <memcpy@plt>
  jmp    L492
  lea    0x2220(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%r14d
  jmp    L492
L209:
  mov    %rbx,%rdi
  call   <fclose@plt>
  cmp    $0x4,%r12d
  jle    L455
  mov    $0x0,%edi
  call   <mysql_init@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L289
  lea    0x1a20(%rsp),%rcx
  lea    0x1620(%rsp),%rdx
  lea    0x1220(%rsp),%rsi
  push   $0x0
  push   $0x0
  mov    %r14d,%r9d
  mov    $0x0,%r8d
  mov    %rax,%rdi
  call   <mysql_real_connect@plt>
  add    $0x10,%rsp
  test   %rax,%rax
  jne    L136
L289:
  mov    %rbp,%rdi
  call   <mysql_error@plt>
  mov    %rax,%rcx
  lea    0x1220(%rsp),%rsi
  mov    %r14d,%edx
  lea    D276(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <mysql_close@plt>
  mov    $0x1,%r12d
L472:
  mov    0x2628(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L353
  mov    %r12d,%eax
  add    $0x2638,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L455:
  lea    D112(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%r12d
  jmp    L472
L136:
  lea    0x1e20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <mysql_select_db@plt>
  test   %rax,%rax
  js     L243
  lea    D317(%rip),%rdi
  call   <puts@plt>
  lea    D373(%rip),%rdi
  call   <puts@plt>
  lea    D149(%rip),%r14
  jmp    L446
L243:
  lea    0x1e20(%rsp),%rsi
  lea    D288(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <mysql_close@plt>
  mov    $0x2,%r12d
  jmp    L472
L197:
  lea    D307(%rip),%rdi
  call   <puts@plt>
  mov    %r13,%rdi
  call   <mysql_fetch_row@plt>
  mov    %rax,%r15
  mov    %r13,%rdi
  call   <mysql_num_fields@plt>
  mov    %eax,%r12d
  lea    D299(%rip),%rdi
  call   <puts@plt>
  lea    D50(%rip),%rdi
  call   <puts@plt>
  test   %r12d,%r12d
  jle    L137
  mov    %r12d,%eax
  mov    %rax,(%rsp)
  mov    $0x0,%r12d
L486:
  mov    (%r15,%r12,8),%rdx
  mov    %r12d,%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%r12
  cmp    (%rsp),%r12
  jne    L486
  mov    %ebx,%r12d
  jmp    L504
L137:
  mov    %ebx,%r12d
  jmp    L504
L373:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%r12d
  jmp    L472
L505:
  lea    D390(%rip),%rdi
  call   <puts@plt>
L446:
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x220(%rsp),%rbx
  mov    %rbx,%rsi
  lea    D189(%rip),%rdi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    $0x10,%eax
  jg     L505
  mov    %rbx,%rdx
  lea    0xe20(%rsp),%rbx
  lea    D207(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mysql_query@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L373
  mov    %rbp,%rdi
  call   <mysql_store_result@plt>
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <mysql_num_rows@plt>
  mov    $0x1,%r12d
  test   %eax,%eax
  jne    L197
L504:
  mov    %r13,%rdi
  call   <mysql_free_result@plt>
  test   %r12d,%r12d
  je     L446
  lea    0x220(%rsp),%r13
  mov    %r13,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  lea    0x10(%rsp),%rdi
  mov    %r13,%rsi
  call   <memcpy@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %rax,0x8(%rsp)
  lea    D49(%rip),%r15
  lea    D189(%rip),%r14
  jmp    L203
L511:
  lea    0x220(%rsp),%r13
  lea    0x100(%rsp),%rdi
  mov    $0x11,%edx
  mov    %r13,%rsi
  call   <memcpy@plt>
  lea    D273(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  lea    0x60(%rsp),%rdi
  mov    $0x11,%edx
  mov    %r13,%rsi
  call   <memcpy@plt>
  mov    %r12d,%r13d
  mov    $0x0,%eax
  lea    0x60(%rsp),%rdx
L46:
  mov    (%rdx,%rax,1),%ecx
  cmp    %ecx,0x100(%rsp,%rax,1)
  cmovne %ebx,%r13d
  add    $0x4,%rax
  cmp    $0x40,%rax
  jne    L46
  test   %r13d,%r13d
  jne    L298
  lea    D18(%rip),%rdi
  call   <puts@plt>
L203:
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x220(%rsp),%r13
  mov    %r13,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  cmp    $0x10,%eax
  jle    L511
  lea    0x220(%rsp),%rdi
  call   <strlen@plt>
  cmp    $0x7,%eax
  jle    L511
  lea    D27(%rip),%rdi
  call   <puts@plt>
  jmp    L203
L298:
  lea    D189(%rip),%r15
L367:
  lea    D153(%rip),%r14
  jmp    L196
L230:
  lea    D219(%rip),%rdi
  call   <puts@plt>
L196:
  lea    D20(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x220(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  lea    0x620(%rsp),%r12
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <memcpy@plt>
  lea    0xe20(%rsp),%rbx
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mysql_query@plt>
  test   %eax,%eax
  jne    L450
  mov    %rbp,%rdi
  call   <mysql_store_result@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <mysql_num_rows@plt>
  mov    %rax,%rbx
  mov    %eax,(%rsp)
  mov    %r12,%rdi
  call   <mysql_free_result@plt>
  test   %ebx,%ebx
  jne    L230
  lea    D267(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x220(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%edx
  lea    0xa20(%rsp),%rdi
  mov    %rbx,%rsi
  call   <memcpy@plt>
  mov    %r13d,%r12d
  mov    $0x0,%ebx
  lea    0x620(%rsp),%r14
  jmp    L162
L450:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  mov    %r13d,%r12d
  jmp    L472
L201:
  mov    0xa20(%rsp,%rbx,4),%eax
  cmp    %eax,(%r14,%rbx,4)
  cmovne (%rsp),%r12d
  add    $0x1,%rbx
L162:
  mov    %r14,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jg     L201
  test   %r12d,%r12d
  jne    L281
  lea    D82(%rip),%rdi
  call   <puts@plt>
  jmp    L367
L281:
  lea    0xe20(%rsp),%rbx
  lea    D145(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mysql_query@plt>
  test   %eax,%eax
  jne    L245
  mov    %rbp,%rdi
  call   <mysql_store_result@plt>
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <mysql_num_rows@plt>
  mov    %rax,(%rsp)
  mov    %eax,%r13d
  mov    %rbx,%rdi
  call   <mysql_free_result@plt>
  mov    %r13d,%esi
  lea    D335(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xe10,%ecx
  mov    0x8(%rsp),%eax
  mov    $0x0,%edx
  div    %ecx
  mov    %eax,%r13d
  lea    0x100(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r15d
  lea    0x2220(%rsp),%r14
  mov    %r13d,%edx
  lea    D58(%rip),%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  movslq %r15d,%r15
  lea    (%rbx,%r15,4),%rdi
  mov    %r14,%rdx
  lea    D115(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    0xb0(%rsp),%rsi
  mov    %rbx,%rdi
  call   <MDString@plt>
  lea    0x190(%rsp),%r14
  mov    $0x0,%ebx
  lea    D59(%rip),%r15
L121:
  mov    0xb0(%rsp,%rbx,4),%edx
  mov    %r15,%rsi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x1,%rbx
  add    $0x8,%r14
  cmp    $0x10,%rbx
  jne    L121
  movl   $0x0,0x210(%rsp)
  cmpl   $0x0,(%rsp)
  jne    L17
  lea    0x190(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xe20(%rsp),%rdi
  sub    $0x8,%rsp
  push   $0x280de81
  mov    %r13d,%r9d
  lea    0x630(%rsp),%r8
  lea    D218(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  add    $0x10,%rsp
L76:
  lea    0xe20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <mysql_query@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  jne    L405
  lea    D243(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <mysql_close@plt>
  mov    %ebx,%r12d
  jmp    L472
L245:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  jmp    L472
L17:
  lea    0x190(%rsp),%rcx
  lea    0x10(%rsp),%rdx
  lea    0xe20(%rsp),%rdi
  mov    %r13d,%r9d
  lea    0x620(%rsp),%r8
  lea    D19(%rip),%rsi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L76
L405:
  lea    D102(%rip),%rdi
  call   <puts@plt>
  jmp    L472
L353:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D152
type_guessed: string
name: extract_symbolic_data
arguments: tag: D12
type_guessed: string
name: extract_symbolic_data
arguments: tag: D73
type_guessed: string
name: extract_symbolic_data
arguments: tag: D276
type_guessed: string
name: extract_symbolic_data
arguments: tag: D112
type_guessed: string
name: extract_symbolic_data
arguments: tag: D317
type_guessed: string
name: extract_symbolic_data
arguments: tag: D373
type_guessed: string
name: extract_symbolic_data
arguments: tag: D149
type_guessed: string
name: extract_symbolic_data
arguments: tag: D288
type_guessed: string
name: extract_symbolic_data
arguments: tag: D307
type_guessed: string
name: extract_symbolic_data
arguments: tag: D299
type_guessed: string
name: extract_symbolic_data
arguments: tag: D50
type_guessed: string
name: extract_symbolic_data
arguments: tag: D43
type_guessed: string
name: extract_symbolic_data
arguments: tag: D102
type_guessed: string
name: extract_symbolic_data
arguments: tag: D390
type_guessed: string
name: extract_symbolic_data
arguments: tag: D189
type_guessed: string
name: extract_symbolic_data
arguments: tag: D207
type_guessed: string
name: extract_symbolic_data
arguments: tag: D49
type_guessed: string
name: extract_symbolic_data
arguments: tag: D273
type_guessed: string
name: extract_symbolic_data
arguments: tag: D18
type_guessed: string
name: extract_symbolic_data
arguments: tag: D27
type_guessed: string
name: extract_symbolic_data
arguments: tag: D153
type_guessed: string
name: extract_symbolic_data
arguments: tag: D219
type_guessed: string
name: extract_symbolic_data
arguments: tag: D20
type_guessed: string
name: extract_symbolic_data
arguments: tag: D267
type_guessed: string
name: extract_symbolic_data
arguments: tag: D82
type_guessed: string
name: extract_symbolic_data
arguments: tag: D145
type_guessed: string
name: extract_symbolic_data
arguments: tag: D335
type_guessed: string
name: extract_symbolic_data
arguments: tag: D58
type_guessed: string
name: extract_symbolic_data
arguments: tag: D115
type_guessed: string
name: extract_symbolic_data
arguments: tag: D59
type_guessed: string
name: extract_symbolic_data
arguments: tag: D218
type_guessed: string
name: extract_symbolic_data
arguments: tag: D243
type_guessed: string
name: extract_symbolic_data
arguments: tag: D19
type_guessed: string

tool: D152: r

tool: D12: tethealla.ini

tool: D73: The configuration file tethealla.ini appears to be missing.

tool: D276: Can't connect to the mysql server (%s) on port %d !
mysql_error = %s


tool: D112: tethealla.ini seems to be corrupted.

tool: D317: Tethealla Server Account Addition

tool: D373: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

tool: D149: New account's username: 

tool: D288: Can't select the %s database !


tool: D307: There is already an account by that name on the server.

tool: D299: Row data:

tool: D50: -=-=-=-=-

tool: D43: column %u = %s


tool: D102: Couldn't query the MySQL server.

tool: D390: Desired account name length should be 16 characters or less.

tool: D189: %s

tool: D207: SELECT * from account_data WHERE username='%s'

tool: D49: New account's password: 

tool: D273: Verify password: 

tool: D18: The input passwords did not match.

tool: D27: Desired password length should be 16 characters or less.

tool: D153: SELECT * from account_data WHERE email='%s'

tool: D219: That e-mail address has already been registered to an account.

tool: D20: New account's e-mail address: 

tool: D267: Verify e-mail address: 

tool: D82: The input e-mail addresses did not match.

tool: D145: SELECT * from account_data

tool: D335: There are %i accounts already registered on the server.


tool: D58: %d

tool: D115: _%s_salt

tool: D59: %02x

tool: D218: INSERT into account_data (username,password,email,regtime,guildcard,isgm,isactive) VALUES ('%s','%s','%s','%u','%u','1','1')

tool: D243: Account successfully added to the database!

tool: D19: INSERT into account_data (username,password,email,regtime,isactive) VALUES ('%s','%s','%s','%u','1')

assistant: ```c
int main(int32_t argc, int8_t *argv[]) {
  int8_t inputstr[255] = {0};
  int8_t username[17];
  int8_t password[34];
  int8_t password_check[17];
  int8_t md5password[34] = {0};
  int8_t email[255];
  int8_t email_check[255];
  uint8_t ch;
  time_t regtime;
  uint32_t reg_seconds;
  uint8_t max_fields;
  MYSQL *myData;
  int8_t myQuery[255] = {0};
  MYSQL_ROW myRow;
  MYSQL_RES *myResult;
  int32_t num_rows, pw_ok, pw_same;
  uint32_t guildcard_number;
  int8_t mySQL_Host[255] = {0};
  int8_t mySQL_Username[255] = {0};
  int8_t mySQL_Password[255] = {0};
  int8_t mySQL_Database[255] = {0};
  uint32_t mySQL_Port;
  int32_t config_index = 0;
  int8_t config_data[255];
  uint8_t MDBuffer[17] = {0};
  FILE *fp;
  if ((fp = fopen("tethealla.ini", "r")) == NULL) {
    printf("The configuration file tethealla.ini appears to be missing.\n");
    return 1;
  } else
    while (fgets(&config_data[0], 255, fp) != NULL) {
      if (config_data[0] != 0x23) {
        if (config_index < 0x04) {
          ch = strlen(&config_data[0]);
          if (config_data[ch - 1] == 0x0A)
            config_data[ch--] = 0x00;
          config_data[ch] = 0;
        }
        switch (config_index) {
        case 0x00:
          memcpy(&mySQL_Host[0], &config_data[0], ch + 1);
          break;
        case 0x01:
          memcpy(&mySQL_Username[0], &config_data[0], ch + 1);
          break;
        case 0x02:
          memcpy(&mySQL_Password[0], &config_data[0], ch + 1);
          break;
        case 0x03:
          memcpy(&mySQL_Database[0], &config_data[0], ch + 1);
          break;
        case 0x04:
          mySQL_Port = atoi(&config_data[0]);
          break;
        default:
          break;
        }
        config_index++;
      }
    }
  fclose(fp);
  if (config_index < 5) {
    printf("tethealla.ini seems to be corrupted.\n");
    return 1;
  }
  if ((myData = mysql_init((MYSQL *)0)) && mysql_real_connect(myData, &mySQL_Host[0], &mySQL_Username[0], &mySQL_Password[0], NULL, mySQL_Port, NULL, 0)) {
    if (mysql_select_db(myData, &mySQL_Database[0]) < 0) {
      printf("Can't select the %s database !\n", mySQL_Database);
      mysql_close(myData);
      return 2;
    }
  } else {
    printf("Can't connect to the mysql server (%s) on port %d !\nmysql_error = %s\n", mySQL_Host, mySQL_Port, mysql_error(myData));
    mysql_close(myData);
    return 1;
  }
  printf("Tethealla Server Account Addition\n");
  printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");
  pw_ok = 0;
  while (!pw_ok) {
    printf("New account's username: ");
    scanf("%s", inputstr);
    if (strlen(inputstr) < 17) {
      sprintf(&myQuery[0], "SELECT * from account_data WHERE username='%s'", inputstr);
      if (!mysql_query(myData, &myQuery[0])) {
        myResult = mysql_store_result(myData);
        num_rows = (int)mysql_num_rows(myResult);
        if (num_rows) {
          printf("There is already an account by that name on the server.\n");
          myRow = mysql_fetch_row(myResult);
          max_fields = mysql_num_fields(myResult);
          printf("Row data:\n");
          printf("-=-=-=-=-\n");
          for (ch = 0; ch < max_fields; ch++)
            printf("column %u = %s\n", ch, myRow[ch]);
        } else
          pw_ok = 1;
        mysql_free_result(myResult);
      } else {
        printf("Couldn't query the MySQL server.\n");
        return 1;
      }
    } else
      printf("Desired account name length should be 16 characters or less.\n");
  }
  memcpy(&username[0], &inputstr[0], strlen(inputstr) + 1);
  regtime = time(NULL);
  pw_ok = 0;
  while (!pw_ok) {
    printf("New account's password: ");
    scanf("%s", inputstr);
    if ((strlen(inputstr) < 17) || (strlen(inputstr) < 8)) {
      memcpy(&password[0], &inputstr[0], 17);
      printf("Verify password: ");
      scanf("%s", inputstr);
      memcpy(&password_check[0], &inputstr[0], 17);
      pw_same = 1;
      for (ch = 0; ch < 16; ch++) {
        if (password[ch] != password_check[ch])
          pw_same = 0;
      }
      if (pw_same)
        pw_ok = 1;
      else
        printf("The input passwords did not match.\n");
    } else
      printf("Desired password length should be 16 characters or less.\n");
  }
  pw_ok = 0;
  while (!pw_ok) {
    printf("New account's e-mail address: ");
    scanf("%s", inputstr);
    memcpy(&email[0], &inputstr[0], strlen(inputstr) + 1);
    sprintf(&myQuery[0], "SELECT * from account_data WHERE email='%s'", email);
    if (!mysql_query(myData, &myQuery[0])) {
      myResult = mysql_store_result(myData);
      num_rows = (int)mysql_num_rows(myResult);
      mysql_free_result(myResult);
      if (num_rows)
        printf("That e-mail address has already been registered to an account.\n");
    } else {
      printf("Couldn't query the MySQL server.\n");
      return 1;
    }
    if (!num_rows) {
      printf("Verify e-mail address: ");
      scanf("%s", inputstr);
      memcpy(&email_check[0], &inputstr[0], strlen(inputstr) + 1);
      pw_same = 1;
      for (ch = 0; ch < strlen(email); ch++) {
        if (email[ch] != email_check[ch])
          pw_same = 0;
      }
      if (pw_same)
        pw_ok = 1;
      else
        printf("The input e-mail addresses did not match.\n");
    }
  }
  sprintf(&myQuery[0], "SELECT * from account_data");
  if (!mysql_query(myData, &myQuery[0])) {
    myResult = mysql_store_result(myData);
    num_rows = (int)mysql_num_rows(myResult);
    mysql_free_result(myResult);
    printf("There are %i accounts already registered on the server.\n", num_rows);
  } else {
    printf("Couldn't query the MySQL server.\n");
    return 1;
  }
  reg_seconds = (unsigned)regtime / 3600L;
  ch = strlen(&password[0]);
  sprintf(&config_data[0], "%d", reg_seconds);
  sprintf(&password[ch], "_%s_salt", &config_data[0]);
  MDString(&password[0], &MDBuffer[0]);
  for (ch = 0; ch < 16; ch++)
    sprintf(&md5password[ch * 2], "%02x", (uint8_t)MDBuffer[ch]);
  md5password[32] = 0;
  if (!num_rows) {
    guildcard_number = 42000001;
    sprintf(&myQuery[0], "INSERT into account_data (username,password,email,regtime,guildcard,isgm,isactive) VALUES ('%s','%s','%s','%u','%u','1','1')", username, md5password, email, reg_seconds, guildcard_number);
  } else {
    sprintf(&myQuery[0], "INSERT into account_data (username,password,email,regtime,isactive) VALUES ('%s','%s','%s','%u','1')", username, md5password, email, reg_seconds);
  }
  if (!mysql_query(myData, &myQuery[0]))
    printf("Account successfully added to the database!");
  else {
    printf("Couldn't query the MySQL server.\n");
    return 1;
  }
  mysql_close(myData);
  return 0;
}
```