
/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 encode_string(char *out,uint8_t *in,int inlen)

{
  byte *pbVar1;
  byte *pbVar2;
  byte bVar3;
  ushort **ppuVar4;
  int iVar5;
  
  ppuVar4 = __ctype_b_loc();
  pbVar1 = (byte *)(out + (int)in);
  iVar5 = 0;
  do {
    while( true ) {
      bVar3 = *out;
      pbVar2 = (byte *)(xtra_buff + iVar5);
      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;
      *pbVar2 = bVar3;
      iVar5 = iVar5 + 1;
      out = (char *)((byte *)out + 1);
      if (pbVar1 == (byte *)out) goto LAB_0001bb94;
    }
    iVar5 = iVar5 + 4;
    out = (char *)((byte *)out + 1);
    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);
  } while (pbVar1 != (byte *)out);
LAB_0001bb94:
  xtra_buff[iVar5] = '\0';
  return iVar5;
}



/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 FUN_0001bb00(byte *param_1,int param_2)

{
  byte *pbVar1;
  byte *pbVar2;
  byte bVar3;
  ushort **ppuVar4;
  int iVar5;
  
  ppuVar4 = __ctype_b_loc();
  pbVar1 = param_1 + param_2;
  iVar5 = 0;
  do {
    while( true ) {
      bVar3 = *param_1;
      pbVar2 = &DAT_00038460 + iVar5;
      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;
      *pbVar2 = bVar3;
      iVar5 = iVar5 + 1;
      param_1 = param_1 + 1;
      if (pbVar1 == param_1) goto LAB_0001bb94;
    }
    iVar5 = iVar5 + 4;
    param_1 = param_1 + 1;
    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);
  } while (pbVar1 != param_1);
LAB_0001bb94:
  (&DAT_00038460)[iVar5] = 0;
  return iVar5;
}


