
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 sk_proxy_set_frozen(Socket s,int is_frozen)

{
  bufchain *ch;
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  void *data;
  int len;
  char databuf [512];
  
  ch = (bufchain *)(s + 0xd);
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = bufchain_size(ch);
  if (iVar2 < 1) {
LAB_0001ddbd:
    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);
  }
  else {
    s[0x12] = (socket_function_table *)is_frozen;
    if (is_frozen == 0) {
      do {
        iVar2 = bufchain_size(ch);
        if (iVar2 < 1) {
          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;
          break;
        }
        bufchain_prefix(ch,&data,&len);
        if (0x200 < (uint)len) {
          len = 0x200;
        }
        iVar2 = len;
        __memcpy_chk(databuf,data,len,0x200);
        bufchain_consume(ch,iVar2);
        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);
      } while (s[0x12] == (socket_function_table *)0x0);
    }
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



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

void __regparm3 FUN_0001dcd0(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  uint uVar3;
  undefined4 local_228;
  uint local_224;
  undefined1 local_220 [512];
  int local_20;
  undefined4 uStack_14;
  
  iVar1 = param_1 + 0x34;
  uStack_14 = 0x1dcde;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = FUN_000196e0(iVar1);
  if (iVar2 < 1) {
LAB_0001ddbd:
    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);
  }
  else {
    *(int *)(param_1 + 0x48) = param_2;
    if (param_2 == 0) {
      do {
        iVar2 = FUN_000196e0(iVar1);
        if (iVar2 < 1) {
          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;
          break;
        }
        FUN_000197b0(iVar1,&local_228,&local_224);
        if (0x200 < local_224) {
          local_224 = 0x200;
        }
        uVar3 = local_224;
        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);
        FUN_000196f0(iVar1,uVar3);
        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)
        ;
      } while (*(int *)(param_1 + 0x48) == 0);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0004aab0();
  }
  return;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
