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

sftp_request * fxp_rmdir_send(char *path)

{
  int iVar1;
  uint uVar2;
  sftp_request *psVar3;
  sftp_packet *pkt;
  char *pcVar4;
  uint uVar5;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  psVar3 = sftp_alloc_request();
  pkt = sftp_pkt_init(0xf);
  uVar2 = psVar3->id;
  uVar5 = pkt->length;
  pkt->length = uVar5 + 4;
  if ((int)pkt->maxlen < (int)(uVar5 + 4)) {
    pkt->maxlen = uVar5 + 0x104;
    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);
    pkt->data = pcVar4;
    uVar5 = pkt->length - 4;
  }
  else {
    pcVar4 = pkt->data;
  }
  *(uint *)(pcVar4 + uVar5) =
       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |
       uVar2 << 0x18;
  sftp_pkt_addstring(pkt,path);
  *pkt->data = (char)(pkt->length - 4 >> 0x18);
  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);
  pkt->data[2] = (char)(pkt->length - 4 >> 8);
  pkt->data[3] = (char)pkt->length + -4;
  sftp_senddata(pkt->data,pkt->length);
  if (pkt->data != (char *)0x0) {
    safefree(pkt->data);
  }
  safefree(pkt);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return psVar3;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

uint * FUN_000316f0(void)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = (uint *)FUN_0002f5d0();
  piVar4 = (int *)FUN_0002f910();
  uVar2 = *puVar3;
  iVar6 = piVar4[1];
  piVar4[1] = iVar6 + 4;
  if (piVar4[2] < iVar6 + 4) {
    piVar4[2] = iVar6 + 0x104;
    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);
    *piVar4 = iVar5;
    iVar6 = piVar4[1] + -4;
  }
  else {
    iVar5 = *piVar4;
  }
  *(uint *)(iVar5 + iVar6) =
       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |
       uVar2 << 0x18;
  FUN_0002f7e0();
  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);
  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);
  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);
  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;
  FUN_00029280(*piVar4,piVar4[1]);
  if (*piVar4 != 0) {
    FUN_0001dd30(*piVar4);
  }
  FUN_0001dd30(piVar4);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x9e697
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EBP,dword ptr [ESP + 0x40]
CALL 0x0002f5d0
MOV EDI,EAX
MOV EAX,0xf
CALL 0x0002f910
MOV ECX,dword ptr [EDI]
MOV ESI,EAX
XOR EAX,EAX
MOV EDX,ECX
SHR EDX,0x18
MOV AL,DL
MOV EDX,ECX
SHR EDX,0x10
MOV AH,DL
MOVZX EDX,CH
SHL ECX,0x18
MOVZX EAX,AX
SHL EDX,0x10
OR EDX,EAX
OR EDX,ECX
MOV ECX,dword ptr [ESI + 0x4]
LEA EAX,[ECX + 0x4]
MOV dword ptr [ESI + 0x4],EAX
CMP EAX,dword ptr [ESI + 0x8]
JG 0x000317e0
MOV EAX,dword ptr [ESI]
MOV dword ptr [EAX + ECX*0x1],EDX
MOV EDX,EBP
MOV EAX,ESI
CALL 0x0002f7e0
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB ESP,0x8
SUB EAX,0x4
SHR EAX,0x18
MOV byte ptr [EDX],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
SHR EAX,0x10
MOV byte ptr [EDX + 0x1],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x2],AH
MOVZX EAX,byte ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x3],AL
PUSH dword ptr [ESI + 0x4]
PUSH dword ptr [ESI]
CALL 0x00029280
MOV EAX,dword ptr [ESI]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000317bb
SUB ESP,0xc
PUSH EAX
CALL 0x0001dd30
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x0001dd30
ADD ESP,0x10
MOV EAX,EDI
MOV EDI,dword ptr [ESP + 0x1c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0003180e
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0xc],EDX
ADD ECX,0x104
SUB ESP,0x4
MOV dword ptr [ESI + 0x8],ECX
PUSH 0x1
PUSH ECX
PUSH dword ptr [ESI]
CALL 0x0001dc50
MOV ECX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [ESI],EAX
SUB ECX,0x4
JMP 0x0003175b
CALL 0x0008eb20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint * FUN_000316f0(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}\n\n" comment (function_definition "uint * FUN_000316f0(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "* FUN_000316f0(void)" * (function_declarator "FUN_000316f0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type 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 "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" identifier = (cast_expression "(uint *)FUN_0002f5d0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f5d0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" identifier = (cast_expression "(int *)FUN_0002f910()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f910()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar6 + 4;" (assignment_expression "piVar4[1] = iVar6 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar6 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar6 + 4)" ( (binary_expression "piVar4[2] < iVar6 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar6 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar6 + 0x104;" (assignment_expression "piVar4[2] = iVar6 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar6 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" identifier (argument_list "(*piVar4,iVar6 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar6 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar6 = piVar4[1] + -4;" (assignment_expression "iVar6 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar5 = *piVar4;\n  }" else (compound_statement "{\n    iVar5 = *piVar4;\n  }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar5 + iVar6)" * (cast_expression "(uint *)(iVar5 + iVar6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + iVar6)" ( (binary_expression "iVar5 + iVar6" identifier + identifier) )))) = (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" ( (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" identifier (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (cast_expression "(char)(uVar2 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x10)" ( (binary_expression "uVar2 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar2 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x18)" ( (binary_expression "uVar2 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0002f7e0();" (call_expression "FUN_0002f7e0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" * (cast_expression "(char *)*piVar4" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" * (cast_expression "(char *)(*piVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 1)" ( (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" * (cast_expression "(char *)(*piVar4 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 2)" ( (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" * (cast_expression "(char *)(*piVar4 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 3)" ( (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" identifier (argument_list "(*piVar4,piVar4[1])" ( (pointer_expression "*piVar4" * identifier) , (subscript_expression "piVar4[1]" identifier [ number_literal ]) ))) ;) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" { (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) ))) ;) })) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" identifier (argument_list "(piVar4)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\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 puVar3;\n  }" { (return_statement "return puVar3;" return identifier ;) })) comment (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nsftp_request * fxp_rmdir_send(char *path)\n\n{\n  int iVar1;\n  uint uVar2;\n  sftp_request *psVar3;\n  sftp_packet *pkt;\n  char *pcVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar3 = sftp_alloc_request();\n  pkt = sftp_pkt_init(0xf);\n  uVar2 = psVar3->id;\n  uVar5 = pkt->length;\n  pkt->length = uVar5 + 4;\n  if ((int)pkt->maxlen < (int)(uVar5 + 4)) {\n    pkt->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);\n    pkt->data = pcVar4;\n    uVar5 = pkt->length - 4;\n  }\n  else {\n    pcVar4 = pkt->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  sftp_pkt_addstring(pkt,path);\n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  sftp_senddata(pkt->data,pkt->length);\n  if (pkt->data != (char *)0x0) {\n    safefree(pkt->data);\n  }\n  safefree(pkt);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "sftp_request * fxp_rmdir_send(char *path)\n\n{\n  int iVar1;\n  uint uVar2;\n  sftp_request *psVar3;\n  sftp_packet *pkt;\n  char *pcVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar3 = sftp_alloc_request();\n  pkt = sftp_pkt_init(0xf);\n  uVar2 = psVar3->id;\n  uVar5 = pkt->length;\n  pkt->length = uVar5 + 4;\n  if ((int)pkt->maxlen < (int)(uVar5 + 4)) {\n    pkt->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);\n    pkt->data = pcVar4;\n    uVar5 = pkt->length - 4;\n  }\n  else {\n    pcVar4 = pkt->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  sftp_pkt_addstring(pkt,path);\n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  sftp_senddata(pkt->data,pkt->length);\n  if (pkt->data != (char *)0x0) {\n    safefree(pkt->data);\n  }\n  safefree(pkt);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (pointer_declarator "* fxp_rmdir_send(char *path)" * (function_declarator "fxp_rmdir_send(char *path)" identifier (parameter_list "(char *path)" ( (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  sftp_request *psVar3;\n  sftp_packet *pkt;\n  char *pcVar4;\n  uint uVar5;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar3 = sftp_alloc_request();\n  pkt = sftp_pkt_init(0xf);\n  uVar2 = psVar3->id;\n  uVar5 = pkt->length;\n  pkt->length = uVar5 + 4;\n  if ((int)pkt->maxlen < (int)(uVar5 + 4)) {\n    pkt->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);\n    pkt->data = pcVar4;\n    uVar5 = pkt->length - 4;\n  }\n  else {\n    pcVar4 = pkt->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  sftp_pkt_addstring(pkt,path);\n  *pkt->data = (char)(pkt->length - 4 >> 0x18);\n  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);\n  pkt->data[2] = (char)(pkt->length - 4 >> 8);\n  pkt->data[3] = (char)pkt->length + -4;\n  sftp_senddata(pkt->data,pkt->length);\n  if (pkt->data != (char *)0x0) {\n    safefree(pkt->data);\n  }\n  safefree(pkt);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "sftp_request *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "sftp_packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type 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 "psVar3 = sftp_alloc_request();" (assignment_expression "psVar3 = sftp_alloc_request()" identifier = (call_expression "sftp_alloc_request()" identifier (argument_list "()" ( )))) ;) (expression_statement "pkt = sftp_pkt_init(0xf);" (assignment_expression "pkt = sftp_pkt_init(0xf)" identifier = (call_expression "sftp_pkt_init(0xf)" identifier (argument_list "(0xf)" ( number_literal )))) ;) (expression_statement "uVar2 = psVar3->id;" (assignment_expression "uVar2 = psVar3->id" identifier = (field_expression "psVar3->id" identifier -> field_identifier)) ;) (expression_statement "uVar5 = pkt->length;" (assignment_expression "uVar5 = pkt->length" identifier = (field_expression "pkt->length" identifier -> field_identifier)) ;) (expression_statement "pkt->length = uVar5 + 4;" (assignment_expression "pkt->length = uVar5 + 4" (field_expression "pkt->length" identifier -> field_identifier) = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) (if_statement "if ((int)pkt->maxlen < (int)(uVar5 + 4)) {\n    pkt->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);\n    pkt->data = pcVar4;\n    uVar5 = pkt->length - 4;\n  }\n  else {\n    pcVar4 = pkt->data;\n  }" if (parenthesized_expression "((int)pkt->maxlen < (int)(uVar5 + 4))" ( (binary_expression "(int)pkt->maxlen < (int)(uVar5 + 4)" (cast_expression "(int)pkt->maxlen" ( (type_descriptor "int" primitive_type) ) (field_expression "pkt->maxlen" identifier -> field_identifier)) < (cast_expression "(int)(uVar5 + 4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar5 + 4)" ( (binary_expression "uVar5 + 4" identifier + number_literal) )))) )) (compound_statement "{\n    pkt->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);\n    pkt->data = pcVar4;\n    uVar5 = pkt->length - 4;\n  }" { (expression_statement "pkt->maxlen = uVar5 + 0x104;" (assignment_expression "pkt->maxlen = uVar5 + 0x104" (field_expression "pkt->maxlen" identifier -> field_identifier) = (binary_expression "uVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1);" (assignment_expression "pcVar4 = (char *)saferealloc(pkt->data,uVar5 + 0x104,1)" identifier = (cast_expression "(char *)saferealloc(pkt->data,uVar5 + 0x104,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(pkt->data,uVar5 + 0x104,1)" identifier (argument_list "(pkt->data,uVar5 + 0x104,1)" ( (field_expression "pkt->data" identifier -> field_identifier) , (binary_expression "uVar5 + 0x104" identifier + number_literal) , number_literal ))))) ;) (expression_statement "pkt->data = pcVar4;" (assignment_expression "pkt->data = pcVar4" (field_expression "pkt->data" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar5 = pkt->length - 4;" (assignment_expression "uVar5 = pkt->length - 4" identifier = (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal)) ;) }) (else_clause "else {\n    pcVar4 = pkt->data;\n  }" else (compound_statement "{\n    pcVar4 = pkt->data;\n  }" { (expression_statement "pcVar4 = pkt->data;" (assignment_expression "pcVar4 = pkt->data" identifier = (field_expression "pkt->data" identifier -> field_identifier)) ;) }))) (expression_statement "*(uint *)(pcVar4 + uVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(pcVar4 + uVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(pcVar4 + uVar5)" * (cast_expression "(uint *)(pcVar4 + uVar5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + uVar5)" ( (binary_expression "pcVar4 + uVar5" identifier + identifier) )))) = (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" ( (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" identifier (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (cast_expression "(char)(uVar2 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x10)" ( (binary_expression "uVar2 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar2 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x18)" ( (binary_expression "uVar2 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "sftp_pkt_addstring(pkt,path);" (call_expression "sftp_pkt_addstring(pkt,path)" identifier (argument_list "(pkt,path)" ( identifier , identifier ))) ;) (expression_statement "*pkt->data = (char)(pkt->length - 4 >> 0x18);" (assignment_expression "*pkt->data = (char)(pkt->length - 4 >> 0x18)" (pointer_expression "*pkt->data" * (field_expression "pkt->data" identifier -> field_identifier)) = (cast_expression "(char)(pkt->length - 4 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 0x18)" ( (binary_expression "pkt->length - 4 >> 0x18" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[1] = (char)(pkt->length - 4 >> 0x10);" (assignment_expression "pkt->data[1] = (char)(pkt->length - 4 >> 0x10)" (subscript_expression "pkt->data[1]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(pkt->length - 4 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 0x10)" ( (binary_expression "pkt->length - 4 >> 0x10" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[2] = (char)(pkt->length - 4 >> 8);" (assignment_expression "pkt->data[2] = (char)(pkt->length - 4 >> 8)" (subscript_expression "pkt->data[2]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(pkt->length - 4 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(pkt->length - 4 >> 8)" ( (binary_expression "pkt->length - 4 >> 8" (binary_expression "pkt->length - 4" (field_expression "pkt->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "pkt->data[3] = (char)pkt->length + -4;" (assignment_expression "pkt->data[3] = (char)pkt->length + -4" (subscript_expression "pkt->data[3]" (field_expression "pkt->data" identifier -> field_identifier) [ number_literal ]) = (binary_expression "(char)pkt->length + -4" (cast_expression "(char)pkt->length" ( (type_descriptor "char" primitive_type) ) (field_expression "pkt->length" identifier -> field_identifier)) + number_literal)) ;) (expression_statement "sftp_senddata(pkt->data,pkt->length);" (call_expression "sftp_senddata(pkt->data,pkt->length)" identifier (argument_list "(pkt->data,pkt->length)" ( (field_expression "pkt->data" identifier -> field_identifier) , (field_expression "pkt->length" identifier -> field_identifier) ))) ;) (if_statement "if (pkt->data != (char *)0x0) {\n    safefree(pkt->data);\n  }" if (parenthesized_expression "(pkt->data != (char *)0x0)" ( (binary_expression "pkt->data != (char *)0x0" (field_expression "pkt->data" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    safefree(pkt->data);\n  }" { (expression_statement "safefree(pkt->data);" (call_expression "safefree(pkt->data)" identifier (argument_list "(pkt->data)" ( (field_expression "pkt->data" identifier -> field_identifier) ))) ;) })) (expression_statement "safefree(pkt);" (call_expression "safefree(pkt)" identifier (argument_list "(pkt)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar3;\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 psVar3;\n  }" { (return_statement "return psVar3;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "uint * FUN_000316f0(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}\n\n" (function_definition "uint * FUN_000316f0(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "* FUN_000316f0(void)" * (function_declarator "FUN_000316f0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type 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 "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" identifier = (cast_expression "(uint *)FUN_0002f5d0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f5d0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" identifier = (cast_expression "(int *)FUN_0002f910()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f910()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar6 + 4;" (assignment_expression "piVar4[1] = iVar6 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar6 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar6 + 4)" ( (binary_expression "piVar4[2] < iVar6 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar6 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar6 + 0x104;" (assignment_expression "piVar4[2] = iVar6 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar6 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" identifier (argument_list "(*piVar4,iVar6 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar6 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar6 = piVar4[1] + -4;" (assignment_expression "iVar6 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar5 = *piVar4;\n  }" else (compound_statement "{\n    iVar5 = *piVar4;\n  }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar5 + iVar6)" * (cast_expression "(uint *)(iVar5 + iVar6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + iVar6)" ( (binary_expression "iVar5 + iVar6" identifier + identifier) )))) = (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" ( (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" identifier (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (cast_expression "(char)(uVar2 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x10)" ( (binary_expression "uVar2 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar2 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x18)" ( (binary_expression "uVar2 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "FUN_0002f7e0();" (call_expression "FUN_0002f7e0()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" * (cast_expression "(char *)*piVar4" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" * (cast_expression "(char *)(*piVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 1)" ( (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" * (cast_expression "(char *)(*piVar4 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 2)" ( (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" * (cast_expression "(char *)(*piVar4 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 3)" ( (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" identifier (argument_list "(*piVar4,piVar4[1])" ( (pointer_expression "*piVar4" * identifier) , (subscript_expression "piVar4[1]" identifier [ number_literal ]) ))) ;) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" { (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) ))) ;) })) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" identifier (argument_list "(piVar4)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\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 puVar3;\n  }" { (return_statement "return puVar3;" return identifier ;) })) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & LIT) )) << LIT) | (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) , (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) ))))) | (binary_expression IDENT << LIT))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (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 IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "uint * FUN_000316f0(void)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" (type_identifier "uint") (pointer_declarator "* FUN_000316f0(void)" (* "*") (function_declarator "FUN_000316f0(void)" (identifier "FUN_000316f0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")")))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar6 = piVar4[1];\n  piVar4[1] = iVar6 + 4;\n  if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  *(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  FUN_0002f7e0();\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (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 "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" (identifier "puVar3") (= "=") (cast_expression "(uint *)FUN_0002f5d0()" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002f5d0()" (identifier "FUN_0002f5d0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_0002f910()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002f910()" (identifier "FUN_0002f910") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" (identifier "uVar2") (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" (identifier "iVar6") (= "=") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar4[1] = iVar6 + 4;" (assignment_expression "piVar4[1] = iVar6 + 4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar6 + 4" (identifier "iVar6") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (piVar4[2] < iVar6 + 4) {\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" (if "if") (parenthesized_expression "(piVar4[2] < iVar6 + 4)" (( "(") (binary_expression "piVar4[2] < iVar6 + 4" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (< "<") (binary_expression "iVar6 + 4" (identifier "iVar6") (+ "+") (number_literal "4"))) () ")")) (compound_statement "{\n    piVar4[2] = iVar6 + 0x104;\n    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] + -4;\n  }" ({ "{") (expression_statement "piVar4[2] = iVar6 + 0x104;" (assignment_expression "piVar4[2] = iVar6 + 0x104" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "iVar6 + 0x104" (identifier "iVar6") (+ "+") (number_literal "0x104"))) (; ";")) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" (identifier "iVar5") (= "=") (call_expression "FUN_0001dc50(*piVar4,iVar6 + 0x104,1)" (identifier "FUN_0001dc50") (argument_list "(*piVar4,iVar6 + 0x104,1)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (binary_expression "iVar6 + 0x104" (identifier "iVar6") (+ "+") (number_literal "0x104")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "iVar6 = piVar4[1] + -4;" (assignment_expression "iVar6 = piVar4[1] + -4" (identifier "iVar6") (= "=") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4"))) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = *piVar4;\n  }" (else "else") (compound_statement "{\n    iVar5 = *piVar4;\n  }" ({ "{") (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" (identifier "iVar5") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (} "}")))) (expression_statement "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar5 + iVar6) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar5 + iVar6)" (* "*") (cast_expression "(uint *)(iVar5 + iVar6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + iVar6)" (( "(") (binary_expression "iVar5 + iVar6" (identifier "iVar5") (+ "+") (identifier "iVar6")) () ")")))) (= "=") (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" (( "(") (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" (identifier "uVar2") (>> ">>") (number_literal "8")) (& "&") (number_literal "0xff")) () ")")) (<< "<<") (number_literal "0x10")) (| "|") (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (identifier "CONCAT11") (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (( "(") (cast_expression "(char)(uVar2 >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar2 >> 0x10)" (( "(") (binary_expression "uVar2 >> 0x10" (identifier "uVar2") (>> ">>") (number_literal "0x10")) () ")"))) (, ",") (cast_expression "(char)(uVar2 >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar2 >> 0x18)" (( "(") (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")) () ")"))) () ")"))))) (| "|") (binary_expression "uVar2 << 0x18" (identifier "uVar2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "FUN_0002f7e0();" (call_expression "FUN_0002f7e0()" (identifier "FUN_0002f7e0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" (* "*") (cast_expression "(char *)*piVar4" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" (* "*") (cast_expression "(char *)(*piVar4 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 1)" (( "(") (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "1")) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" (* "*") (cast_expression "(char *)(*piVar4 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 2)" (( "(") (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" (* "*") (cast_expression "(char *)(*piVar4 + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 3)" (( "(") (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "3")) () ")")))) (= "=") (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (+ "+") (number_literal "-4"))) (; ";")) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" (identifier "FUN_00029280") (argument_list "(*piVar4,piVar4[1])" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" (if "if") (parenthesized_expression "(*piVar4 != 0)" (( "(") (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" ({ "{") (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" (identifier "FUN_0001dd30") (argument_list "(*piVar4)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" (identifier "FUN_0001dd30") (argument_list "(piVar4)" (( "(") (identifier "piVar4") () ")"))) (; ";")) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\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 puVar3;\n  }" ({ "{") (return_statement "return puVar3;" (return "return") (identifier "puVar3") (; ";")) (} "}"))) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" (identifier "FUN_0008eb20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 * function_1(char *path)

{
  int var_12;
  type_2 var_7;
  type_1 *psVar3;
  type_3 *pkt;
  char *var_6;
  type_2 var_4;
  int var_1;
  
  var_12 = *(int *)(var_1 + 0x14);
  psVar3 = var_2();
  pkt = var_3(0xf);
  var_7 = psVar3->id;
  var_4 = pkt->length;
  pkt->length = var_4 + 4;
  if ((int)pkt->maxlen < (int)(var_4 + 4)) {
    pkt->maxlen = var_4 + 0x104;
    var_6 = (char *)var_5(pkt->data,var_4 + 0x104,1);
    pkt->data = var_6;
    var_4 = pkt->length - 4;
  }
  else {
    var_6 = pkt->data;
  }
  *(type_2 *)(var_6 + var_4) =
       (var_7 >> 8 & 0xff) << 0x10 | (type_2)var_8((char)(var_7 >> 0x10),(char)(var_7 >> 0x18)) |
       var_7 << 0x18;
  var_9(pkt,path);
  *pkt->data = (char)(pkt->length - 4 >> 0x18);
  pkt->data[1] = (char)(pkt->length - 4 >> 0x10);
  pkt->data[2] = (char)(pkt->length - 4 >> 8);
  pkt->data[3] = (char)pkt->length + -4;
  var_10(pkt->data,pkt->length);
  if (pkt->data != (char *)0x0) {
    var_11(pkt->data);
  }
  var_11(pkt);
  if (var_12 == *(int *)(var_1 + 0x14)) {
    return psVar3;
  }
                    /* WARNING: Subroutine does not return */
  var_13();
}


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

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

uint * MASKED(void)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = (uint *)FUN_0002f5d0();
  piVar4 = (int *)FUN_0002f910();
  uVar2 = *puVar3;
  iVar6 = piVar4[1];
  piVar4[1] = iVar6 + 4;
  if (piVar4[2] < iVar6 + 4) {
    piVar4[2] = iVar6 + 0x104;
    iVar5 = FUN_0001dc50(*piVar4,iVar6 + 0x104,1);
    *piVar4 = iVar5;
    iVar6 = piVar4[1] + -4;
  }
  else {
    iVar5 = *piVar4;
  }
  *(uint *)(iVar5 + iVar6) =
       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |
       uVar2 << 0x18;
  FUN_0002f7e0();
  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);
  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);
  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);
  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;
  FUN_00029280(*piVar4,piVar4[1]);
  if (*piVar4 != 0) {
    FUN_0001dd30(*piVar4);
  }
  FUN_0001dd30(piVar4);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}

