
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void base64_encode(FILE *fp,uchar *data,int datalen,int cpl)

{
  int n;
  int iVar1;
  int *piVar2;
  int *piVar3;
  int in_GS_OFFSET;
  uchar *local_34;
  char out [4];
  int local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x5679b;
  local_34 = data;
  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);
  if (0 < datalen) {
    iVar1 = 0;
    do {
      n = 3;
      if (datalen < 4) {
        n = datalen;
      }
      base64_encode_atom(local_34,n,out);
      local_34 = local_34 + n;
      datalen = datalen - n;
      piVar2 = (int *)out;
      do {
        if (iVar1 < cpl) {
          iVar1 = iVar1 + 1;
        }
        else {
          iVar1 = 1;
          fputc(10,(FILE *)fp);
        }
        piVar3 = (int *)((int)piVar2 + 1);
        fputc((int)(char)*piVar2,(FILE *)fp);
        piVar2 = piVar3;
      } while (piVar3 != local_20);
    } while (0 < datalen);
  }
  fputc(10,(FILE *)fp);
  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  int in_GS_OFFSET;
  int local_34;
  int local_24;
  int local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x5679b;
  local_34 = param_2;
  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);
  if (0 < param_3) {
    iVar2 = 0;
    do {
      iVar1 = 3;
      if (param_3 < 4) {
        iVar1 = param_3;
      }
      FUN_0001a520(local_34,iVar1,&local_24);
      local_34 = local_34 + iVar1;
      param_3 = param_3 - iVar1;
      piVar3 = &local_24;
      do {
        if (iVar2 < param_4) {
          iVar2 = iVar2 + 1;
        }
        else {
          iVar2 = 1;
          fputc(10,param_1);
        }
        piVar4 = (int *)((int)piVar3 + 1);
        fputc((int)(char)*piVar3,param_1);
        piVar3 = piVar4;
      } while (piVar4 != local_20);
    } while (0 < param_3);
  }
  fputc(10,param_1);
  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f430();
}