CALL 0x0001ca7f
ADD ECX,0xf3bb
PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EBX,ECX
SUB ESP,0x1c
MOV dword ptr [ESP + 0x8],ECX
CALL 0x00013460
LEA EBX,[ESI + EDI*0x1]
XOR EDI,EDI
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x8]
MOV dword ptr [ESP],EBX
LEA EDX,[EAX + 0xd5a0]
LEA EAX,[EAX + 0xffff22b1]
MOV dword ptr [ESP + 0x4],EDX
MOV dword ptr [ESP + 0xc],EAX
JMP 0x0001bb6c
SUB ESP,0xc
ADD EDI,0x4
ADD ESI,0x1
PUSH ECX
PUSH dword ptr [ESP + 0x1c]
PUSH -0x1
PUSH 0x1
PUSH EBX
MOV EBX,dword ptr [ESP + 0x28]
CALL 0x00013480
ADD ESP,0x20
CMP dword ptr [ESP],ESI
JZ 0x0001bb94
MOV EAX,dword ptr [ESP + 0x4]
MOVZX ECX,byte ptr [ESI]
LEA EBX,[EAX + EDI*0x1]
MOV EAX,dword ptr [EBP]
MOVZX EAX,word ptr [EAX + ECX*0x2]
AND AX,0x4001
CMP AX,0x4000
JNZ 0x0001bb48
MOV byte ptr [EBX],CL
ADD EDI,0x1
ADD ESI,0x1
CMP dword ptr [ESP],ESI
JNZ 0x0001bb6c
MOV EAX,dword ptr [ESP + 0x8]
MOV byte ptr [EDI + EAX*0x1 + 0xd5a0],0x0
ADD ESP,0x1c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nint __regparm3 FUN_0001bb00(byte *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}\n\n" comment (function_definition "int __regparm3 FUN_0001bb00(byte *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001bb00(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ushort **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "ppuVar4 = __ctype_b_loc();" (assignment_expression "ppuVar4 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar1 = param_1 + param_2;" (assignment_expression "pbVar1 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);" do (compound_statement "{\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  }" { (while_statement "while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" { (expression_statement "bVar3 = *param_1;" (assignment_expression "bVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar2 = &DAT_00038460 + iVar5;" (assignment_expression "pbVar2 = &DAT_00038460 + iVar5" identifier = (binary_expression "&DAT_00038460 + iVar5" (pointer_expression "&DAT_00038460" & identifier) + identifier)) ;) (if_statement "if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;" if (parenthesized_expression "(((*ppuVar4)[bVar3] & 0x4001) != 0x4000)" ( (binary_expression "((*ppuVar4)[bVar3] & 0x4001) != 0x4000" (parenthesized_expression "((*ppuVar4)[bVar3] & 0x4001)" ( (binary_expression "(*ppuVar4)[bVar3] & 0x4001" (subscript_expression "(*ppuVar4)[bVar3]" (parenthesized_expression "(*ppuVar4)" ( (pointer_expression "*ppuVar4" * identifier) )) [ identifier ]) & number_literal) )) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*pbVar2 = bVar3;" (assignment_expression "*pbVar2 = bVar3" (pointer_expression "*pbVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if (pbVar1 == param_1) goto LAB_0001bb94;" if (parenthesized_expression "(pbVar1 == param_1)" ( (binary_expression "pbVar1 == param_1" identifier == identifier) )) (goto_statement "goto LAB_0001bb94;" goto statement_identifier ;)) })) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" identifier = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);" (call_expression "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" identifier (argument_list "(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" ( identifier , number_literal , number_literal , (string_literal ""\\x%02x"" " escape_sequence string_content ") , (cast_expression "(uint)bVar3" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;) }) while (parenthesized_expression "(pbVar1 != param_1)" ( (binary_expression "pbVar1 != param_1" identifier != identifier) )) ;) (labeled_statement "LAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;" statement_identifier : (expression_statement "(&DAT_00038460)[iVar5] = 0;" (assignment_expression "(&DAT_00038460)[iVar5] = 0" (subscript_expression "(&DAT_00038460)[iVar5]" (parenthesized_expression "(&DAT_00038460)" ( (pointer_expression "&DAT_00038460" & identifier) )) [ identifier ]) = number_literal) ;)) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */\n\nint __regparm3 encode_string(char *out,uint8_t *in,int inlen)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = (byte *)(out + (int)in);\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    out = (char *)((byte *)out + 1);\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != (byte *)out);\nLAB_0001bb94:\n  xtra_buff[iVar5] = '\0';\n  return iVar5;\n}\n\n" comment (function_definition "int __regparm3 encode_string(char *out,uint8_t *in,int inlen)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = (byte *)(out + (int)in);\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    out = (char *)((byte *)out + 1);\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != (byte *)out);\nLAB_0001bb94:\n  xtra_buff[iVar5] = '\0';\n  return iVar5;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "encode_string(char *out,uint8_t *in,int inlen)" identifier (parameter_list "(char *out,uint8_t *in,int inlen)" ( (parameter_declaration "char *out" primitive_type (pointer_declarator "*out" * identifier)) , (parameter_declaration "uint8_t *in" primitive_type (pointer_declarator "*in" * identifier)) , (parameter_declaration "int inlen" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = (byte *)(out + (int)in);\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    out = (char *)((byte *)out + 1);\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != (byte *)out);\nLAB_0001bb94:\n  xtra_buff[iVar5] = '\0';\n  return iVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ushort **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "ppuVar4 = __ctype_b_loc();" (assignment_expression "ppuVar4 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar1 = (byte *)(out + (int)in);" (assignment_expression "pbVar1 = (byte *)(out + (int)in)" identifier = (cast_expression "(byte *)(out + (int)in)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(out + (int)in)" ( (binary_expression "out + (int)in" identifier + (cast_expression "(int)in" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    out = (char *)((byte *)out + 1);\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != (byte *)out);" do (compound_statement "{\n    while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    out = (char *)((byte *)out + 1);\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  }" { (while_statement "while( true ) {\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      bVar3 = *out;\n      pbVar2 = (byte *)(xtra_buff + iVar5);\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      out = (char *)((byte *)out + 1);\n      if (pbVar1 == (byte *)out) goto LAB_0001bb94;\n    }" { (expression_statement "bVar3 = *out;" (assignment_expression "bVar3 = *out" identifier = (pointer_expression "*out" * identifier)) ;) (expression_statement "pbVar2 = (byte *)(xtra_buff + iVar5);" (assignment_expression "pbVar2 = (byte *)(xtra_buff + iVar5)" identifier = (cast_expression "(byte *)(xtra_buff + iVar5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(xtra_buff + iVar5)" ( (binary_expression "xtra_buff + iVar5" identifier + identifier) )))) ;) (if_statement "if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;" if (parenthesized_expression "(((*ppuVar4)[bVar3] & 0x4001) != 0x4000)" ( (binary_expression "((*ppuVar4)[bVar3] & 0x4001) != 0x4000" (parenthesized_expression "((*ppuVar4)[bVar3] & 0x4001)" ( (binary_expression "(*ppuVar4)[bVar3] & 0x4001" (subscript_expression "(*ppuVar4)[bVar3]" (parenthesized_expression "(*ppuVar4)" ( (pointer_expression "*ppuVar4" * identifier) )) [ identifier ]) & number_literal) )) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*pbVar2 = bVar3;" (assignment_expression "*pbVar2 = bVar3" (pointer_expression "*pbVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "out = (char *)((byte *)out + 1);" (assignment_expression "out = (char *)((byte *)out + 1)" identifier = (cast_expression "(char *)((byte *)out + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)out + 1)" ( (binary_expression "(byte *)out + 1" (cast_expression "(byte *)out" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (if_statement "if (pbVar1 == (byte *)out) goto LAB_0001bb94;" if (parenthesized_expression "(pbVar1 == (byte *)out)" ( (binary_expression "pbVar1 == (byte *)out" identifier == (cast_expression "(byte *)out" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (goto_statement "goto LAB_0001bb94;" goto statement_identifier ;)) })) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" identifier = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (expression_statement "out = (char *)((byte *)out + 1);" (assignment_expression "out = (char *)((byte *)out + 1)" identifier = (cast_expression "(char *)((byte *)out + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)out + 1)" ( (binary_expression "(byte *)out + 1" (cast_expression "(byte *)out" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);" (call_expression "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" identifier (argument_list "(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" ( identifier , number_literal , number_literal , (string_literal ""\\x%02x"" " escape_sequence string_content ") , (cast_expression "(uint)bVar3" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;) }) while (parenthesized_expression "(pbVar1 != (byte *)out)" ( (binary_expression "pbVar1 != (byte *)out" identifier != (cast_expression "(byte *)out" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) ;) (labeled_statement "LAB_0001bb94:\n  xtra_buff[iVar5] = '\0';" statement_identifier : (expression_statement "xtra_buff[iVar5] = '\0';" (assignment_expression "xtra_buff[iVar5] = '\0'" (subscript_expression "xtra_buff[iVar5]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;)) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "int __regparm3 FUN_0001bb00(byte *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}\n\n" (function_definition "int __regparm3 FUN_0001bb00(byte *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001bb00(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "byte bVar3;" type_identifier identifier ;) (declaration "ushort **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "ppuVar4 = __ctype_b_loc();" (assignment_expression "ppuVar4 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pbVar1 = param_1 + param_2;" (assignment_expression "pbVar1 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);" do (compound_statement "{\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  }" { (while_statement "while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" { (expression_statement "bVar3 = *param_1;" (assignment_expression "bVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "pbVar2 = &DAT_00038460 + iVar5;" (assignment_expression "pbVar2 = &DAT_00038460 + iVar5" identifier = (binary_expression "&DAT_00038460 + iVar5" (pointer_expression "&DAT_00038460" & identifier) + identifier)) ;) (if_statement "if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;" if (parenthesized_expression "(((*ppuVar4)[bVar3] & 0x4001) != 0x4000)" ( (binary_expression "((*ppuVar4)[bVar3] & 0x4001) != 0x4000" (parenthesized_expression "((*ppuVar4)[bVar3] & 0x4001)" ( (binary_expression "(*ppuVar4)[bVar3] & 0x4001" (subscript_expression "(*ppuVar4)[bVar3]" (parenthesized_expression "(*ppuVar4)" ( (pointer_expression "*ppuVar4" * identifier) )) [ identifier ]) & number_literal) )) != number_literal) )) (break_statement "break;" break ;)) (expression_statement "*pbVar2 = bVar3;" (assignment_expression "*pbVar2 = bVar3" (pointer_expression "*pbVar2" * identifier) = identifier) ;) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if (pbVar1 == param_1) goto LAB_0001bb94;" if (parenthesized_expression "(pbVar1 == param_1)" ( (binary_expression "pbVar1 == param_1" identifier == identifier) )) (goto_statement "goto LAB_0001bb94;" goto statement_identifier ;)) })) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" identifier = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);" (call_expression "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" identifier (argument_list "(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" ( identifier , number_literal , number_literal , (string_literal ""\\x%02x"" " escape_sequence string_content ") , (cast_expression "(uint)bVar3" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;) }) while (parenthesized_expression "(pbVar1 != param_1)" ( (binary_expression "pbVar1 != param_1" identifier != identifier) )) ;) (labeled_statement "LAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;" statement_identifier : (expression_statement "(&DAT_00038460)[iVar5] = 0;" (assignment_expression "(&DAT_00038460)[iVar5] = 0" (subscript_expression "(&DAT_00038460)[iVar5]" (parenthesized_expression "(&DAT_00038460)" ( (pointer_expression "&DAT_00038460" & identifier) )) [ identifier ]) = number_literal) ;)) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression & IDENT) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression * IDENT) )) [ IDENT ]) & LIT) )) != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (string_literal " escape_sequence string_content ") , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) = LIT) ;)) (return_statement return IDENT ;) })))
(function_definition "int __regparm3 FUN_0001bb00(byte *param_1,int param_2)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001bb00(byte *param_1,int param_2)" (identifier "FUN_0001bb00") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  byte bVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  \n  ppuVar4 = __ctype_b_loc();\n  pbVar1 = param_1 + param_2;\n  iVar5 = 0;\n  do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);\nLAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;\n  return iVar5;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "byte bVar3;" (type_identifier "byte") (identifier "bVar3") (; ";")) (declaration "ushort **ppuVar4;" (type_identifier "ushort") (pointer_declarator "**ppuVar4" (* "*") (pointer_declarator "*ppuVar4" (* "*") (identifier "ppuVar4"))) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "ppuVar4 = __ctype_b_loc();" (assignment_expression "ppuVar4 = __ctype_b_loc()" (identifier "ppuVar4") (= "=") (call_expression "__ctype_b_loc()" (identifier "__ctype_b_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pbVar1 = param_1 + param_2;" (assignment_expression "pbVar1 = param_1 + param_2" (identifier "pbVar1") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  } while (pbVar1 != param_1);" (do "do") (compound_statement "{\n    while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }\n    iVar5 = iVar5 + 4;\n    param_1 = param_1 + 1;\n    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);\n  }" ({ "{") (while_statement "while( true ) {\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      bVar3 = *param_1;\n      pbVar2 = &DAT_00038460 + iVar5;\n      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;\n      *pbVar2 = bVar3;\n      iVar5 = iVar5 + 1;\n      param_1 = param_1 + 1;\n      if (pbVar1 == param_1) goto LAB_0001bb94;\n    }" ({ "{") (expression_statement "bVar3 = *param_1;" (assignment_expression "bVar3 = *param_1" (identifier "bVar3") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "pbVar2 = &DAT_00038460 + iVar5;" (assignment_expression "pbVar2 = &DAT_00038460 + iVar5" (identifier "pbVar2") (= "=") (binary_expression "&DAT_00038460 + iVar5" (pointer_expression "&DAT_00038460" (& "&") (identifier "DAT_00038460")) (+ "+") (identifier "iVar5"))) (; ";")) (if_statement "if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;" (if "if") (parenthesized_expression "(((*ppuVar4)[bVar3] & 0x4001) != 0x4000)" (( "(") (binary_expression "((*ppuVar4)[bVar3] & 0x4001) != 0x4000" (parenthesized_expression "((*ppuVar4)[bVar3] & 0x4001)" (( "(") (binary_expression "(*ppuVar4)[bVar3] & 0x4001" (subscript_expression "(*ppuVar4)[bVar3]" (parenthesized_expression "(*ppuVar4)" (( "(") (pointer_expression "*ppuVar4" (* "*") (identifier "ppuVar4")) () ")")) ([ "[") (identifier "bVar3") (] "]")) (& "&") (number_literal "0x4001")) () ")")) (!= "!=") (number_literal "0x4000")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "*pbVar2 = bVar3;" (assignment_expression "*pbVar2 = bVar3" (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2")) (= "=") (identifier "bVar3")) (; ";")) (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (pbVar1 == param_1) goto LAB_0001bb94;" (if "if") (parenthesized_expression "(pbVar1 == param_1)" (( "(") (binary_expression "pbVar1 == param_1" (identifier "pbVar1") (== "==") (identifier "param_1")) () ")")) (goto_statement "goto LAB_0001bb94;" (goto "goto") (statement_identifier "LAB_0001bb94") (; ";"))) (} "}"))) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);" (call_expression "__sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" (identifier "__sprintf_chk") (argument_list "(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3)" (( "(") (identifier "pbVar2") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (string_literal ""\\x%02x"" (" """) (escape_sequence "\\") (string_content "x%02x") (" """)) (, ",") (cast_expression "(uint)bVar3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar3")) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pbVar1 != param_1)" (( "(") (binary_expression "pbVar1 != param_1" (identifier "pbVar1") (!= "!=") (identifier "param_1")) () ")")) (; ";")) (labeled_statement "LAB_0001bb94:\n  (&DAT_00038460)[iVar5] = 0;" (statement_identifier "LAB_0001bb94") (: ":") (expression_statement "(&DAT_00038460)[iVar5] = 0;" (assignment_expression "(&DAT_00038460)[iVar5] = 0" (subscript_expression "(&DAT_00038460)[iVar5]" (parenthesized_expression "(&DAT_00038460)" (( "(") (pointer_expression "&DAT_00038460" (& "&") (identifier "DAT_00038460")) () ")")) ([ "[") (identifier "iVar5") (] "]")) (= "=") (number_literal "0")) (; ";"))) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 function_1(char *var_2,uint8_t *in,int inlen)

{
  type_1 *var_5;
  type_1 *pbVar2;
  type_1 bVar3;
  type_2 **ppuVar4;
  int var_4;
  
  ppuVar4 = var_1();
  var_5 = (type_1 *)(var_2 + (int)in);
  var_4 = 0;
  do {
    while( true ) {
      bVar3 = *var_2;
      pbVar2 = (type_1 *)(var_3 + var_4);
      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;
      *pbVar2 = bVar3;
      var_4 = var_4 + 1;
      var_2 = (char *)((type_1 *)var_2 + 1);
      if (var_5 == (type_1 *)var_2) goto LAB_0001bb94;
    }
    var_4 = var_4 + 4;
    var_2 = (char *)((type_1 *)var_2 + 1);
    var_6(pbVar2,1,0xffffffff,"\\x%02x",(type_3)bVar3);
  } while (var_5 != (type_1 *)var_2);
LAB_0001bb94:
  var_3[var_4] = '\0';
  return var_4;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (string_literal (escape_sequence) (string_content)) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (identifier)) right: (number_literal)))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */

int __regparm3 MASKED(byte *param_1,int param_2)

{
  byte *pbVar1;
  byte *pbVar2;
  byte bVar3;
  ushort **ppuVar4;
  int iVar5;
  
  ppuVar4 = __ctype_b_loc();
  pbVar1 = param_1 + param_2;
  iVar5 = 0;
  do {
    while( true ) {
      bVar3 = *param_1;
      pbVar2 = &DAT_00038460 + iVar5;
      if (((*ppuVar4)[bVar3] & 0x4001) != 0x4000) break;
      *pbVar2 = bVar3;
      iVar5 = iVar5 + 1;
      param_1 = param_1 + 1;
      if (pbVar1 == param_1) goto LAB_0001bb94;
    }
    iVar5 = iVar5 + 4;
    param_1 = param_1 + 1;
    __sprintf_chk(pbVar2,1,0xffffffff,"\\x%02x",(uint)bVar3);
  } while (pbVar1 != param_1);
LAB_0001bb94:
  (&DAT_00038460)[iVar5] = 0;
  return iVar5;
}

