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

long bb_strtol(char *arg,char **endp,int base)

{
  char *endptr;
  
}



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

long __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)

{
  byte bVar1;
  int *piVar2;
  long lVar3;
  char **__endptr;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  
  piVar2 = DAT_000d16fc;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __endptr = &local_24;
  if (param_2 != (char **)0x0) {
    __endptr = param_2;
  }
  *__endptr = (char *)param_1;
  bVar1 = *param_1;
  if (bVar1 == 0x2d) {
    bVar1 = param_1[1];
    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;
LAB_0001ba21:
    *DAT_000d16fc = 0;
    lVar3 = strtol((char *)param_1,__endptr,param_3);
    bVar1 = **__endptr;
    if (bVar1 == 0) goto LAB_0001ba51;
    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {
      *piVar2 = 0x16;
      goto LAB_0001ba51;
    }
  }
  else {
    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;
LAB_0001ba79:
    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;
  }
  *piVar2 = 0x22;
  lVar3 = -1;
LAB_0001ba51:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00017e10();
  }
  return lVar3;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x2c
CALL 0x00017640
ADD EBX,0xb5039
MOV dword ptr [ESP + 0xc],ECX
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x1c],ECX
XOR ECX,ECX
LEA EDI,[ESP + 0x18]
TEST EDX,EDX
JZ 0x0001ba08
MOV EDI,EDX
MOV dword ptr [EDI],EAX
MOV DL,byte ptr [EAX]
CMP DL,0x2d
JZ 0x0001ba66
MOV ESI,dword ptr [EBX + 0xcdc]
LEA EBP,[EDX + -0x30]
MOV ECX,EBP
CMP CL,0x9
JA 0x0001ba79
MOV dword ptr [ESI],0x0
PUSH ECX
PUSH dword ptr [ESP + 0x10]
PUSH EDI
PUSH EAX
CALL 0x00017480
MOV EDX,dword ptr [EDI]
MOV DL,byte ptr [EDX]
ADD ESP,0x10
TEST DL,DL
JZ 0x0001ba51
LEA ECX,[EDX + -0x30]
CMP CL,0x9
JA 0x0001ba8b
MOV dword ptr [ESI],0x22
MOV EAX,0xffffffff
MOV EBX,dword ptr [ESP + 0x1c]
XOR EBX,dword ptr GS:[0x14]
JNZ 0x0001ba86
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV DL,byte ptr [EAX + 0x1]
MOV ESI,dword ptr [EBX + 0xcdc]
LEA EBP,[EDX + -0x30]
MOV ECX,EBP
CMP CL,0x9
JBE 0x0001ba21
OR EDX,0x20
SUB EDX,0x61
CMP DL,0x19
JBE 0x0001ba21
JMP 0x0001ba46
CALL 0x00017e10
OR EDX,0x20
SUB EDX,0x61
CMP DL,0x19
JBE 0x0001ba46
MOV EDX,dword ptr [ESI]
TEST EDX,EDX
JNZ 0x0001ba46
MOV dword ptr [ESI],0x16
JMP 0x0001ba51
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nlong __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return lVar3;\n}\n\n" comment (function_definition "long __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return lVar3;\n}" (sized_type_specifier "long __regparm3" long type_identifier) (function_declarator "FUN_0001b9db(byte *param_1,char **param_2,int param_3)" identifier (parameter_list "(byte *param_1,char **param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char **param_2" primitive_type (pointer_declarator "**param_2" * (pointer_declarator "*param_2" * identifier))) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }\n  return lVar3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "char **__endptr;" primitive_type (pointer_declarator "**__endptr" * (pointer_declarator "*__endptr" * 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 ;) (expression_statement "piVar2 = DAT_000d16fc;" (assignment_expression "piVar2 = DAT_000d16fc" identifier = identifier) ;) (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 "__endptr = &local_24;" (assignment_expression "__endptr = &local_24" identifier = (pointer_expression "&local_24" & identifier)) ;) (if_statement "if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }" if (parenthesized_expression "(param_2 != (char **)0x0)" ( (binary_expression "param_2 != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    __endptr = param_2;\n  }" { (expression_statement "__endptr = param_2;" (assignment_expression "__endptr = param_2" identifier = identifier) ;) })) (expression_statement "*__endptr = (char *)param_1;" (assignment_expression "*__endptr = (char *)param_1" (pointer_expression "*__endptr" * identifier) = (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" if (parenthesized_expression "(bVar1 == 0x2d)" ( (binary_expression "bVar1 == 0x2d" identifier == number_literal) )) (compound_statement "{\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }" { (expression_statement "bVar1 = param_1[1];" (assignment_expression "bVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;" if (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" ( (binary_expression "9 < (byte)(bVar1 - 0x30)" number_literal < (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) )))) )) (goto_statement "goto LAB_0001ba79;" goto statement_identifier ;)) (labeled_statement "LAB_0001ba21:\n    *DAT_000d16fc = 0;" statement_identifier : (expression_statement "*DAT_000d16fc = 0;" (assignment_expression "*DAT_000d16fc = 0" (pointer_expression "*DAT_000d16fc" * identifier) = number_literal) ;)) (expression_statement "lVar3 = strtol((char *)param_1,__endptr,param_3);" (assignment_expression "lVar3 = strtol((char *)param_1,__endptr,param_3)" identifier = (call_expression "strtol((char *)param_1,__endptr,param_3)" identifier (argument_list "((char *)param_1,__endptr,param_3)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier )))) ;) (expression_statement "bVar1 = **__endptr;" (assignment_expression "bVar1 = **__endptr" identifier = (pointer_expression "**__endptr" * (pointer_expression "*__endptr" * identifier))) ;) (if_statement "if (bVar1 == 0) goto LAB_0001ba51;" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001ba51;" goto statement_identifier ;)) (if_statement "if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" if (parenthesized_expression "(((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0))" ( (binary_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)" (parenthesized_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f)))" ( (binary_expression "(9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))" (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" ( (binary_expression "9 < (byte)(bVar1 - 0x30)" number_literal < (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) )))) )) && (parenthesized_expression "(0x19 < (byte)((bVar1 | 0x20) + 0x9f))" ( (binary_expression "0x19 < (byte)((bVar1 | 0x20) + 0x9f)" number_literal < (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 | 0x20) + 0x9f)" ( (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" ( (binary_expression "bVar1 | 0x20" identifier | number_literal) )) + number_literal) )))) ))) )) && (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) ))) )) (compound_statement "{\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" { (expression_statement "*piVar2 = 0x16;" (assignment_expression "*piVar2 = 0x16" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (goto_statement "goto LAB_0001ba51;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" else (compound_statement "{\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" { (if_statement "if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;" if (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" ( (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) ))) < number_literal) )) (goto_statement "goto LAB_0001ba21;" goto statement_identifier ;)) (labeled_statement "LAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" statement_identifier : (if_statement "if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" if (parenthesized_expression "((byte)((bVar1 | 0x20) + 0x9f) < 0x1a)" ( (binary_expression "(byte)((bVar1 | 0x20) + 0x9f) < 0x1a" (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 | 0x20) + 0x9f)" ( (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" ( (binary_expression "bVar1 | 0x20" identifier | number_literal) )) + number_literal) ))) < number_literal) )) (goto_statement "goto LAB_0001ba21;" goto statement_identifier ;))) }))) (expression_statement "*piVar2 = 0x22;" (assignment_expression "*piVar2 = 0x22" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "lVar3 = -1;" (assignment_expression "lVar3 = -1" identifier = number_literal) ;) (labeled_statement "LAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00017e10();\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_00017e10();\n  }" { comment (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nlong bb_strtol(char *arg,char **endp,int base)\n\n{\n  char *endptr;\n  \n}\n\n" comment (function_definition "long bb_strtol(char *arg,char **endp,int base)\n\n{\n  char *endptr;\n  \n}" (sized_type_specifier "long" long) (function_declarator "bb_strtol(char *arg,char **endp,int base)" identifier (parameter_list "(char *arg,char **endp,int base)" ( (parameter_declaration "char *arg" primitive_type (pointer_declarator "*arg" * identifier)) , (parameter_declaration "char **endp" primitive_type (pointer_declarator "**endp" * (pointer_declarator "*endp" * identifier))) , (parameter_declaration "int base" primitive_type identifier) ))) (compound_statement "{\n  char *endptr;\n  \n}" { (declaration "char *endptr;" primitive_type (pointer_declarator "*endptr" * identifier) ;) })))
(translation_unit "long __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return lVar3;\n}\n\n" (function_definition "long __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return lVar3;\n}" (sized_type_specifier "long __regparm3" long type_identifier) (function_declarator "FUN_0001b9db(byte *param_1,char **param_2,int param_3)" identifier (parameter_list "(byte *param_1,char **param_2,int param_3)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char **param_2" primitive_type (pointer_declarator "**param_2" * (pointer_declarator "*param_2" * identifier))) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return lVar3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "char **__endptr;" primitive_type (pointer_declarator "**__endptr" * (pointer_declarator "*__endptr" * 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 ;) (expression_statement "piVar2 = DAT_000d16fc;" (assignment_expression "piVar2 = DAT_000d16fc" identifier = identifier) ;) (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 "__endptr = &local_24;" (assignment_expression "__endptr = &local_24" identifier = (pointer_expression "&local_24" & identifier)) ;) (if_statement "if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }" if (parenthesized_expression "(param_2 != (char **)0x0)" ( (binary_expression "param_2 != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    __endptr = param_2;\n  }" { (expression_statement "__endptr = param_2;" (assignment_expression "__endptr = param_2" identifier = identifier) ;) })) (expression_statement "*__endptr = (char *)param_1;" (assignment_expression "*__endptr = (char *)param_1" (pointer_expression "*__endptr" * identifier) = (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" if (parenthesized_expression "(bVar1 == 0x2d)" ( (binary_expression "bVar1 == 0x2d" identifier == number_literal) )) (compound_statement "{\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }" { (expression_statement "bVar1 = param_1[1];" (assignment_expression "bVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;" if (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" ( (binary_expression "9 < (byte)(bVar1 - 0x30)" number_literal < (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) )))) )) (goto_statement "goto LAB_0001ba79;" goto statement_identifier ;)) (labeled_statement "LAB_0001ba21:\n    *DAT_000d16fc = 0;" statement_identifier : (expression_statement "*DAT_000d16fc = 0;" (assignment_expression "*DAT_000d16fc = 0" (pointer_expression "*DAT_000d16fc" * identifier) = number_literal) ;)) (expression_statement "lVar3 = strtol((char *)param_1,__endptr,param_3);" (assignment_expression "lVar3 = strtol((char *)param_1,__endptr,param_3)" identifier = (call_expression "strtol((char *)param_1,__endptr,param_3)" identifier (argument_list "((char *)param_1,__endptr,param_3)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier )))) ;) (expression_statement "bVar1 = **__endptr;" (assignment_expression "bVar1 = **__endptr" identifier = (pointer_expression "**__endptr" * (pointer_expression "*__endptr" * identifier))) ;) (if_statement "if (bVar1 == 0) goto LAB_0001ba51;" if (parenthesized_expression "(bVar1 == 0)" ( (binary_expression "bVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0001ba51;" goto statement_identifier ;)) (if_statement "if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" if (parenthesized_expression "(((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0))" ( (binary_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)" (parenthesized_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f)))" ( (binary_expression "(9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))" (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" ( (binary_expression "9 < (byte)(bVar1 - 0x30)" number_literal < (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) )))) )) && (parenthesized_expression "(0x19 < (byte)((bVar1 | 0x20) + 0x9f))" ( (binary_expression "0x19 < (byte)((bVar1 | 0x20) + 0x9f)" number_literal < (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 | 0x20) + 0x9f)" ( (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" ( (binary_expression "bVar1 | 0x20" identifier | number_literal) )) + number_literal) )))) ))) )) && (parenthesized_expression "(*piVar2 == 0)" ( (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" * identifier) == number_literal) ))) )) (compound_statement "{\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" { (expression_statement "*piVar2 = 0x16;" (assignment_expression "*piVar2 = 0x16" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (goto_statement "goto LAB_0001ba51;" goto statement_identifier ;) })) }) (else_clause "else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" else (compound_statement "{\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" { (if_statement "if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;" if (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" ( (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(bVar1 - 0x30)" ( (binary_expression "bVar1 - 0x30" identifier - number_literal) ))) < number_literal) )) (goto_statement "goto LAB_0001ba21;" goto statement_identifier ;)) (labeled_statement "LAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" statement_identifier : (if_statement "if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" if (parenthesized_expression "((byte)((bVar1 | 0x20) + 0x9f) < 0x1a)" ( (binary_expression "(byte)((bVar1 | 0x20) + 0x9f) < 0x1a" (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "((bVar1 | 0x20) + 0x9f)" ( (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" ( (binary_expression "bVar1 | 0x20" identifier | number_literal) )) + number_literal) ))) < number_literal) )) (goto_statement "goto LAB_0001ba21;" goto statement_identifier ;))) }))) (expression_statement "*piVar2 = 0x22;" (assignment_expression "*piVar2 = 0x22" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "lVar3 = -1;" (assignment_expression "lVar3 = -1" identifier = number_literal) ;) (labeled_statement "LAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\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_00017e10();\n  }" { (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long TYPE) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * (pointer_declarator * IDENT))) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = 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 = (pointer_expression & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) )))) )) && (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT | LIT) )) + LIT) )))) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) < LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT | LIT) )) + LIT) ))) < LIT) )) (goto_statement goto statement_identifier ;))) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (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 "long __regparm3 FUN_0001b9db(byte *param_1,char **param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return lVar3;\n}" (sized_type_specifier "long __regparm3" (long "long") (type_identifier "__regparm3")) (function_declarator "FUN_0001b9db(byte *param_1,char **param_2,int param_3)" (identifier "FUN_0001b9db") (parameter_list "(byte *param_1,char **param_2,int param_3)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char **param_2" (primitive_type "char") (pointer_declarator "**param_2" (* "*") (pointer_declarator "*param_2" (* "*") (identifier "param_2")))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  long lVar3;\n  char **__endptr;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  \n  piVar2 = DAT_000d16fc;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __endptr = &local_24;\n  if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }\n  *__endptr = (char *)param_1;\n  bVar1 = *param_1;\n  if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }\n  *piVar2 = 0x22;\n  lVar3 = -1;\nLAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }\n  return lVar3;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "char **__endptr;" (primitive_type "char") (pointer_declarator "**__endptr" (* "*") (pointer_declarator "*__endptr" (* "*") (identifier "__endptr"))) (; ";")) (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") (; ";")) (expression_statement "piVar2 = DAT_000d16fc;" (assignment_expression "piVar2 = DAT_000d16fc" (identifier "piVar2") (= "=") (identifier "DAT_000d16fc")) (; ";")) (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 "__endptr = &local_24;" (assignment_expression "__endptr = &local_24" (identifier "__endptr") (= "=") (pointer_expression "&local_24" (& "&") (identifier "local_24"))) (; ";")) (if_statement "if (param_2 != (char **)0x0) {\n    __endptr = param_2;\n  }" (if "if") (parenthesized_expression "(param_2 != (char **)0x0)" (( "(") (binary_expression "param_2 != (char **)0x0" (identifier "param_2") (!= "!=") (cast_expression "(char **)0x0" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    __endptr = param_2;\n  }" ({ "{") (expression_statement "__endptr = param_2;" (assignment_expression "__endptr = param_2" (identifier "__endptr") (= "=") (identifier "param_2")) (; ";")) (} "}"))) (expression_statement "*__endptr = (char *)param_1;" (assignment_expression "*__endptr = (char *)param_1" (pointer_expression "*__endptr" (* "*") (identifier "__endptr")) (= "=") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (; ";")) (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (bVar1 == 0x2d) {\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }\n  else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" (if "if") (parenthesized_expression "(bVar1 == 0x2d)" (( "(") (binary_expression "bVar1 == 0x2d" (identifier "bVar1") (== "==") (number_literal "0x2d")) () ")")) (compound_statement "{\n    bVar1 = param_1[1];\n    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;\nLAB_0001ba21:\n    *DAT_000d16fc = 0;\n    lVar3 = strtol((char *)param_1,__endptr,param_3);\n    bVar1 = **__endptr;\n    if (bVar1 == 0) goto LAB_0001ba51;\n    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }\n  }" ({ "{") (expression_statement "bVar1 = param_1[1];" (assignment_expression "bVar1 = param_1[1]" (identifier "bVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;" (if "if") (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" (( "(") (binary_expression "9 < (byte)(bVar1 - 0x30)" (number_literal "9") (< "<") (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar1 - 0x30)" (( "(") (binary_expression "bVar1 - 0x30" (identifier "bVar1") (- "-") (number_literal "0x30")) () ")")))) () ")")) (goto_statement "goto LAB_0001ba79;" (goto "goto") (statement_identifier "LAB_0001ba79") (; ";"))) (labeled_statement "LAB_0001ba21:\n    *DAT_000d16fc = 0;" (statement_identifier "LAB_0001ba21") (: ":") (expression_statement "*DAT_000d16fc = 0;" (assignment_expression "*DAT_000d16fc = 0" (pointer_expression "*DAT_000d16fc" (* "*") (identifier "DAT_000d16fc")) (= "=") (number_literal "0")) (; ";"))) (expression_statement "lVar3 = strtol((char *)param_1,__endptr,param_3);" (assignment_expression "lVar3 = strtol((char *)param_1,__endptr,param_3)" (identifier "lVar3") (= "=") (call_expression "strtol((char *)param_1,__endptr,param_3)" (identifier "strtol") (argument_list "((char *)param_1,__endptr,param_3)" (( "(") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")) (, ",") (identifier "__endptr") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "bVar1 = **__endptr;" (assignment_expression "bVar1 = **__endptr" (identifier "bVar1") (= "=") (pointer_expression "**__endptr" (* "*") (pointer_expression "*__endptr" (* "*") (identifier "__endptr")))) (; ";")) (if_statement "if (bVar1 == 0) goto LAB_0001ba51;" (if "if") (parenthesized_expression "(bVar1 == 0)" (( "(") (binary_expression "bVar1 == 0" (identifier "bVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0001ba51;" (goto "goto") (statement_identifier "LAB_0001ba51") (; ";"))) (if_statement "if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" (if "if") (parenthesized_expression "(((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0))" (( "(") (binary_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)" (parenthesized_expression "((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f)))" (( "(") (binary_expression "(9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))" (parenthesized_expression "(9 < (byte)(bVar1 - 0x30))" (( "(") (binary_expression "9 < (byte)(bVar1 - 0x30)" (number_literal "9") (< "<") (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar1 - 0x30)" (( "(") (binary_expression "bVar1 - 0x30" (identifier "bVar1") (- "-") (number_literal "0x30")) () ")")))) () ")")) (&& "&&") (parenthesized_expression "(0x19 < (byte)((bVar1 | 0x20) + 0x9f))" (( "(") (binary_expression "0x19 < (byte)((bVar1 | 0x20) + 0x9f)" (number_literal "0x19") (< "<") (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "((bVar1 | 0x20) + 0x9f)" (( "(") (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" (( "(") (binary_expression "bVar1 | 0x20" (identifier "bVar1") (| "|") (number_literal "0x20")) () ")")) (+ "+") (number_literal "0x9f")) () ")")))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*piVar2 == 0)" (( "(") (binary_expression "*piVar2 == 0" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      *piVar2 = 0x16;\n      goto LAB_0001ba51;\n    }" ({ "{") (expression_statement "*piVar2 = 0x16;" (assignment_expression "*piVar2 = 0x16" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0x16")) (; ";")) (goto_statement "goto LAB_0001ba51;" (goto "goto") (statement_identifier "LAB_0001ba51") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" (else "else") (compound_statement "{\n    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;\nLAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;\n  }" ({ "{") (if_statement "if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;" (if "if") (parenthesized_expression "((byte)(bVar1 - 0x30) < 10)" (( "(") (binary_expression "(byte)(bVar1 - 0x30) < 10" (call_expression "(byte)(bVar1 - 0x30)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(bVar1 - 0x30)" (( "(") (binary_expression "bVar1 - 0x30" (identifier "bVar1") (- "-") (number_literal "0x30")) () ")"))) (< "<") (number_literal "10")) () ")")) (goto_statement "goto LAB_0001ba21;" (goto "goto") (statement_identifier "LAB_0001ba21") (; ";"))) (labeled_statement "LAB_0001ba79:\n    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" (statement_identifier "LAB_0001ba79") (: ":") (if_statement "if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;" (if "if") (parenthesized_expression "((byte)((bVar1 | 0x20) + 0x9f) < 0x1a)" (( "(") (binary_expression "(byte)((bVar1 | 0x20) + 0x9f) < 0x1a" (call_expression "(byte)((bVar1 | 0x20) + 0x9f)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "((bVar1 | 0x20) + 0x9f)" (( "(") (binary_expression "(bVar1 | 0x20) + 0x9f" (parenthesized_expression "(bVar1 | 0x20)" (( "(") (binary_expression "bVar1 | 0x20" (identifier "bVar1") (| "|") (number_literal "0x20")) () ")")) (+ "+") (number_literal "0x9f")) () ")"))) (< "<") (number_literal "0x1a")) () ")")) (goto_statement "goto LAB_0001ba21;" (goto "goto") (statement_identifier "LAB_0001ba21") (; ";")))) (} "}")))) (expression_statement "*piVar2 = 0x22;" (assignment_expression "*piVar2 = 0x22" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "0x22")) (; ";")) (expression_statement "lVar3 = -1;" (assignment_expression "lVar3 = -1" (identifier "lVar3") (= "=") (number_literal "-1")) (; ";")) (labeled_statement "LAB_0001ba51:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\n  }" (statement_identifier "LAB_0001ba51") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00017e10();\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_00017e10();\n  }" ({ "{") (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" (identifier "FUN_00017e10") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return lVar3;" (return "return") (identifier "lVar3") (; ";")) (} "}")))

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