PUSH EBP
PUSH EDI
PUSH ESI
XOR ESI,ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x535f5
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x44]
MOV EDX,dword ptr [ESP + 0x48]
MOV EDI,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x18]
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[ESP + 0x1c]
MOV dword ptr [ESP + 0x4],EAX
TEST EDX,EDX
JLE 0x0005683a
LEA ESI,[ESI]
CMP dword ptr [ESP + 0x48],0x3
MOV EBP,0x3
CMOVLE EBP,dword ptr [ESP + 0x48]
SUB ESP,0x4
PUSH dword ptr [ESP + 0x10]
PUSH EBP
PUSH dword ptr [ESP + 0x14]
CALL 0x0001a520
ADD dword ptr [ESP + 0x18],EBP
MOV EAX,ESI
SUB dword ptr [ESP + 0x58],EBP
MOV EBP,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV ESI,EBP
MOV EBP,EAX
CMP dword ptr [ESP + 0x4c],EBP
JLE 0x00056860
ADD EBP,0x1
SUB ESP,0x8
ADD ESI,0x1
PUSH EDI
MOVSX EAX,byte ptr [ESI + -0x1]
PUSH EAX
CALL 0x00014690
ADD ESP,0x10
CMP ESI,dword ptr [ESP + 0x4]
JNZ 0x0005680d
MOV EAX,dword ptr [ESP + 0x48]
MOV ESI,EBP
TEST EAX,EAX
JG 0x000567d8
SUB ESP,0x8
PUSH EDI
PUSH 0xa
CALL 0x00014690
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00056875
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
MOV EBP,0x1
PUSH EDI
PUSH 0xa
CALL 0x00014690
ADD ESP,0x10
JMP 0x00056816
CALL 0x0006f430
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}\n\n" comment (function_definition "void FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}" primitive_type (function_declarator "FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(FILE *param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_34;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20 [3];" primitive_type (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5679b;" (assignment_expression "uStack_14 = 0x5679b" identifier = number_literal) ;) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" identifier = identifier) ;) (expression_statement "local_20[0] = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20[0] = *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);" do (compound_statement "{\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    }" { (expression_statement "iVar1 = 3;" (assignment_expression "iVar1 = 3" identifier = number_literal) ;) (if_statement "if (param_3 < 4) {\n        iVar1 = param_3;\n      }" if (parenthesized_expression "(param_3 < 4)" ( (binary_expression "param_3 < 4" identifier < number_literal) )) (compound_statement "{\n        iVar1 = param_3;\n      }" { (expression_statement "iVar1 = param_3;" (assignment_expression "iVar1 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_0001a520(local_34,iVar1,&local_24);" (call_expression "FUN_0001a520(local_34,iVar1,&local_24)" identifier (argument_list "(local_34,iVar1,&local_24)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) ))) ;) (expression_statement "local_34 = local_34 + iVar1;" (assignment_expression "local_34 = local_34 + iVar1" identifier = (binary_expression "local_34 + iVar1" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar1;" (assignment_expression "param_3 = param_3 - iVar1" identifier = (binary_expression "param_3 - iVar1" identifier - identifier)) ;) (expression_statement "piVar3 = &local_24;" (assignment_expression "piVar3 = &local_24" identifier = (pointer_expression "&local_24" & identifier)) ;) (do_statement "do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);" do (compound_statement "{\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      }" { (if_statement "if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" if (parenthesized_expression "(iVar2 < param_4)" ( (binary_expression "iVar2 < param_4" identifier < identifier) )) (compound_statement "{\n          iVar2 = iVar2 + 1;\n        }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" else (compound_statement "{\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" identifier (argument_list "(10,param_1)" ( number_literal , identifier ))) ;) }))) (expression_statement "piVar4 = (int *)((int)piVar3 + 1);" (assignment_expression "piVar4 = (int *)((int)piVar3 + 1)" identifier = (cast_expression "(int *)((int)piVar3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar3 + 1)" ( (binary_expression "(int)piVar3 + 1" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "fputc((int)(char)*piVar3,param_1);" (call_expression "fputc((int)(char)*piVar3,param_1)" identifier (argument_list "((int)(char)*piVar3,param_1)" ( (cast_expression "(int)(char)*piVar3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*piVar3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*piVar3" * identifier))) , identifier ))) ;) (expression_statement "piVar3 = piVar4;" (assignment_expression "piVar3 = piVar4" identifier = identifier) ;) }) while (parenthesized_expression "(piVar4 != local_20)" ( (binary_expression "piVar4 != local_20" identifier != identifier) )) ;) }) while (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) ;) })) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" identifier (argument_list "(10,param_1)" ( number_literal , identifier ))) ;) (if_statement "if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20[0] == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20[0] == *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid base64_encode(FILE *fp,uchar *data,int datalen,int cpl)\n\n{\n  int n;\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  uchar *local_34;\n  char out [4];\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = data;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < datalen) {\n    iVar1 = 0;\n    do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);\n  }\n  fputc(10,(FILE *)fp);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void base64_encode(FILE *fp,uchar *data,int datalen,int cpl)\n\n{\n  int n;\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  uchar *local_34;\n  char out [4];\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = data;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < datalen) {\n    iVar1 = 0;\n    do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);\n  }\n  fputc(10,(FILE *)fp);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "base64_encode(FILE *fp,uchar *data,int datalen,int cpl)" identifier (parameter_list "(FILE *fp,uchar *data,int datalen,int cpl)" ( (parameter_declaration "FILE *fp" type_identifier (pointer_declarator "*fp" * identifier)) , (parameter_declaration "uchar *data" type_identifier (pointer_declarator "*data" * identifier)) , (parameter_declaration "int datalen" primitive_type identifier) , (parameter_declaration "int cpl" primitive_type identifier) ))) (compound_statement "{\n  int n;\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  uchar *local_34;\n  char out [4];\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = data;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < datalen) {\n    iVar1 = 0;\n    do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);\n  }\n  fputc(10,(FILE *)fp);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uchar *local_34;" type_identifier (pointer_declarator "*local_34" * identifier) ;) (declaration "char out [4];" primitive_type (array_declarator "out [4]" identifier [ number_literal ]) ;) (declaration "int local_20 [3];" primitive_type (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5679b;" (assignment_expression "uStack_14 = 0x5679b" identifier = number_literal) ;) (expression_statement "local_34 = data;" (assignment_expression "local_34 = data" identifier = identifier) ;) (expression_statement "local_20[0] = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20[0] = *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0 < datalen) {\n    iVar1 = 0;\n    do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);\n  }" if (parenthesized_expression "(0 < datalen)" ( (binary_expression "0 < datalen" number_literal < identifier) )) (compound_statement "{\n    iVar1 = 0;\n    do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (do_statement "do {\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    } while (0 < datalen);" do (compound_statement "{\n      n = 3;\n      if (datalen < 4) {\n        n = datalen;\n      }\n      base64_encode_atom(local_34,n,out);\n      local_34 = local_34 + n;\n      datalen = datalen - n;\n      piVar2 = (int *)out;\n      do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);\n    }" { (expression_statement "n = 3;" (assignment_expression "n = 3" identifier = number_literal) ;) (if_statement "if (datalen < 4) {\n        n = datalen;\n      }" if (parenthesized_expression "(datalen < 4)" ( (binary_expression "datalen < 4" identifier < number_literal) )) (compound_statement "{\n        n = datalen;\n      }" { (expression_statement "n = datalen;" (assignment_expression "n = datalen" identifier = identifier) ;) })) (expression_statement "base64_encode_atom(local_34,n,out);" (call_expression "base64_encode_atom(local_34,n,out)" identifier (argument_list "(local_34,n,out)" ( identifier , identifier , identifier ))) ;) (expression_statement "local_34 = local_34 + n;" (assignment_expression "local_34 = local_34 + n" identifier = (binary_expression "local_34 + n" identifier + identifier)) ;) (expression_statement "datalen = datalen - n;" (assignment_expression "datalen = datalen - n" identifier = (binary_expression "datalen - n" identifier - identifier)) ;) (expression_statement "piVar2 = (int *)out;" (assignment_expression "piVar2 = (int *)out" identifier = (cast_expression "(int *)out" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      } while (piVar3 != local_20);" do (compound_statement "{\n        if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }\n        piVar3 = (int *)((int)piVar2 + 1);\n        fputc((int)(char)*piVar2,(FILE *)fp);\n        piVar2 = piVar3;\n      }" { (if_statement "if (iVar1 < cpl) {\n          iVar1 = iVar1 + 1;\n        }\n        else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }" if (parenthesized_expression "(iVar1 < cpl)" ( (binary_expression "iVar1 < cpl" identifier < identifier) )) (compound_statement "{\n          iVar1 = iVar1 + 1;\n        }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }" else (compound_statement "{\n          iVar1 = 1;\n          fputc(10,(FILE *)fp);\n        }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "fputc(10,(FILE *)fp);" (call_expression "fputc(10,(FILE *)fp)" identifier (argument_list "(10,(FILE *)fp)" ( number_literal , (cast_expression "(FILE *)fp" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) }))) (expression_statement "piVar3 = (int *)((int)piVar2 + 1);" (assignment_expression "piVar3 = (int *)((int)piVar2 + 1)" identifier = (cast_expression "(int *)((int)piVar2 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + 1)" ( (binary_expression "(int)piVar2 + 1" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "fputc((int)(char)*piVar2,(FILE *)fp);" (call_expression "fputc((int)(char)*piVar2,(FILE *)fp)" identifier (argument_list "((int)(char)*piVar2,(FILE *)fp)" ( (cast_expression "(int)(char)*piVar2" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*piVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*piVar2" * identifier))) , (cast_expression "(FILE *)fp" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "piVar2 = piVar3;" (assignment_expression "piVar2 = piVar3" identifier = identifier) ;) }) while (parenthesized_expression "(piVar3 != local_20)" ( (binary_expression "piVar3 != local_20" identifier != identifier) )) ;) }) while (parenthesized_expression "(0 < datalen)" ( (binary_expression "0 < datalen" number_literal < identifier) )) ;) })) (expression_statement "fputc(10,(FILE *)fp);" (call_expression "fputc(10,(FILE *)fp)" identifier (argument_list "(10,(FILE *)fp)" ( number_literal , (cast_expression "(FILE *)fp" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (if_statement "if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20[0] == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20[0] == *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}\n\n" (function_definition "void FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" primitive_type (function_declarator "FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(FILE *param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "FILE *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_34;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20 [3];" primitive_type (array_declarator "local_20 [3]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x5679b;" (assignment_expression "uStack_14 = 0x5679b" identifier = number_literal) ;) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" identifier = identifier) ;) (expression_statement "local_20[0] = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20[0] = *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);" do (compound_statement "{\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    }" { (expression_statement "iVar1 = 3;" (assignment_expression "iVar1 = 3" identifier = number_literal) ;) (if_statement "if (param_3 < 4) {\n        iVar1 = param_3;\n      }" if (parenthesized_expression "(param_3 < 4)" ( (binary_expression "param_3 < 4" identifier < number_literal) )) (compound_statement "{\n        iVar1 = param_3;\n      }" { (expression_statement "iVar1 = param_3;" (assignment_expression "iVar1 = param_3" identifier = identifier) ;) })) (expression_statement "FUN_0001a520(local_34,iVar1,&local_24);" (call_expression "FUN_0001a520(local_34,iVar1,&local_24)" identifier (argument_list "(local_34,iVar1,&local_24)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) ))) ;) (expression_statement "local_34 = local_34 + iVar1;" (assignment_expression "local_34 = local_34 + iVar1" identifier = (binary_expression "local_34 + iVar1" identifier + identifier)) ;) (expression_statement "param_3 = param_3 - iVar1;" (assignment_expression "param_3 = param_3 - iVar1" identifier = (binary_expression "param_3 - iVar1" identifier - identifier)) ;) (expression_statement "piVar3 = &local_24;" (assignment_expression "piVar3 = &local_24" identifier = (pointer_expression "&local_24" & identifier)) ;) (do_statement "do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);" do (compound_statement "{\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      }" { (if_statement "if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" if (parenthesized_expression "(iVar2 < param_4)" ( (binary_expression "iVar2 < param_4" identifier < identifier) )) (compound_statement "{\n          iVar2 = iVar2 + 1;\n        }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) }) (else_clause "else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" else (compound_statement "{\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" identifier (argument_list "(10,param_1)" ( number_literal , identifier ))) ;) }))) (expression_statement "piVar4 = (int *)((int)piVar3 + 1);" (assignment_expression "piVar4 = (int *)((int)piVar3 + 1)" identifier = (cast_expression "(int *)((int)piVar3 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar3 + 1)" ( (binary_expression "(int)piVar3 + 1" (cast_expression "(int)piVar3" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) (expression_statement "fputc((int)(char)*piVar3,param_1);" (call_expression "fputc((int)(char)*piVar3,param_1)" identifier (argument_list "((int)(char)*piVar3,param_1)" ( (cast_expression "(int)(char)*piVar3" ( (type_descriptor "int" primitive_type) ) (cast_expression "(char)*piVar3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*piVar3" * identifier))) , identifier ))) ;) (expression_statement "piVar3 = piVar4;" (assignment_expression "piVar3 = piVar4" identifier = identifier) ;) }) while (parenthesized_expression "(piVar4 != local_20)" ( (binary_expression "piVar4 != local_20" identifier != identifier) )) ;) }) while (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) ;) })) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" identifier (argument_list "(10,param_1)" ( number_literal , identifier ))) ;) (if_statement "if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20[0] == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20[0] == *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT))) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" (primitive_type "void") (function_declarator "FUN_00056790(FILE *param_1,int param_2,int param_3,int param_4)" (identifier "FUN_00056790") (parameter_list "(FILE *param_1,int param_2,int param_3,int param_4)" (( "(") (parameter_declaration "FILE *param_1" (type_identifier "FILE") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  int local_34;\n  int local_24;\n  int local_20 [3];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x5679b;\n  local_34 = param_2;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }\n  fputc(10,param_1);\n  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_34;" (primitive_type "int") (identifier "local_34") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20 [3];" (primitive_type "int") (array_declarator "local_20 [3]" (identifier "local_20") ([ "[") (number_literal "3") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x5679b;" (assignment_expression "uStack_14 = 0x5679b" (identifier "uStack_14") (= "=") (number_literal "0x5679b")) (; ";")) (expression_statement "local_34 = param_2;" (assignment_expression "local_34 = param_2" (identifier "local_34") (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_20[0] = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20[0] = *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (0 < param_3) {\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" (if "if") (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    iVar2 = 0;\n    do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);\n  }" ({ "{") (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    } while (0 < param_3);" (do "do") (compound_statement "{\n      iVar1 = 3;\n      if (param_3 < 4) {\n        iVar1 = param_3;\n      }\n      FUN_0001a520(local_34,iVar1,&local_24);\n      local_34 = local_34 + iVar1;\n      param_3 = param_3 - iVar1;\n      piVar3 = &local_24;\n      do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);\n    }" ({ "{") (expression_statement "iVar1 = 3;" (assignment_expression "iVar1 = 3" (identifier "iVar1") (= "=") (number_literal "3")) (; ";")) (if_statement "if (param_3 < 4) {\n        iVar1 = param_3;\n      }" (if "if") (parenthesized_expression "(param_3 < 4)" (( "(") (binary_expression "param_3 < 4" (identifier "param_3") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n        iVar1 = param_3;\n      }" ({ "{") (expression_statement "iVar1 = param_3;" (assignment_expression "iVar1 = param_3" (identifier "iVar1") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "FUN_0001a520(local_34,iVar1,&local_24);" (call_expression "FUN_0001a520(local_34,iVar1,&local_24)" (identifier "FUN_0001a520") (argument_list "(local_34,iVar1,&local_24)" (( "(") (identifier "local_34") (, ",") (identifier "iVar1") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")"))) (; ";")) (expression_statement "local_34 = local_34 + iVar1;" (assignment_expression "local_34 = local_34 + iVar1" (identifier "local_34") (= "=") (binary_expression "local_34 + iVar1" (identifier "local_34") (+ "+") (identifier "iVar1"))) (; ";")) (expression_statement "param_3 = param_3 - iVar1;" (assignment_expression "param_3 = param_3 - iVar1" (identifier "param_3") (= "=") (binary_expression "param_3 - iVar1" (identifier "param_3") (- "-") (identifier "iVar1"))) (; ";")) (expression_statement "piVar3 = &local_24;" (assignment_expression "piVar3 = &local_24" (identifier "piVar3") (= "=") (pointer_expression "&local_24" (& "&") (identifier "local_24"))) (; ";")) (do_statement "do {\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      } while (piVar4 != local_20);" (do "do") (compound_statement "{\n        if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }\n        piVar4 = (int *)((int)piVar3 + 1);\n        fputc((int)(char)*piVar3,param_1);\n        piVar3 = piVar4;\n      }" ({ "{") (if_statement "if (iVar2 < param_4) {\n          iVar2 = iVar2 + 1;\n        }\n        else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" (if "if") (parenthesized_expression "(iVar2 < param_4)" (( "(") (binary_expression "iVar2 < param_4" (identifier "iVar2") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n          iVar2 = iVar2 + 1;\n        }" ({ "{") (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" (else "else") (compound_statement "{\n          iVar2 = 1;\n          fputc(10,param_1);\n        }" ({ "{") (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" (identifier "fputc") (argument_list "(10,param_1)" (( "(") (number_literal "10") (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}")))) (expression_statement "piVar4 = (int *)((int)piVar3 + 1);" (assignment_expression "piVar4 = (int *)((int)piVar3 + 1)" (identifier "piVar4") (= "=") (cast_expression "(int *)((int)piVar3 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar3 + 1)" (( "(") (binary_expression "(int)piVar3 + 1" (cast_expression "(int)piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar3")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "fputc((int)(char)*piVar3,param_1);" (call_expression "fputc((int)(char)*piVar3,param_1)" (identifier "fputc") (argument_list "((int)(char)*piVar3,param_1)" (( "(") (cast_expression "(int)(char)*piVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(char)*piVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "piVar3 = piVar4;" (assignment_expression "piVar3 = piVar4" (identifier "piVar3") (= "=") (identifier "piVar4")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar4 != local_20)" (( "(") (binary_expression "piVar4 != local_20" (identifier "piVar4") (!= "!=") (identifier "local_20")) () ")")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (; ";")) (} "}"))) (expression_statement "fputc(10,param_1);" (call_expression "fputc(10,param_1)" (identifier "fputc") (argument_list "(10,param_1)" (( "(") (number_literal "10") (, ",") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20[0] == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20[0] == *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" (identifier "FUN_0006f430") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void function_1(type_1 *fp,type_2 *data,int var_2,int var_7)

{
  int var_5;
  int var_6;
  int *piVar2;
  int *var_9;
  int var_1;
  type_2 *var_4;
  char out [4];
  int var_10 [3];
  type_3 uStack_14;
  
  uStack_14 = 0x5679b;
  var_4 = data;
  var_10[0] = *(int *)(var_1 + 0x14);
  if (0 < var_2) {
    var_6 = 0;
    do {
      var_5 = 3;
      if (var_2 < 4) {
        var_5 = var_2;
      }
      var_3(var_4,var_5,out);
      var_4 = var_4 + var_5;
      var_2 = var_2 - var_5;
      piVar2 = (int *)out;
      do {
        if (var_6 < var_7) {
          var_6 = var_6 + 1;
        }
        else {
          var_6 = 1;
          var_8(10,(type_1 *)fp);
        }
        var_9 = (int *)((int)piVar2 + 1);
        var_8((int)(char)*piVar2,(type_1 *)fp);
        piVar2 = var_9;
      } while (var_9 != var_10);
    } while (0 < var_2);
  }
  var_8(10,(type_1 *)fp);
  if (var_10[0] == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier)))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(FILE *param_1,int param_2,int param_3,int param_4)

{
  int iVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  int in_GS_OFFSET;
  int local_34;
  int local_24;
  int local_20 [3];
  undefined4 uStack_14;
  
  uStack_14 = 0x5679b;
  local_34 = param_2;
  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);
  if (0 < param_3) {
    iVar2 = 0;
    do {
      iVar1 = 3;
      if (param_3 < 4) {
        iVar1 = param_3;
      }
      FUN_0001a520(local_34,iVar1,&local_24);
      local_34 = local_34 + iVar1;
      param_3 = param_3 - iVar1;
      piVar3 = &local_24;
      do {
        if (iVar2 < param_4) {
          iVar2 = iVar2 + 1;
        }
        else {
          iVar2 = 1;
          fputc(10,param_1);
        }
        piVar4 = (int *)((int)piVar3 + 1);
        fputc((int)(char)*piVar3,param_1);
        piVar3 = piVar4;
      } while (piVar4 != local_20);
    } while (0 < param_3);
  }
  fputc(10,param_1);
  if (local_20[0] == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f430();
}