LEA ESI,[EDI + 0x34]
PUSH EBX
CALL 0x000152d0
ADD EBX,0x5100a
SUB ESP,0x238
MOV dword ptr [ESP + 0x18],EDX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x228],EAX
XOR EAX,EAX
PUSH ESI
CALL 0x000196e0
ADD ESP,0x10
TEST EAX,EAX
JLE 0x0001ddbd
LEA ECX,[ESP + 0x18]
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [ESP + 0x4],ECX
LEA ECX,[ESP + 0x14]
MOV dword ptr [EDI + 0x48],EAX
MOV dword ptr [ESP + 0x8],ECX
TEST EAX,EAX
JZ 0x0001dda2
JMP 0x0001ddd0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x8]
PUSH dword ptr [ESP + 0x10]
PUSH ESI
CALL 0x000197b0
MOV EDX,dword ptr [ESP + 0x28]
ADD ESP,0x10
MOV EAX,EDX
CMP EDX,0x200
JBE 0x0001dd64
MOV dword ptr [ESP + 0x18],0x200
MOV EAX,0x200
MOV EDX,0x200
MOV dword ptr [ESP],EDX
PUSH 0x200
PUSH EAX
PUSH dword ptr [ESP + 0x1c]
LEA EBP,[ESP + 0x28]
PUSH EBP
CALL 0x00014970
POP EDX
POP ECX
MOV EDX,dword ptr [ESP + 0x8]
PUSH EDX
PUSH ESI
CALL 0x000196f0
MOV EAX,dword ptr [EDI + 0xc]
MOV EDX,dword ptr [EAX]
PUSH dword ptr [ESP + 0x28]
PUSH EBP
PUSH 0x0
PUSH EAX
CALL dword ptr [EDX + 0x8]
MOV EBP,dword ptr [EDI + 0x48]
ADD ESP,0x20
TEST EBP,EBP
JNZ 0x0001ddd0
SUB ESP,0xc
PUSH ESI
CALL 0x000196e0
ADD ESP,0x10
TEST EAX,EAX
JG 0x0001dd30
MOV EAX,dword ptr [EDI + 0x48]
TEST EAX,EAX
JNZ 0x0001ddd0
MOV EAX,dword ptr [EDI + 0x8]
SUB ESP,0x8
MOV EDX,dword ptr [EAX]
PUSH dword ptr [ESP + 0x14]
PUSH EAX
CALL dword ptr [EDX + 0x18]
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x21c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0001ddeb
ADD ESP,0x22c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0004aab0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0001dcd0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0004aab0();\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0001dcd0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0004aab0();\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001dcd0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0004aab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 local_228;" type_identifier identifier ;) (declaration "uint local_224;" type_identifier identifier ;) (declaration "undefined1 local_220 [512];" type_identifier (array_declarator "local_220 [512]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar1 = param_1 + 0x34;" (assignment_expression "iVar1 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "uStack_14 = 0x1dcde;" (assignment_expression "uStack_14 = 0x1dcde" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (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) ))))) ;) (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" identifier = (call_expression "FUN_000196e0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }" { (labeled_statement "LAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" statement_identifier : (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 0x18)" * (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 0x18)" * (cast_expression "(code **)(**(int **)(param_1 + 8) + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 8) + 0x18)" ( (binary_expression "**(int **)(param_1 + 8) + 0x18" (pointer_expression "**(int **)(param_1 + 8)" * (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 8),param_2)" ( (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier ))) ;)) }) (else_clause "else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" { (expression_statement "*(int *)(param_1 + 0x48) = param_2;" (assignment_expression "*(int *)(param_1 + 0x48) = param_2" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" { (do_statement "do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);" do (compound_statement "{\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      }" { (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" identifier = (call_expression "FUN_000196e0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" { (if_statement "if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_0001ddbd;" goto statement_identifier ;)) (break_statement "break;" break ;) })) (expression_statement "FUN_000197b0(iVar1,&local_228,&local_224);" (call_expression "FUN_000197b0(iVar1,&local_228,&local_224)" identifier (argument_list "(iVar1,&local_228,&local_224)" ( identifier , (pointer_expression "&local_228" & identifier) , (pointer_expression "&local_224" & identifier) ))) ;) (if_statement "if (0x200 < local_224) {\n          local_224 = 0x200;\n        }" if (parenthesized_expression "(0x200 < local_224)" ( (binary_expression "0x200 < local_224" number_literal < identifier) )) (compound_statement "{\n          local_224 = 0x200;\n        }" { (expression_statement "local_224 = 0x200;" (assignment_expression "local_224 = 0x200" identifier = number_literal) ;) })) (expression_statement "uVar3 = local_224;" (assignment_expression "uVar3 = local_224" identifier = identifier) ;) (expression_statement "__memcpy_chk(local_220,local_228,local_224,0x200,local_224);" (call_expression "__memcpy_chk(local_220,local_228,local_224,0x200,local_224)" identifier (argument_list "(local_220,local_228,local_224,0x200,local_224)" ( identifier , identifier , identifier , number_literal , identifier ))) ;) (expression_statement "FUN_000196f0(iVar1,uVar3);" (call_expression "FUN_000196f0(iVar1,uVar3)" identifier (argument_list "(iVar1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 8)" ( (binary_expression "**(int **)(param_1 + 0xc) + 8" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),0,local_220,local_224)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , number_literal , identifier , identifier ))) ;) }) while (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) ;) })) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0004aab0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (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                    /* WARNING: Subroutine does not return */\n    FUN_0004aab0();\n  }" { comment (expression_statement "FUN_0004aab0();" (call_expression "FUN_0004aab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 sk_proxy_set_frozen(Socket s,int is_frozen)\n\n{\n  bufchain *ch;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  char databuf [512];\n  \n  ch = (bufchain *)(s + 0xd);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = bufchain_size(ch);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);\n  }\n  else {\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 sk_proxy_set_frozen(Socket s,int is_frozen)\n\n{\n  bufchain *ch;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  char databuf [512];\n  \n  ch = (bufchain *)(s + 0xd);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = bufchain_size(ch);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);\n  }\n  else {\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sk_proxy_set_frozen(Socket s,int is_frozen)" identifier (parameter_list "(Socket s,int is_frozen)" ( (parameter_declaration "Socket s" type_identifier identifier) , (parameter_declaration "int is_frozen" primitive_type identifier) ))) (compound_statement "{\n  bufchain *ch;\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  char databuf [512];\n  \n  ch = (bufchain *)(s + 0xd);\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = bufchain_size(ch);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);\n  }\n  else {\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "bufchain *ch;" type_identifier (pointer_declarator "*ch" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *data;" primitive_type (pointer_declarator "*data" * identifier) ;) (declaration "int len;" primitive_type identifier ;) (declaration "char databuf [512];" primitive_type (array_declarator "databuf [512]" identifier [ number_literal ]) ;) (expression_statement "ch = (bufchain *)(s + 0xd);" (assignment_expression "ch = (bufchain *)(s + 0xd)" identifier = (cast_expression "(bufchain *)(s + 0xd)" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(s + 0xd)" ( (binary_expression "s + 0xd" identifier + number_literal) )))) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (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) ))))) ;) (expression_statement "iVar2 = bufchain_size(ch);" (assignment_expression "iVar2 = bufchain_size(ch)" identifier = (call_expression "bufchain_size(ch)" identifier (argument_list "(ch)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);\n  }\n  else {\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\nLAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);\n  }" { (labeled_statement "LAB_0001ddbd:\n    (**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);" statement_identifier : (expression_statement "(**(code **)(s[2]->plug + 0x18))(s[2],is_frozen);" (call_expression "(**(code **)(s[2]->plug + 0x18))(s[2],is_frozen)" (parenthesized_expression "(**(code **)(s[2]->plug + 0x18))" ( (pointer_expression "**(code **)(s[2]->plug + 0x18)" * (pointer_expression "*(code **)(s[2]->plug + 0x18)" * (cast_expression "(code **)(s[2]->plug + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(s[2]->plug + 0x18)" ( (binary_expression "s[2]->plug + 0x18" (field_expression "s[2]->plug" (subscript_expression "s[2]" identifier [ number_literal ]) -> field_identifier) + number_literal) ))))) )) (argument_list "(s[2],is_frozen)" ( (subscript_expression "s[2]" identifier [ number_literal ]) , identifier ))) ;)) }) (else_clause "else {\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }" else (compound_statement "{\n    s[0x12] = (socket_function_table *)is_frozen;\n    if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }\n  }" { (expression_statement "s[0x12] = (socket_function_table *)is_frozen;" (assignment_expression "s[0x12] = (socket_function_table *)is_frozen" (subscript_expression "s[0x12]" identifier [ number_literal ]) = (cast_expression "(socket_function_table *)is_frozen" ( (type_descriptor "socket_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (is_frozen == 0) {\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }" if (parenthesized_expression "(is_frozen == 0)" ( (binary_expression "is_frozen == 0" identifier == number_literal) )) (compound_statement "{\n      do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);\n    }" { (do_statement "do {\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      } while (s[0x12] == (socket_function_table *)0x0);" do (compound_statement "{\n        iVar2 = bufchain_size(ch);\n        if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }\n        bufchain_prefix(ch,&data,&len);\n        if (0x200 < (uint)len) {\n          len = 0x200;\n        }\n        iVar2 = len;\n        __memcpy_chk(databuf,data,len,0x200);\n        bufchain_consume(ch,iVar2);\n        (**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);\n      }" { (expression_statement "iVar2 = bufchain_size(ch);" (assignment_expression "iVar2 = bufchain_size(ch)" identifier = (call_expression "bufchain_size(ch)" identifier (argument_list "(ch)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n          if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;\n          break;\n        }" { (if_statement "if (s[0x12] == (socket_function_table *)0x0) goto LAB_0001ddbd;" if (parenthesized_expression "(s[0x12] == (socket_function_table *)0x0)" ( (binary_expression "s[0x12] == (socket_function_table *)0x0" (subscript_expression "s[0x12]" identifier [ number_literal ]) == (cast_expression "(socket_function_table *)0x0" ( (type_descriptor "socket_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_0001ddbd;" goto statement_identifier ;)) (break_statement "break;" break ;) })) (expression_statement "bufchain_prefix(ch,&data,&len);" (call_expression "bufchain_prefix(ch,&data,&len)" identifier (argument_list "(ch,&data,&len)" ( identifier , (pointer_expression "&data" & identifier) , (pointer_expression "&len" & identifier) ))) ;) (if_statement "if (0x200 < (uint)len) {\n          len = 0x200;\n        }" if (parenthesized_expression "(0x200 < (uint)len)" ( (binary_expression "0x200 < (uint)len" number_literal < (cast_expression "(uint)len" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n          len = 0x200;\n        }" { (expression_statement "len = 0x200;" (assignment_expression "len = 0x200" identifier = number_literal) ;) })) (expression_statement "iVar2 = len;" (assignment_expression "iVar2 = len" identifier = identifier) ;) (expression_statement "__memcpy_chk(databuf,data,len,0x200);" (call_expression "__memcpy_chk(databuf,data,len,0x200)" identifier (argument_list "(databuf,data,len,0x200)" ( identifier , identifier , identifier , number_literal ))) ;) (expression_statement "bufchain_consume(ch,iVar2);" (call_expression "bufchain_consume(ch,iVar2)" identifier (argument_list "(ch,iVar2)" ( identifier , identifier ))) ;) (expression_statement "(**(code **)(s[3]->plug + 8))(s[3],0,databuf,len);" (call_expression "(**(code **)(s[3]->plug + 8))(s[3],0,databuf,len)" (parenthesized_expression "(**(code **)(s[3]->plug + 8))" ( (pointer_expression "**(code **)(s[3]->plug + 8)" * (pointer_expression "*(code **)(s[3]->plug + 8)" * (cast_expression "(code **)(s[3]->plug + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(s[3]->plug + 8)" ( (binary_expression "s[3]->plug + 8" (field_expression "s[3]->plug" (subscript_expression "s[3]" identifier [ number_literal ]) -> field_identifier) + number_literal) ))))) )) (argument_list "(s[3],0,databuf,len)" ( (subscript_expression "s[3]" identifier [ number_literal ]) , number_literal , identifier , identifier ))) ;) }) while (parenthesized_expression "(s[0x12] == (socket_function_table *)0x0)" ( (binary_expression "s[0x12] == (socket_function_table *)0x0" (subscript_expression "s[0x12]" identifier [ number_literal ]) == (cast_expression "(socket_function_table *)0x0" ( (type_descriptor "socket_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) }))) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0001dcd0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0001dcd0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0001dcd0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 local_228;" type_identifier identifier ;) (declaration "uint local_224;" type_identifier identifier ;) (declaration "undefined1 local_220 [512];" type_identifier (array_declarator "local_220 [512]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "iVar1 = param_1 + 0x34;" (assignment_expression "iVar1 = param_1 + 0x34" identifier = (binary_expression "param_1 + 0x34" identifier + number_literal)) ;) (expression_statement "uStack_14 = 0x1dcde;" (assignment_expression "uStack_14 = 0x1dcde" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (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) ))))) ;) (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" identifier = (call_expression "FUN_000196e0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }" { (labeled_statement "LAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" statement_identifier : (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 0x18)" * (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 0x18)" * (cast_expression "(code **)(**(int **)(param_1 + 8) + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 8) + 0x18)" ( (binary_expression "**(int **)(param_1 + 8) + 0x18" (pointer_expression "**(int **)(param_1 + 8)" * (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 8),param_2)" ( (pointer_expression "*(int **)(param_1 + 8)" * (cast_expression "(int **)(param_1 + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier ))) ;)) }) (else_clause "else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" { (expression_statement "*(int *)(param_1 + 0x48) = param_2;" (assignment_expression "*(int *)(param_1 + 0x48) = param_2" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" { (do_statement "do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);" do (compound_statement "{\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      }" { (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" identifier = (call_expression "FUN_000196e0(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" { (if_statement "if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (goto_statement "goto LAB_0001ddbd;" goto statement_identifier ;)) (break_statement "break;" break ;) })) (expression_statement "FUN_000197b0(iVar1,&local_228,&local_224);" (call_expression "FUN_000197b0(iVar1,&local_228,&local_224)" identifier (argument_list "(iVar1,&local_228,&local_224)" ( identifier , (pointer_expression "&local_228" & identifier) , (pointer_expression "&local_224" & identifier) ))) ;) (if_statement "if (0x200 < local_224) {\n          local_224 = 0x200;\n        }" if (parenthesized_expression "(0x200 < local_224)" ( (binary_expression "0x200 < local_224" number_literal < identifier) )) (compound_statement "{\n          local_224 = 0x200;\n        }" { (expression_statement "local_224 = 0x200;" (assignment_expression "local_224 = 0x200" identifier = number_literal) ;) })) (expression_statement "uVar3 = local_224;" (assignment_expression "uVar3 = local_224" identifier = identifier) ;) (expression_statement "__memcpy_chk(local_220,local_228,local_224,0x200,local_224);" (call_expression "__memcpy_chk(local_220,local_228,local_224,0x200,local_224)" identifier (argument_list "(local_220,local_228,local_224,0x200,local_224)" ( identifier , identifier , identifier , number_literal , identifier ))) ;) (expression_statement "FUN_000196f0(iVar1,uVar3);" (call_expression "FUN_000196f0(iVar1,uVar3)" identifier (argument_list "(iVar1,uVar3)" ( identifier , identifier ))) ;) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))" ( (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 8)" * (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 8)" * (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(int **)(param_1 + 0xc) + 8)" ( (binary_expression "**(int **)(param_1 + 0xc) + 8" (pointer_expression "**(int **)(param_1 + 0xc)" * (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "(*(int **)(param_1 + 0xc),0,local_220,local_224)" ( (pointer_expression "*(int **)(param_1 + 0xc)" * (cast_expression "(int **)(param_1 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) , number_literal , identifier , identifier ))) ;) }) while (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" ( (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) ;) })) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (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                    \n    FUN_0004aab0();\n  }" { (expression_statement "FUN_0004aab0();" (call_expression "FUN_0004aab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (goto_statement goto statement_identifier ;)) (break_statement break ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , IDENT , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0001dcd0(int param_1,int param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001dcd0(int param_1,int param_2)" (identifier "FUN_0001dcd0") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  uint uVar3;\n  undefined4 local_228;\n  uint local_224;\n  undefined1 local_220 [512];\n  int local_20;\n  undefined4 uStack_14;\n  \n  iVar1 = param_1 + 0x34;\n  uStack_14 = 0x1dcde;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = FUN_000196e0(iVar1);\n  if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 local_228;" (type_identifier "undefined4") (identifier "local_228") (; ";")) (declaration "uint local_224;" (type_identifier "uint") (identifier "local_224") (; ";")) (declaration "undefined1 local_220 [512];" (type_identifier "undefined1") (array_declarator "local_220 [512]" (identifier "local_220") ([ "[") (number_literal "512") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "iVar1 = param_1 + 0x34;" (assignment_expression "iVar1 = param_1 + 0x34" (identifier "iVar1") (= "=") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34"))) (; ";")) (expression_statement "uStack_14 = 0x1dcde;" (assignment_expression "uStack_14 = 0x1dcde" (identifier "uStack_14") (= "=") (number_literal "0x1dcde")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_000196e0(iVar1)" (identifier "FUN_000196e0") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (if_statement "if (iVar2 < 1) {\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }\n  else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\nLAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);\n  }" ({ "{") (labeled_statement "LAB_0001ddbd:\n    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" (statement_identifier "LAB_0001ddbd") (: ":") (expression_statement "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);" (call_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 8) + 0x18))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 8) + 0x18)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 8) + 0x18)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 8) + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 8) + 0x18)" (( "(") (binary_expression "**(int **)(param_1 + 8) + 0x18" (pointer_expression "**(int **)(param_1 + 8)" (* "*") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 8),param_2)" (( "(") (pointer_expression "*(int **)(param_1 + 8)" (* "*") (cast_expression "(int **)(param_1 + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "param_2") () ")"))) (; ";"))) (} "}")) (else_clause "else {\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" (else "else") (compound_statement "{\n    *(int *)(param_1 + 0x48) = param_2;\n    if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }\n  }" ({ "{") (expression_statement "*(int *)(param_1 + 0x48) = param_2;" (assignment_expression "*(int *)(param_1 + 0x48) = param_2" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_2 == 0) {\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);\n    }" ({ "{") (do_statement "do {\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      } while (*(int *)(param_1 + 0x48) == 0);" (do "do") (compound_statement "{\n        iVar2 = FUN_000196e0(iVar1);\n        if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }\n        FUN_000197b0(iVar1,&local_228,&local_224);\n        if (0x200 < local_224) {\n          local_224 = 0x200;\n        }\n        uVar3 = local_224;\n        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);\n        FUN_000196f0(iVar1,uVar3);\n        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;\n      }" ({ "{") (expression_statement "iVar2 = FUN_000196e0(iVar1);" (assignment_expression "iVar2 = FUN_000196e0(iVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_000196e0(iVar1)" (identifier "FUN_000196e0") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (if_statement "if (iVar2 < 1) {\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;\n          break;\n        }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0001ddbd;" (goto "goto") (statement_identifier "LAB_0001ddbd") (; ";"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "FUN_000197b0(iVar1,&local_228,&local_224);" (call_expression "FUN_000197b0(iVar1,&local_228,&local_224)" (identifier "FUN_000197b0") (argument_list "(iVar1,&local_228,&local_224)" (( "(") (identifier "iVar1") (, ",") (pointer_expression "&local_228" (& "&") (identifier "local_228")) (, ",") (pointer_expression "&local_224" (& "&") (identifier "local_224")) () ")"))) (; ";")) (if_statement "if (0x200 < local_224) {\n          local_224 = 0x200;\n        }" (if "if") (parenthesized_expression "(0x200 < local_224)" (( "(") (binary_expression "0x200 < local_224" (number_literal "0x200") (< "<") (identifier "local_224")) () ")")) (compound_statement "{\n          local_224 = 0x200;\n        }" ({ "{") (expression_statement "local_224 = 0x200;" (assignment_expression "local_224 = 0x200" (identifier "local_224") (= "=") (number_literal "0x200")) (; ";")) (} "}"))) (expression_statement "uVar3 = local_224;" (assignment_expression "uVar3 = local_224" (identifier "uVar3") (= "=") (identifier "local_224")) (; ";")) (expression_statement "__memcpy_chk(local_220,local_228,local_224,0x200,local_224);" (call_expression "__memcpy_chk(local_220,local_228,local_224,0x200,local_224)" (identifier "__memcpy_chk") (argument_list "(local_220,local_228,local_224,0x200,local_224)" (( "(") (identifier "local_220") (, ",") (identifier "local_228") (, ",") (identifier "local_224") (, ",") (number_literal "0x200") (, ",") (identifier "local_224") () ")"))) (; ";")) (expression_statement "FUN_000196f0(iVar1,uVar3);" (call_expression "FUN_000196f0(iVar1,uVar3)" (identifier "FUN_000196f0") (argument_list "(iVar1,uVar3)" (( "(") (identifier "iVar1") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)\n        ;" (call_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)" (parenthesized_expression "(**(code **)(**(int **)(param_1 + 0xc) + 8))" (( "(") (pointer_expression "**(code **)(**(int **)(param_1 + 0xc) + 8)" (* "*") (pointer_expression "*(code **)(**(int **)(param_1 + 0xc) + 8)" (* "*") (cast_expression "(code **)(**(int **)(param_1 + 0xc) + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(int **)(param_1 + 0xc) + 8)" (( "(") (binary_expression "**(int **)(param_1 + 0xc) + 8" (pointer_expression "**(int **)(param_1 + 0xc)" (* "*") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(*(int **)(param_1 + 0xc),0,local_220,local_224)" (( "(") (pointer_expression "*(int **)(param_1 + 0xc)" (* "*") (cast_expression "(int **)(param_1 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (number_literal "0") (, ",") (identifier "local_220") (, ",") (identifier "local_224") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*(int *)(param_1 + 0x48) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x48) == 0" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (== "==") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}")))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0004aab0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (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                    \n    FUN_0004aab0();\n  }" ({ "{") (expression_statement "FUN_0004aab0();" (call_expression "FUN_0004aab0()" (identifier "FUN_0004aab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 function_1(type_1 var_1,int var_5)

{
  type_2 *ch;
  int var_9;
  int var_4;
  int var_2;
  void *data;
  int len;
  char databuf [512];
  
  ch = (type_2 *)(var_1 + 0xd);
  var_9 = *(int *)(var_2 + 0x14);
  var_4 = var_3(ch);
  if (var_4 < 1) {
LAB_0001ddbd:
    (**(type_3 **)(var_1[2]->plug + 0x18))(var_1[2],var_5);
  }
  else {
    var_1[0x12] = (type_4 *)var_5;
    if (var_5 == 0) {
      do {
        var_4 = var_3(ch);
        if (var_4 < 1) {
          if (var_1[0x12] == (type_4 *)0x0) goto LAB_0001ddbd;
          break;
        }
        var_6(ch,&data,&len);
        if (0x200 < (type_5)len) {
          len = 0x200;
        }
        var_4 = len;
        var_7(databuf,data,len,0x200);
        var_8(ch,var_4);
        (**(type_3 **)(var_1[3]->plug + 8))(var_1[3],0,databuf,len);
      } while (var_1[0x12] == (type_4 *)0x0);
    }
  }
  if (var_9 != *(int *)(var_2 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_10();
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) 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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))))))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (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))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (break_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (number_literal) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))))))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal) (identifier) (identifier))))) condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) 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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement))))

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

void __regparm3 MASKED(int param_1,int param_2)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  uint uVar3;
  undefined4 local_228;
  uint local_224;
  undefined1 local_220 [512];
  int local_20;
  undefined4 uStack_14;
  
  iVar1 = param_1 + 0x34;
  uStack_14 = 0x1dcde;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = FUN_000196e0(iVar1);
  if (iVar2 < 1) {
LAB_0001ddbd:
    (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),param_2);
  }
  else {
    *(int *)(param_1 + 0x48) = param_2;
    if (param_2 == 0) {
      do {
        iVar2 = FUN_000196e0(iVar1);
        if (iVar2 < 1) {
          if (*(int *)(param_1 + 0x48) == 0) goto LAB_0001ddbd;
          break;
        }
        FUN_000197b0(iVar1,&local_228,&local_224);
        if (0x200 < local_224) {
          local_224 = 0x200;
        }
        uVar3 = local_224;
        __memcpy_chk(local_220,local_228,local_224,0x200,local_224);
        FUN_000196f0(iVar1,uVar3);
        (**(code **)(**(int **)(param_1 + 0xc) + 8))(*(int **)(param_1 + 0xc),0,local_220,local_224)
        ;
      } while (*(int *)(param_1 + 0x48) == 0);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0004aab0();
  }
  return;
}