long function_1(char *arg,char **endp,int base)

{
  char *endptr;
  
}


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

long __regparm3 MASKED(byte *param_1,char **param_2,int param_3)

{
  byte bVar1;
  int *piVar2;
  long lVar3;
  char **__endptr;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  
  piVar2 = DAT_000d16fc;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __endptr = &local_24;
  if (param_2 != (char **)0x0) {
    __endptr = param_2;
  }
  *__endptr = (char *)param_1;
  bVar1 = *param_1;
  if (bVar1 == 0x2d) {
    bVar1 = param_1[1];
    if (9 < (byte)(bVar1 - 0x30)) goto LAB_0001ba79;
LAB_0001ba21:
    *DAT_000d16fc = 0;
    lVar3 = strtol((char *)param_1,__endptr,param_3);
    bVar1 = **__endptr;
    if (bVar1 == 0) goto LAB_0001ba51;
    if (((9 < (byte)(bVar1 - 0x30)) && (0x19 < (byte)((bVar1 | 0x20) + 0x9f))) && (*piVar2 == 0)) {
      *piVar2 = 0x16;
      goto LAB_0001ba51;
    }
  }
  else {
    if ((byte)(bVar1 - 0x30) < 10) goto LAB_0001ba21;
LAB_0001ba79:
    if ((byte)((bVar1 | 0x20) + 0x9f) < 0x1a) goto LAB_0001ba21;
  }
  *piVar2 = 0x22;
  lVar3 = -1;
LAB_0001ba51:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00017e10();
  }
  return lVar3;
}

