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

int opt_ulong(char *value,ulong *result)

{
  int iVar1;
  int *piVar2;
  ulong uVar3;
  int iVar4;
  int in_GS_OFFSET;
  char *endptr;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x786c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  *piVar2 = 0;
  uVar3 = strtoul(value,&endptr,0);
  if ((*endptr == '\0') && (endptr != value)) {
    if (uVar3 == 0xffffffff) {
      if (*piVar2 == 0x22) goto LAB_00078760;
    }
    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;
    *result = uVar3;
    iVar4 = 1;
    *piVar2 = iVar1;
  }
  else {
LAB_00078760:
    opt_number_error(value);
    *piVar2 = iVar1;
    iVar4 = 0;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return iVar4;
}



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

undefined4 FUN_000786c0(char *param_1,ulong *param_2)

{
  int iVar1;
  int *piVar2;
  ulong uVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x786c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  *piVar2 = 0;
  uVar3 = strtoul(param_1,&local_24,0);
  if ((*local_24 == '\0') && (local_24 != param_1)) {
    if (uVar3 == 0xffffffff) {
      if (*piVar2 == 0x22) goto LAB_00078760;
    }
    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;
    *param_2 = uVar3;
    uVar4 = 1;
    *piVar2 = iVar1;
  }
  else {
LAB_00078760:
    FUN_00077bc0();
    *piVar2 = iVar1;
    uVar4 = 0;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007d010();
  }
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0002c7d0
ADD EBX,0x443af
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x44]
MOV ESI,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
CALL 0x000270c0
SUB ESP,0x4
MOV EDI,dword ptr [EAX]
MOV dword ptr [EAX],0x0
MOV EBP,EAX
PUSH 0x0
LEA EAX,[ESP + 0x20]
PUSH EAX
PUSH ESI
CALL 0x000296a0
MOV ECX,dword ptr [ESP + 0x28]
ADD ESP,0x10
CMP byte ptr [ECX],0x0
JNZ 0x00078760
CMP ECX,ESI
JZ 0x00078760
CMP EAX,-0x1
JZ 0x00078750
TEST EAX,EAX
JNZ 0x00078729
MOV EDX,dword ptr [EBP]
TEST EDX,EDX
JNZ 0x00078760
MOV EDX,dword ptr [ESP + 0xc]
MOV dword ptr [EDX],EAX
MOV EAX,0x1
MOV dword ptr [EBP],EDI
MOV EDX,dword ptr [ESP + 0x1c]
XOR EDX,dword ptr GS:[0x14]
JNZ 0x0007876e
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP dword ptr [EBP],0x22
JNZ 0x00078729
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV EAX,ESI
CALL 0x00077bc0
MOV dword ptr [EBP],EDI
XOR EAX,EAX
JMP 0x00078737
CALL 0x0007d010
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000786c0(char *param_1,ulong *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007d010();\n  }\n  return uVar4;\n}\n\n" comment (function_definition "undefined4 FUN_000786c0(char *param_1,ulong *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007d010();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_000786c0(char *param_1,ulong *param_2)" identifier (parameter_list "(char *param_1,ulong *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007d010();\n  }\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x786c9;" (assignment_expression "uStack_14 = 0x786c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar3 = strtoul(param_1,&local_24,0);" (assignment_expression "uVar3 = strtoul(param_1,&local_24,0)" identifier = (call_expression "strtoul(param_1,&local_24,0)" identifier (argument_list "(param_1,&local_24,0)" ( identifier , (pointer_expression "&local_24" & identifier) , number_literal )))) ;) (if_statement "if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" if (parenthesized_expression "((*local_24 == '\0') && (local_24 != param_1))" ( (binary_expression "(*local_24 == '\0') && (local_24 != param_1)" (parenthesized_expression "(*local_24 == '\0')" ( (binary_expression "*local_24 == '\0'" (pointer_expression "*local_24" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(local_24 != param_1)" ( (binary_expression "local_24 != param_1" identifier != identifier) ))) )) (compound_statement "{\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }" { (if_statement "if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "(uVar3 == 0xffffffff)" ( (binary_expression "uVar3 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }" { (if_statement "if (*piVar2 == 0x22) goto LAB_00078760;" if (parenthesized_expression "(*piVar2 == 0x22)" ( (binary_expression "*piVar2 == 0x22" (pointer_expression "*piVar2" * identifier) == number_literal) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)) }) (else_clause "else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" else (if_statement "if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "((uVar3 == 0) && (*piVar2 != 0))" ( (binary_expression "(uVar3 == 0) && (*piVar2 != 0)" (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) ))) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)))) (expression_statement "*param_2 = uVar3;" (assignment_expression "*param_2 = uVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) (else_clause "else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" else (compound_statement "{\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" { (labeled_statement "LAB_00078760:\n    FUN_00077bc0();" statement_identifier : (expression_statement "FUN_00077bc0();" (call_expression "FUN_00077bc0()" identifier (argument_list "()" ( ))) ;)) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007d010();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0007d010();\n  }" { comment (expression_statement "FUN_0007d010();" (call_expression "FUN_0007d010()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint opt_ulong(char *value,ulong *result)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *endptr;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(value,&endptr,0);\n  if ((*endptr == '\0') && (endptr != value)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *result = uVar3;\n    iVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}\n\n" comment comment (function_definition "int opt_ulong(char *value,ulong *result)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *endptr;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(value,&endptr,0);\n  if ((*endptr == '\0') && (endptr != value)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *result = uVar3;\n    iVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" primitive_type (function_declarator "opt_ulong(char *value,ulong *result)" identifier (parameter_list "(char *value,ulong *result)" ( (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) , (parameter_declaration "ulong *result" type_identifier (pointer_declarator "*result" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  int iVar4;\n  int in_GS_OFFSET;\n  char *endptr;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(value,&endptr,0);\n  if ((*endptr == '\0') && (endptr != value)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *result = uVar3;\n    iVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *endptr;" primitive_type (pointer_declarator "*endptr" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x786c9;" (assignment_expression "uStack_14 = 0x786c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar3 = strtoul(value,&endptr,0);" (assignment_expression "uVar3 = strtoul(value,&endptr,0)" identifier = (call_expression "strtoul(value,&endptr,0)" identifier (argument_list "(value,&endptr,0)" ( identifier , (pointer_expression "&endptr" & identifier) , number_literal )))) ;) (if_statement "if ((*endptr == '\0') && (endptr != value)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *result = uVar3;\n    iVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }" if (parenthesized_expression "((*endptr == '\0') && (endptr != value))" ( (binary_expression "(*endptr == '\0') && (endptr != value)" (parenthesized_expression "(*endptr == '\0')" ( (binary_expression "*endptr == '\0'" (pointer_expression "*endptr" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(endptr != value)" ( (binary_expression "endptr != value" identifier != identifier) ))) )) (compound_statement "{\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *result = uVar3;\n    iVar4 = 1;\n    *piVar2 = iVar1;\n  }" { (if_statement "if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "(uVar3 == 0xffffffff)" ( (binary_expression "uVar3 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }" { (if_statement "if (*piVar2 == 0x22) goto LAB_00078760;" if (parenthesized_expression "(*piVar2 == 0x22)" ( (binary_expression "*piVar2 == 0x22" (pointer_expression "*piVar2" * identifier) == number_literal) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)) }) (else_clause "else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" else (if_statement "if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "((uVar3 == 0) && (*piVar2 != 0))" ( (binary_expression "(uVar3 == 0) && (*piVar2 != 0)" (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) ))) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)))) (expression_statement "*result = uVar3;" (assignment_expression "*result = uVar3" (pointer_expression "*result" * identifier) = identifier) ;) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) (else_clause "else {\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }" else (compound_statement "{\nLAB_00078760:\n    opt_number_error(value);\n    *piVar2 = iVar1;\n    iVar4 = 0;\n  }" { (labeled_statement "LAB_00078760:\n    opt_number_error(value);" statement_identifier : (expression_statement "opt_number_error(value);" (call_expression "opt_number_error(value)" identifier (argument_list "(value)" ( identifier ))) ;)) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "undefined4 FUN_000786c0(char *param_1,ulong *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }\n  return uVar4;\n}\n\n" (function_definition "undefined4 FUN_000786c0(char *param_1,ulong *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_000786c0(char *param_1,ulong *param_2)" identifier (parameter_list "(char *param_1,ulong *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ulong uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x786c9;" (assignment_expression "uStack_14 = 0x786c9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "uVar3 = strtoul(param_1,&local_24,0);" (assignment_expression "uVar3 = strtoul(param_1,&local_24,0)" identifier = (call_expression "strtoul(param_1,&local_24,0)" identifier (argument_list "(param_1,&local_24,0)" ( identifier , (pointer_expression "&local_24" & identifier) , number_literal )))) ;) (if_statement "if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" if (parenthesized_expression "((*local_24 == '\0') && (local_24 != param_1))" ( (binary_expression "(*local_24 == '\0') && (local_24 != param_1)" (parenthesized_expression "(*local_24 == '\0')" ( (binary_expression "*local_24 == '\0'" (pointer_expression "*local_24" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(local_24 != param_1)" ( (binary_expression "local_24 != param_1" identifier != identifier) ))) )) (compound_statement "{\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }" { (if_statement "if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "(uVar3 == 0xffffffff)" ( (binary_expression "uVar3 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }" { (if_statement "if (*piVar2 == 0x22) goto LAB_00078760;" if (parenthesized_expression "(*piVar2 == 0x22)" ( (binary_expression "*piVar2 == 0x22" (pointer_expression "*piVar2" * identifier) == number_literal) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)) }) (else_clause "else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" else (if_statement "if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" if (parenthesized_expression "((uVar3 == 0) && (*piVar2 != 0))" ( (binary_expression "(uVar3 == 0) && (*piVar2 != 0)" (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(*piVar2 != 0)" ( (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" * identifier) != number_literal) ))) )) (goto_statement "goto LAB_00078760;" goto statement_identifier ;)))) (expression_statement "*param_2 = uVar3;" (assignment_expression "*param_2 = uVar3" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) (else_clause "else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" else (compound_statement "{\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" { (labeled_statement "LAB_00078760:\n    FUN_00077bc0();" statement_identifier : (expression_statement "FUN_00077bc0();" (call_expression "FUN_00077bc0()" identifier (argument_list "()" ( ))) ;)) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0007d010();\n  }" { (expression_statement "FUN_0007d010();" (call_expression "FUN_0007d010()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) ))) )) (goto_statement goto statement_identifier ;)))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( ))) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000786c0(char *param_1,ulong *param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_000786c0(char *param_1,ulong *param_2)" (identifier "FUN_000786c0") (parameter_list "(char *param_1,ulong *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong *param_2" (type_identifier "ulong") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  ulong uVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x786c9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  *piVar2 = 0;\n  uVar3 = strtoul(param_1,&local_24,0);\n  if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }\n  return uVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_24;" (primitive_type "char") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x786c9;" (assignment_expression "uStack_14 = 0x786c9" (identifier "uStack_14") (= "=") (number_literal "0x786c9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "*piVar2 = 0;" (assignment_expression "*piVar2 = 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = strtoul(param_1,&local_24,0);" (assignment_expression "uVar3 = strtoul(param_1,&local_24,0)" (identifier "uVar3") (= "=") (call_expression "strtoul(param_1,&local_24,0)" (identifier "strtoul") (argument_list "(param_1,&local_24,0)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if ((*local_24 == '\0') && (local_24 != param_1)) {\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }\n  else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" (if "if") (parenthesized_expression "((*local_24 == '\0') && (local_24 != param_1))" (( "(") (binary_expression "(*local_24 == '\0') && (local_24 != param_1)" (parenthesized_expression "(*local_24 == '\0')" (( "(") (binary_expression "*local_24 == '\0'" (pointer_expression "*local_24" (* "*") (identifier "local_24")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(local_24 != param_1)" (( "(") (binary_expression "local_24 != param_1" (identifier "local_24") (!= "!=") (identifier "param_1")) () ")"))) () ")")) (compound_statement "{\n    if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;\n    *param_2 = uVar3;\n    uVar4 = 1;\n    *piVar2 = iVar1;\n  }" ({ "{") (if_statement "if (uVar3 == 0xffffffff) {\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }\n    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" (if "if") (parenthesized_expression "(uVar3 == 0xffffffff)" (( "(") (binary_expression "uVar3 == 0xffffffff" (identifier "uVar3") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n      if (*piVar2 == 0x22) goto LAB_00078760;\n    }" ({ "{") (if_statement "if (*piVar2 == 0x22) goto LAB_00078760;" (if "if") (parenthesized_expression "(*piVar2 == 0x22)" (( "(") (binary_expression "*piVar2 == 0x22" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0x22")) () ")")) (goto_statement "goto LAB_00078760;" (goto "goto") (statement_identifier "LAB_00078760") (; ";"))) (} "}")) (else_clause "else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" (else "else") (if_statement "if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;" (if "if") (parenthesized_expression "((uVar3 == 0) && (*piVar2 != 0))" (( "(") (binary_expression "(uVar3 == 0) && (*piVar2 != 0)" (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*piVar2 != 0)" (( "(") (binary_expression "*piVar2 != 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (goto_statement "goto LAB_00078760;" (goto "goto") (statement_identifier "LAB_00078760") (; ";"))))) (expression_statement "*param_2 = uVar3;" (assignment_expression "*param_2 = uVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar1")) (; ";")) (} "}")) (else_clause "else {\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" (else "else") (compound_statement "{\nLAB_00078760:\n    FUN_00077bc0();\n    *piVar2 = iVar1;\n    uVar4 = 0;\n  }" ({ "{") (labeled_statement "LAB_00078760:\n    FUN_00077bc0();" (statement_identifier "LAB_00078760") (: ":") (expression_statement "FUN_00077bc0();" (call_expression "FUN_00077bc0()" (identifier "FUN_00077bc0") (argument_list "()" (( "(") () ")"))) (; ";"))) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007d010();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0007d010();\n  }" ({ "{") (expression_statement "FUN_0007d010();" (call_expression "FUN_0007d010()" (identifier "FUN_0007d010") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

int function_1(char *var_5,type_1 *result)

{
  int iVar1;
  int *piVar2;
  type_1 var_6;
  int iVar4;
  int var_1;
  char *var_4;
  int var_8;
  type_2 uStack_14;
  
  uStack_14 = 0x786c9;
  var_8 = *(int *)(var_1 + 0x14);
  piVar2 = var_2();
  iVar1 = *piVar2;
  *piVar2 = 0;
  var_6 = var_3(var_5,&var_4,0);
  if ((*var_4 == '\0') && (var_4 != var_5)) {
    if (var_6 == 0xffffffff) {
      if (*piVar2 == 0x22) goto LAB_00078760;
    }
    else if ((var_6 == 0) && (*piVar2 != 0)) goto LAB_00078760;
    *result = var_6;
    iVar4 = 1;
    *piVar2 = iVar1;
  }
  else {
LAB_00078760:
    var_7(var_5);
    *piVar2 = iVar1;
    iVar4 = 0;
  }
  if (var_8 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_9();
  }
  return iVar4;
}


(translation_unit (function_definition type: (type_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: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

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

undefined4 MASKED(char *param_1,ulong *param_2)

{
  int iVar1;
  int *piVar2;
  ulong uVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x786c9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  *piVar2 = 0;
  uVar3 = strtoul(param_1,&local_24,0);
  if ((*local_24 == '\0') && (local_24 != param_1)) {
    if (uVar3 == 0xffffffff) {
      if (*piVar2 == 0x22) goto LAB_00078760;
    }
    else if ((uVar3 == 0) && (*piVar2 != 0)) goto LAB_00078760;
    *param_2 = uVar3;
    uVar4 = 1;
    *piVar2 = iVar1;
  }
  else {
LAB_00078760:
    FUN_00077bc0();
    *piVar2 = iVar1;
    uVar4 = 0;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007d010();
  }
  return uVar4;
}

