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

void __regparm3 ssh_pkt_adduint32(Packet *pkt,ulong value)

{
  int iVar1;
  uchar *ptr;
  int iVar2;
  size_t n;
  int iVar3;
  int in_GS_OFFSET;
  
  iVar3 = pkt->length;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  ptr = pkt->data;
  iVar2 = iVar3 + 4;
  pkt->length = iVar2;
  if (pkt->maxlen < iVar2) {
    n = iVar3 + 0x104;
    if (pkt->body == (uchar *)0x0) {
      pkt->maxlen = n;
      ptr = (uchar *)saferealloc(ptr,n,1);
      iVar2 = pkt->length;
      pkt->data = ptr;
    }
    else {
      pkt->maxlen = n;
      iVar3 = (int)pkt->body - (int)ptr;
      ptr = (uchar *)saferealloc(ptr,n,1);
      iVar2 = pkt->length;
      pkt->data = ptr;
      pkt->body = ptr + iVar3;
    }
  }
  *(ulong *)(ptr + iVar2 + -4) =
       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18;
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void __regparm3 FUN_000438c0(int *param_1,uint param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int in_GS_OFFSET;
  
  iVar4 = *param_1;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = param_1[4];
  iVar3 = iVar4 + 4;
  *param_1 = iVar3;
  if (param_1[7] < iVar3) {
    iVar4 = iVar4 + 0x104;
    if (param_1[5] == 0) {
      param_1[7] = iVar4;
      iVar2 = FUN_00032a60(iVar2,iVar4,1);
      iVar3 = *param_1;
      param_1[4] = iVar2;
    }
    else {
      param_1[7] = iVar4;
      iVar5 = param_1[5] - iVar2;
      iVar2 = FUN_00032a60(iVar2,iVar4,1);
      iVar3 = *param_1;
      param_1[4] = iVar2;
      param_1[5] = iVar5 + iVar2;
    }
  }
  *(uint *)(iVar2 + -4 + iVar3) =
       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000c60b0();
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
BSWAP EDI
PUSH EBX
CALL 0x0001c520
ADD EBX,0xf6e81
SUB ESP,0x1c
MOV EDX,dword ptr [ESI]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESI + 0x10]
LEA ECX,[EDX + 0x4]
MOV dword ptr [ESI],ECX
CMP ECX,dword ptr [ESI + 0x1c]
JLE 0x0004391e
MOV EBP,dword ptr [ESI + 0x14]
ADD EDX,0x104
TEST EBP,EBP
JZ 0x00043940
SUB ESP,0x4
MOV dword ptr [ESI + 0x1c],EDX
SUB EBP,EAX
PUSH 0x1
PUSH EDX
PUSH EAX
CALL 0x00032a60
MOV ECX,dword ptr [ESI]
ADD ESP,0x10
ADD EBP,EAX
MOV dword ptr [ESI + 0x10],EAX
MOV dword ptr [ESI + 0x14],EBP
MOV dword ptr [EAX + ECX*0x1 + -0x4],EDI
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00043959
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
MOV dword ptr [ESI + 0x1c],EDX
PUSH 0x1
PUSH EDX
PUSH EAX
CALL 0x00032a60
MOV ECX,dword ptr [ESI]
ADD ESP,0x10
MOV dword ptr [ESI + 0x10],EAX
JMP 0x0004391e
CALL 0x000c60b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000438c0(int *param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000c60b0();\n}\n\n" comment (function_definition "void __regparm3 FUN_000438c0(int *param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000c60b0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000438c0(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000c60b0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (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 = param_1[4];" (assignment_expression "iVar2 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = iVar4 + 4;" (assignment_expression "iVar3 = iVar4 + 4" identifier = (binary_expression "iVar4 + 4" identifier + number_literal)) ;) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" if (parenthesized_expression "(param_1[7] < iVar3)" ( (binary_expression "param_1[7] < iVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" { (expression_statement "iVar4 = iVar4 + 0x104;" (assignment_expression "iVar4 = iVar4 + 0x104" identifier = (binary_expression "iVar4 + 0x104" identifier + number_literal)) ;) (if_statement "if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" if (parenthesized_expression "(param_1[5] == 0)" ( (binary_expression "param_1[5] == 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }" { (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" identifier = (call_expression "FUN_00032a60(iVar2,iVar4,1)" identifier (argument_list "(iVar2,iVar4,1)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" else (compound_statement "{\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" { (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = param_1[5] - iVar2;" (assignment_expression "iVar5 = param_1[5] - iVar2" identifier = (binary_expression "param_1[5] - iVar2" (subscript_expression "param_1[5]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" identifier = (call_expression "FUN_00032a60(iVar2,iVar4,1)" identifier (argument_list "(iVar2,iVar4,1)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[5] = iVar5 + iVar2;" (assignment_expression "param_1[5] = iVar5 + iVar2" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (binary_expression "iVar5 + iVar2" identifier + identifier)) ;) }))) })) (expression_statement "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;" (assignment_expression "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (pointer_expression "*(uint *)(iVar2 + -4 + iVar3)" * (cast_expression "(uint *)(iVar2 + -4 + iVar3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4 + iVar3)" ( (binary_expression "iVar2 + -4 + iVar3" (binary_expression "iVar2 + -4" identifier + number_literal) + identifier) )))) = (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" identifier >> number_literal) | (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" ( (binary_expression "param_2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" ( (binary_expression "param_2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_2 << 0x18" identifier << number_literal))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000c60b0();" (call_expression "FUN_000c60b0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 ssh_pkt_adduint32(Packet *pkt,ulong value)\n\n{\n  int iVar1;\n  uchar *ptr;\n  int iVar2;\n  size_t n;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar3 = pkt->length;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = pkt->data;\n  iVar2 = iVar3 + 4;\n  pkt->length = iVar2;\n  if (pkt->maxlen < iVar2) {\n    n = iVar3 + 0x104;\n    if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }\n  }\n  *(ulong *)(ptr + iVar2 + -4) =\n       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 ssh_pkt_adduint32(Packet *pkt,ulong value)\n\n{\n  int iVar1;\n  uchar *ptr;\n  int iVar2;\n  size_t n;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar3 = pkt->length;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = pkt->data;\n  iVar2 = iVar3 + 4;\n  pkt->length = iVar2;\n  if (pkt->maxlen < iVar2) {\n    n = iVar3 + 0x104;\n    if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }\n  }\n  *(ulong *)(ptr + iVar2 + -4) =\n       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh_pkt_adduint32(Packet *pkt,ulong value)" identifier (parameter_list "(Packet *pkt,ulong value)" ( (parameter_declaration "Packet *pkt" type_identifier (pointer_declarator "*pkt" * identifier)) , (parameter_declaration "ulong value" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uchar *ptr;\n  int iVar2;\n  size_t n;\n  int iVar3;\n  int in_GS_OFFSET;\n  \n  iVar3 = pkt->length;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  ptr = pkt->data;\n  iVar2 = iVar3 + 4;\n  pkt->length = iVar2;\n  if (pkt->maxlen < iVar2) {\n    n = iVar3 + 0x104;\n    if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }\n  }\n  *(ulong *)(ptr + iVar2 + -4) =\n       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uchar *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar3 = pkt->length;" (assignment_expression "iVar3 = pkt->length" identifier = (field_expression "pkt->length" identifier -> field_identifier)) ;) (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 "ptr = pkt->data;" (assignment_expression "ptr = pkt->data" identifier = (field_expression "pkt->data" identifier -> field_identifier)) ;) (expression_statement "iVar2 = iVar3 + 4;" (assignment_expression "iVar2 = iVar3 + 4" identifier = (binary_expression "iVar3 + 4" identifier + number_literal)) ;) (expression_statement "pkt->length = iVar2;" (assignment_expression "pkt->length = iVar2" (field_expression "pkt->length" identifier -> field_identifier) = identifier) ;) (if_statement "if (pkt->maxlen < iVar2) {\n    n = iVar3 + 0x104;\n    if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }\n  }" if (parenthesized_expression "(pkt->maxlen < iVar2)" ( (binary_expression "pkt->maxlen < iVar2" (field_expression "pkt->maxlen" identifier -> field_identifier) < identifier) )) (compound_statement "{\n    n = iVar3 + 0x104;\n    if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }\n  }" { (expression_statement "n = iVar3 + 0x104;" (assignment_expression "n = iVar3 + 0x104" identifier = (binary_expression "iVar3 + 0x104" identifier + number_literal)) ;) (if_statement "if (pkt->body == (uchar *)0x0) {\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }\n    else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }" if (parenthesized_expression "(pkt->body == (uchar *)0x0)" ( (binary_expression "pkt->body == (uchar *)0x0" (field_expression "pkt->body" identifier -> field_identifier) == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pkt->maxlen = n;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n    }" { (expression_statement "pkt->maxlen = n;" (assignment_expression "pkt->maxlen = n" (field_expression "pkt->maxlen" identifier -> field_identifier) = identifier) ;) (expression_statement "ptr = (uchar *)saferealloc(ptr,n,1);" (assignment_expression "ptr = (uchar *)saferealloc(ptr,n,1)" identifier = (cast_expression "(uchar *)saferealloc(ptr,n,1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(ptr,n,1)" identifier (argument_list "(ptr,n,1)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "iVar2 = pkt->length;" (assignment_expression "iVar2 = pkt->length" identifier = (field_expression "pkt->length" identifier -> field_identifier)) ;) (expression_statement "pkt->data = ptr;" (assignment_expression "pkt->data = ptr" (field_expression "pkt->data" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }" else (compound_statement "{\n      pkt->maxlen = n;\n      iVar3 = (int)pkt->body - (int)ptr;\n      ptr = (uchar *)saferealloc(ptr,n,1);\n      iVar2 = pkt->length;\n      pkt->data = ptr;\n      pkt->body = ptr + iVar3;\n    }" { (expression_statement "pkt->maxlen = n;" (assignment_expression "pkt->maxlen = n" (field_expression "pkt->maxlen" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar3 = (int)pkt->body - (int)ptr;" (assignment_expression "iVar3 = (int)pkt->body - (int)ptr" identifier = (binary_expression "(int)pkt->body - (int)ptr" (cast_expression "(int)pkt->body" ( (type_descriptor "int" primitive_type) ) (field_expression "pkt->body" identifier -> field_identifier)) - (cast_expression "(int)ptr" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "ptr = (uchar *)saferealloc(ptr,n,1);" (assignment_expression "ptr = (uchar *)saferealloc(ptr,n,1)" identifier = (cast_expression "(uchar *)saferealloc(ptr,n,1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(ptr,n,1)" identifier (argument_list "(ptr,n,1)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "iVar2 = pkt->length;" (assignment_expression "iVar2 = pkt->length" identifier = (field_expression "pkt->length" identifier -> field_identifier)) ;) (expression_statement "pkt->data = ptr;" (assignment_expression "pkt->data = ptr" (field_expression "pkt->data" identifier -> field_identifier) = identifier) ;) (expression_statement "pkt->body = ptr + iVar3;" (assignment_expression "pkt->body = ptr + iVar3" (field_expression "pkt->body" identifier -> field_identifier) = (binary_expression "ptr + iVar3" identifier + identifier)) ;) }))) })) (expression_statement "*(ulong *)(ptr + iVar2 + -4) =\n       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18;" (assignment_expression "*(ulong *)(ptr + iVar2 + -4) =\n       value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18" (pointer_expression "*(ulong *)(ptr + iVar2 + -4)" * (cast_expression "(ulong *)(ptr + iVar2 + -4)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ptr + iVar2 + -4)" ( (binary_expression "ptr + iVar2 + -4" (binary_expression "ptr + iVar2" identifier + identifier) + number_literal) )))) = (binary_expression "value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8 | value << 0x18" (binary_expression "value >> 0x18 | (value & 0xff0000) >> 8 | (value & 0xff00) << 8" (binary_expression "value >> 0x18 | (value & 0xff0000) >> 8" (binary_expression "value >> 0x18" identifier >> number_literal) | (binary_expression "(value & 0xff0000) >> 8" (parenthesized_expression "(value & 0xff0000)" ( (binary_expression "value & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(value & 0xff00) << 8" (parenthesized_expression "(value & 0xff00)" ( (binary_expression "value & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "value << 0x18" identifier << number_literal))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_000438c0(int *param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000c60b0();\n}\n\n" (function_definition "void __regparm3 FUN_000438c0(int *param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000c60b0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000438c0(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000c60b0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (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 = param_1[4];" (assignment_expression "iVar2 = param_1[4]" identifier = (subscript_expression "param_1[4]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = iVar4 + 4;" (assignment_expression "iVar3 = iVar4 + 4" identifier = (binary_expression "iVar4 + 4" identifier + number_literal)) ;) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" if (parenthesized_expression "(param_1[7] < iVar3)" ( (binary_expression "param_1[7] < iVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" { (expression_statement "iVar4 = iVar4 + 0x104;" (assignment_expression "iVar4 = iVar4 + 0x104" identifier = (binary_expression "iVar4 + 0x104" identifier + number_literal)) ;) (if_statement "if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" if (parenthesized_expression "(param_1[5] == 0)" ( (binary_expression "param_1[5] == 0" (subscript_expression "param_1[5]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }" { (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" identifier = (call_expression "FUN_00032a60(iVar2,iVar4,1)" identifier (argument_list "(iVar2,iVar4,1)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) }) (else_clause "else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" else (compound_statement "{\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" { (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = param_1[5] - iVar2;" (assignment_expression "iVar5 = param_1[5] - iVar2" identifier = (binary_expression "param_1[5] - iVar2" (subscript_expression "param_1[5]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" identifier = (call_expression "FUN_00032a60(iVar2,iVar4,1)" identifier (argument_list "(iVar2,iVar4,1)" ( identifier , identifier , number_literal )))) ;) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[5] = iVar5 + iVar2;" (assignment_expression "param_1[5] = iVar5 + iVar2" (subscript_expression "param_1[5]" identifier [ number_literal ]) = (binary_expression "iVar5 + iVar2" identifier + identifier)) ;) }))) })) (expression_statement "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;" (assignment_expression "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (pointer_expression "*(uint *)(iVar2 + -4 + iVar3)" * (cast_expression "(uint *)(iVar2 + -4 + iVar3)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4 + iVar3)" ( (binary_expression "iVar2 + -4 + iVar3" (binary_expression "iVar2 + -4" identifier + number_literal) + identifier) )))) = (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" identifier >> number_literal) | (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" ( (binary_expression "param_2 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" ( (binary_expression "param_2 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_2 << 0x18" identifier << number_literal))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000c60b0();" (call_expression "FUN_000c60b0()" identifier (argument_list "()" ( ))) ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (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 = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + IDENT)) ;) }))) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << 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 { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_000438c0(int *param_1,uint param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000c60b0();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000438c0(int *param_1,uint param_2)" (identifier "FUN_000438c0") (parameter_list "(int *param_1,uint param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  \n  iVar4 = *param_1;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = param_1[4];\n  iVar3 = iVar4 + 4;\n  *param_1 = iVar3;\n  if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }\n  *(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000c60b0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar4 = *param_1;" (assignment_expression "iVar4 = *param_1" (identifier "iVar4") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (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 = param_1[4];" (assignment_expression "iVar2 = param_1[4]" (identifier "iVar2") (= "=") (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "iVar3 = iVar4 + 4;" (assignment_expression "iVar3 = iVar4 + 4" (identifier "iVar3") (= "=") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (param_1[7] < iVar3) {\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" (if "if") (parenthesized_expression "(param_1[7] < iVar3)" (( "(") (binary_expression "param_1[7] < iVar3" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    iVar4 = iVar4 + 0x104;\n    if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }\n  }" ({ "{") (expression_statement "iVar4 = iVar4 + 0x104;" (assignment_expression "iVar4 = iVar4 + 0x104" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 0x104" (identifier "iVar4") (+ "+") (number_literal "0x104"))) (; ";")) (if_statement "if (param_1[5] == 0) {\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }\n    else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" (if "if") (parenthesized_expression "(param_1[5] == 0)" (( "(") (binary_expression "param_1[5] == 0" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      param_1[7] = iVar4;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n    }" ({ "{") (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" (identifier "iVar2") (= "=") (call_expression "FUN_00032a60(iVar2,iVar4,1)" (identifier "FUN_00032a60") (argument_list "(iVar2,iVar4,1)" (( "(") (identifier "iVar2") (, ",") (identifier "iVar4") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" (identifier "iVar3") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (} "}")) (else_clause "else {\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" (else "else") (compound_statement "{\n      param_1[7] = iVar4;\n      iVar5 = param_1[5] - iVar2;\n      iVar2 = FUN_00032a60(iVar2,iVar4,1);\n      iVar3 = *param_1;\n      param_1[4] = iVar2;\n      param_1[5] = iVar5 + iVar2;\n    }" ({ "{") (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "iVar5 = param_1[5] - iVar2;" (assignment_expression "iVar5 = param_1[5] - iVar2" (identifier "iVar5") (= "=") (binary_expression "param_1[5] - iVar2" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (- "-") (identifier "iVar2"))) (; ";")) (expression_statement "iVar2 = FUN_00032a60(iVar2,iVar4,1);" (assignment_expression "iVar2 = FUN_00032a60(iVar2,iVar4,1)" (identifier "iVar2") (= "=") (call_expression "FUN_00032a60(iVar2,iVar4,1)" (identifier "FUN_00032a60") (argument_list "(iVar2,iVar4,1)" (( "(") (identifier "iVar2") (, ",") (identifier "iVar4") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "iVar3 = *param_1;" (assignment_expression "iVar3 = *param_1" (identifier "iVar3") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "param_1[4] = iVar2;" (assignment_expression "param_1[4] = iVar2" (subscript_expression "param_1[4]" (identifier "param_1") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "param_1[5] = iVar5 + iVar2;" (assignment_expression "param_1[5] = iVar5 + iVar2" (subscript_expression "param_1[5]" (identifier "param_1") ([ "[") (number_literal "5") (] "]")) (= "=") (binary_expression "iVar5 + iVar2" (identifier "iVar5") (+ "+") (identifier "iVar2"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;" (assignment_expression "*(uint *)(iVar2 + -4 + iVar3) =\n       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (pointer_expression "*(uint *)(iVar2 + -4 + iVar3)" (* "*") (cast_expression "(uint *)(iVar2 + -4 + iVar3)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4 + iVar3)" (( "(") (binary_expression "iVar2 + -4 + iVar3" (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8" (binary_expression "param_2 >> 0x18 | (param_2 & 0xff0000) >> 8" (binary_expression "param_2 >> 0x18" (identifier "param_2") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_2 & 0xff0000) >> 8" (parenthesized_expression "(param_2 & 0xff0000)" (( "(") (binary_expression "param_2 & 0xff0000" (identifier "param_2") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_2 & 0xff00) << 8" (parenthesized_expression "(param_2 & 0xff00)" (( "(") (binary_expression "param_2 & 0xff00" (identifier "param_2") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_2 << 0x18" (identifier "param_2") (<< "<<") (number_literal "0x18")))) (; ";")) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000c60b0();" (call_expression "FUN_000c60b0()" (identifier "FUN_000c60b0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *pkt,type_2 var_6)

{
  int var_7;
  type_3 *var_5;
  int var_3;
  size_t n;
  int var_2;
  int var_1;
  
  var_2 = pkt->length;
  var_7 = *(int *)(var_1 + 0x14);
  var_5 = pkt->data;
  var_3 = var_2 + 4;
  pkt->length = var_3;
  if (pkt->maxlen < var_3) {
    n = var_2 + 0x104;
    if (pkt->body == (type_3 *)0x0) {
      pkt->maxlen = n;
      var_5 = (type_3 *)var_4(var_5,n,1);
      var_3 = pkt->length;
      pkt->data = var_5;
    }
    else {
      pkt->maxlen = n;
      var_2 = (int)pkt->body - (int)var_5;
      var_5 = (type_3 *)var_4(var_5,n,1);
      var_3 = pkt->length;
      pkt->data = var_5;
      pkt->body = var_5 + var_2;
    }
  }
  *(type_2 *)(var_5 + var_3 + -4) =
       var_6 >> 0x18 | (var_6 & 0xff0000) >> 8 | (var_6 & 0xff00) << 8 | var_6 << 0x18;
  if (var_7 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_8();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) 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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (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: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (identifier))))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))))) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) 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 (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void __regparm3 MASKED(int *param_1,uint param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  int in_GS_OFFSET;
  
  iVar4 = *param_1;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = param_1[4];
  iVar3 = iVar4 + 4;
  *param_1 = iVar3;
  if (param_1[7] < iVar3) {
    iVar4 = iVar4 + 0x104;
    if (param_1[5] == 0) {
      param_1[7] = iVar4;
      iVar2 = FUN_00032a60(iVar2,iVar4,1);
      iVar3 = *param_1;
      param_1[4] = iVar2;
    }
    else {
      param_1[7] = iVar4;
      iVar5 = param_1[5] - iVar2;
      iVar2 = FUN_00032a60(iVar2,iVar4,1);
      iVar3 = *param_1;
      param_1[4] = iVar2;
      param_1[5] = iVar5 + iVar2;
    }
  }
  *(uint *)(iVar2 + -4 + iVar3) =
       param_2 >> 0x18 | (param_2 & 0xff0000) >> 8 | (param_2 & 0xff00) << 8 | param_2 << 0x18;
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000c60b0();
}

