
/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3 sqlite3VdbeTransferError(Vdbe *p)

{
  sqlite3 *db;
  int iVar1;
  Mem *p_00;
  _func_void *p_Var2;
  sqlite3_value *pMem;
  u64 in_stack_ffffffe4;
  
  p_Var2 = sqlite3Hooks.xBenignBegin;
  db = p->db;
  iVar1 = p->rc;
  if (p->zErrMsg == (char *)0x0) {
    p_00 = db->pErr;
    if (p_00 != (Mem *)0x0) {
      if ((p_00->flags & 0x2400) == 0) {
        p_00->flags = 1;
        db->errCode = iVar1;
        return iVar1;
      }
      vdbeMemClearExternAndSetNull(p_00);
    }
    goto LAB_0004f031;
  }
  db->bBenignMalloc = db->bBenignMalloc + '\x01';
  if (p_Var2 != (_func_void *)0x0) {
    (*p_Var2)();
  }
  pMem = db->pErr;
  if (pMem == (sqlite3_value *)0x0) {
    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);
    if (pMem != (sqlite3_value *)0x0) {
      pMem->db = db;
      pMem->flags = 1;
      db->pErr = pMem;
      goto LAB_0004f00a;
    }
    db->pErr = (sqlite3_value *)0x0;
  }
  else {
LAB_0004f00a:
    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);
  }
  if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {
    (*sqlite3Hooks.xBenignEnd)();
  }
  db->bBenignMalloc = db->bBenignMalloc + 0xff;
LAB_0004f031:
  db->errCode = iVar1;
  return iVar1;
}



int FUN_0004efd0(void)

{
  int iVar1;
  int iVar2;
  code *pcVar3;
  int *piVar4;
  int iVar5;
  int unaff_EBP;
  
  piVar4 = (int *)FUN_000d0ab3();
  iVar1 = *piVar4;
  iVar2 = piVar4[10];
  if (piVar4[0x1e] == 0) {
    iVar5 = *(int *)(iVar1 + 0x104);
    if (iVar5 != 0) {
      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {
        *(undefined2 *)(iVar5 + 8) = 1;
        *(int *)(iVar1 + 0x3c) = iVar2;
        return iVar2;
      }
      FUN_0002a070();
    }
    goto LAB_0004f031;
  }
  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);
  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';
  if (pcVar3 != (code *)0x0) {
    (*pcVar3)();
  }
  if (*(int *)(iVar1 + 0x104) == 0) {
    iVar5 = FUN_0004e890();
    if (iVar5 != 0) {
      *(int *)(iVar5 + 0x20) = iVar1;
      *(undefined2 *)(iVar5 + 8) = 1;
      *(int *)(iVar1 + 0x104) = iVar5;
      goto LAB_0004f00a;
    }
    *(undefined4 *)(iVar1 + 0x104) = 0;
  }
  else {
LAB_0004f00a:
    FUN_00031620(1,0xffffffff);
  }
  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {
    (**(code **)(unaff_EBP + 0xb8a27))();
  }
  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;
LAB_0004f031:
  *(int *)(iVar1 + 0x3c) = iVar2;
  return iVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000d0ab3
ADD EBP,0xb7027
SUB ESP,0xc
MOV ESI,dword ptr [EAX + 0x78]
MOV EBX,dword ptr [EAX]
MOV EDI,dword ptr [EAX + 0x28]
TEST ESI,ESI
JZ 0x0004f040
MOV ESI,EAX
MOV EAX,dword ptr [EBP + 0x19fc]
ADD byte ptr [EBX + 0x4e],0x1
TEST EAX,EAX
JZ 0x0004f000
CALL EAX
MOV EAX,dword ptr [EBX + 0x104]
TEST EAX,EAX
JZ 0x0004f080
SUB ESP,0x8
MOV EDX,dword ptr [ESI + 0x78]
MOV ECX,0xffffffff
PUSH -0x1
PUSH 0x1
CALL 0x00031620
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0x1a00]
TEST EAX,EAX
JZ 0x0004f02d
CALL EAX
SUB byte ptr [EBX + 0x4e],0x1
MOV dword ptr [EBX + 0x3c],EDI
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBX + 0x104]
TEST EAX,EAX
JZ 0x0004f031
TEST word ptr [EAX + 0x8],0x2400
JNZ 0x0004f070
MOV EDX,0x1
MOV word ptr [EAX + 0x8],DX
MOV dword ptr [EBX + 0x3c],EDI
ADD ESP,0xc
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
CALL 0x0002a070
JMP 0x0004f031
XOR ECX,ECX
MOV EDX,0x28
MOV EAX,EBX
CALL 0x0004e890
TEST EAX,EAX
JZ 0x0004f0b0
MOV ECX,0x1
MOV dword ptr [EAX + 0x20],EBX
MOV word ptr [EAX + 0x8],CX
MOV dword ptr [EBX + 0x104],EAX
JMP 0x0004f00a
MOV dword ptr [EBX + 0x104],0x0
JMP 0x0004f021
(translation_unit "int FUN_0004efd0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}\n\n" (function_definition "int FUN_0004efd0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0004efd0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "piVar4 = (int *)FUN_000d0ab3();" (assignment_expression "piVar4 = (int *)FUN_000d0ab3()" identifier = (cast_expression "(int *)FUN_000d0ab3()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000d0ab3()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "iVar2 = piVar4[10];" (assignment_expression "iVar2 = piVar4[10]" identifier = (subscript_expression "piVar4[10]" identifier [ number_literal ])) ;) (if_statement "if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" if (parenthesized_expression "(piVar4[0x1e] == 0)" ( (binary_expression "piVar4[0x1e] == 0" (subscript_expression "piVar4[0x1e]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" { (expression_statement "iVar5 = *(int *)(iVar1 + 0x104);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x104)" identifier = (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) ))))) ;) (if_statement "if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" { (if_statement "if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" if (parenthesized_expression "((*(ushort *)(iVar5 + 8) & 0x2400) == 0)" ( (binary_expression "(*(ushort *)(iVar5 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(iVar5 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(iVar5 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar5 + 8)" * (cast_expression "(ushort *)(iVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" { (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" * (cast_expression "(undefined2 *)(iVar5 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" * (cast_expression "(int *)(iVar1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x3c)" ( (binary_expression "iVar1 + 0x3c" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "FUN_0002a070();" (call_expression "FUN_0002a070()" identifier (argument_list "()" ( ))) ;) })) (goto_statement "goto LAB_0004f031;" goto statement_identifier ;) })) (expression_statement "pcVar3 = *(code **)(unaff_EBP + 0xb8a23);" (assignment_expression "pcVar3 = *(code **)(unaff_EBP + 0xb8a23)" identifier = (pointer_expression "*(code **)(unaff_EBP + 0xb8a23)" * (cast_expression "(code **)(unaff_EBP + 0xb8a23)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a23)" ( (binary_expression "unaff_EBP + 0xb8a23" identifier + number_literal) ))))) ;) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) = (binary_expression "*(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) + (char_literal "'\x01'" ' escape_sequence '))) ;) (if_statement "if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }" if (parenthesized_expression "(pcVar3 != (code *)0x0)" ( (binary_expression "pcVar3 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*pcVar3)();\n  }" { (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" ( (pointer_expression "*pcVar3" * identifier) )) (argument_list "()" ( ))) ;) })) (if_statement "if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 0x104) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x104) == 0" (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }" { (expression_statement "iVar5 = FUN_0004e890();" (assignment_expression "iVar5 = FUN_0004e890()" identifier = (call_expression "FUN_0004e890()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" { (expression_statement "*(int *)(iVar5 + 0x20) = iVar1;" (assignment_expression "*(int *)(iVar5 + 0x20) = iVar1" (pointer_expression "*(int *)(iVar5 + 0x20)" * (cast_expression "(int *)(iVar5 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x20)" ( (binary_expression "iVar5 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" * (cast_expression "(undefined2 *)(iVar5 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(iVar1 + 0x104) = iVar5;" (assignment_expression "*(int *)(iVar1 + 0x104) = iVar5" (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_0004f00a;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x104) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x104) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x104)" * (cast_expression "(undefined4 *)(iVar1 + 0x104)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" else (compound_statement "{\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" { (labeled_statement "LAB_0004f00a:\n    FUN_00031620(1,0xffffffff);" statement_identifier : (expression_statement "FUN_00031620(1,0xffffffff);" (call_expression "FUN_00031620(1,0xffffffff)" identifier (argument_list "(1,0xffffffff)" ( number_literal , number_literal ))) ;)) }))) (if_statement "if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" if (parenthesized_expression "(*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0)" ( (binary_expression "*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0" (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" * (cast_expression "(code **)(unaff_EBP + 0xb8a27)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a27)" ( (binary_expression "unaff_EBP + 0xb8a27" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" { (expression_statement "(**(code **)(unaff_EBP + 0xb8a27))();" (call_expression "(**(code **)(unaff_EBP + 0xb8a27))()" (parenthesized_expression "(**(code **)(unaff_EBP + 0xb8a27))" ( (pointer_expression "**(code **)(unaff_EBP + 0xb8a27)" * (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" * (cast_expression "(code **)(unaff_EBP + 0xb8a27)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a27)" ( (binary_expression "unaff_EBP + 0xb8a27" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) })) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) = (binary_expression "*(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) + number_literal)) ;) (labeled_statement "LAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;" statement_identifier : (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" * (cast_expression "(int *)(iVar1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x3c)" ( (binary_expression "iVar1 + 0x3c" identifier + number_literal) )))) = identifier) ;)) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n\nint __regparm3 sqlite3VdbeTransferError(Vdbe *p)\n\n{\n  sqlite3 *db;\n  int iVar1;\n  Mem *p_00;\n  _func_void *p_Var2;\n  sqlite3_value *pMem;\n  u64 in_stack_ffffffe4;\n  \n  p_Var2 = sqlite3Hooks.xBenignBegin;\n  db = p->db;\n  iVar1 = p->rc;\n  if (p->zErrMsg == (char *)0x0) {\n    p_00 = db->pErr;\n    if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }\n    goto LAB_0004f031;\n  }\n  db->bBenignMalloc = db->bBenignMalloc + '\x01';\n  if (p_Var2 != (_func_void *)0x0) {\n    (*p_Var2)();\n  }\n  pMem = db->pErr;\n  if (pMem == (sqlite3_value *)0x0) {\n    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);\n    if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }\n    db->pErr = (sqlite3_value *)0x0;\n  }\n  else {\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n    (*sqlite3Hooks.xBenignEnd)();\n  }\n  db->bBenignMalloc = db->bBenignMalloc + 0xff;\nLAB_0004f031:\n  db->errCode = iVar1;\n  return iVar1;\n}\n\n" comment (function_definition "int __regparm3 sqlite3VdbeTransferError(Vdbe *p)\n\n{\n  sqlite3 *db;\n  int iVar1;\n  Mem *p_00;\n  _func_void *p_Var2;\n  sqlite3_value *pMem;\n  u64 in_stack_ffffffe4;\n  \n  p_Var2 = sqlite3Hooks.xBenignBegin;\n  db = p->db;\n  iVar1 = p->rc;\n  if (p->zErrMsg == (char *)0x0) {\n    p_00 = db->pErr;\n    if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }\n    goto LAB_0004f031;\n  }\n  db->bBenignMalloc = db->bBenignMalloc + '\x01';\n  if (p_Var2 != (_func_void *)0x0) {\n    (*p_Var2)();\n  }\n  pMem = db->pErr;\n  if (pMem == (sqlite3_value *)0x0) {\n    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);\n    if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }\n    db->pErr = (sqlite3_value *)0x0;\n  }\n  else {\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n    (*sqlite3Hooks.xBenignEnd)();\n  }\n  db->bBenignMalloc = db->bBenignMalloc + 0xff;\nLAB_0004f031:\n  db->errCode = iVar1;\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sqlite3VdbeTransferError(Vdbe *p)" identifier (parameter_list "(Vdbe *p)" ( (parameter_declaration "Vdbe *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  sqlite3 *db;\n  int iVar1;\n  Mem *p_00;\n  _func_void *p_Var2;\n  sqlite3_value *pMem;\n  u64 in_stack_ffffffe4;\n  \n  p_Var2 = sqlite3Hooks.xBenignBegin;\n  db = p->db;\n  iVar1 = p->rc;\n  if (p->zErrMsg == (char *)0x0) {\n    p_00 = db->pErr;\n    if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }\n    goto LAB_0004f031;\n  }\n  db->bBenignMalloc = db->bBenignMalloc + '\x01';\n  if (p_Var2 != (_func_void *)0x0) {\n    (*p_Var2)();\n  }\n  pMem = db->pErr;\n  if (pMem == (sqlite3_value *)0x0) {\n    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);\n    if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }\n    db->pErr = (sqlite3_value *)0x0;\n  }\n  else {\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n    (*sqlite3Hooks.xBenignEnd)();\n  }\n  db->bBenignMalloc = db->bBenignMalloc + 0xff;\nLAB_0004f031:\n  db->errCode = iVar1;\n  return iVar1;\n}" { (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "Mem *p_00;" type_identifier (pointer_declarator "*p_00" * identifier) ;) (declaration "_func_void *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "sqlite3_value *pMem;" type_identifier (pointer_declarator "*pMem" * identifier) ;) (declaration "u64 in_stack_ffffffe4;" type_identifier identifier ;) (expression_statement "p_Var2 = sqlite3Hooks.xBenignBegin;" (assignment_expression "p_Var2 = sqlite3Hooks.xBenignBegin" identifier = (field_expression "sqlite3Hooks.xBenignBegin" identifier . field_identifier)) ;) (expression_statement "db = p->db;" (assignment_expression "db = p->db" identifier = (field_expression "p->db" identifier -> field_identifier)) ;) (expression_statement "iVar1 = p->rc;" (assignment_expression "iVar1 = p->rc" identifier = (field_expression "p->rc" identifier -> field_identifier)) ;) (if_statement "if (p->zErrMsg == (char *)0x0) {\n    p_00 = db->pErr;\n    if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }\n    goto LAB_0004f031;\n  }" if (parenthesized_expression "(p->zErrMsg == (char *)0x0)" ( (binary_expression "p->zErrMsg == (char *)0x0" (field_expression "p->zErrMsg" identifier -> field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    p_00 = db->pErr;\n    if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }\n    goto LAB_0004f031;\n  }" { (expression_statement "p_00 = db->pErr;" (assignment_expression "p_00 = db->pErr" identifier = (field_expression "db->pErr" identifier -> field_identifier)) ;) (if_statement "if (p_00 != (Mem *)0x0) {\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }" if (parenthesized_expression "(p_00 != (Mem *)0x0)" ( (binary_expression "p_00 != (Mem *)0x0" identifier != (cast_expression "(Mem *)0x0" ( (type_descriptor "Mem *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }\n      vdbeMemClearExternAndSetNull(p_00);\n    }" { (if_statement "if ((p_00->flags & 0x2400) == 0) {\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }" if (parenthesized_expression "((p_00->flags & 0x2400) == 0)" ( (binary_expression "(p_00->flags & 0x2400) == 0" (parenthesized_expression "(p_00->flags & 0x2400)" ( (binary_expression "p_00->flags & 0x2400" (field_expression "p_00->flags" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n        p_00->flags = 1;\n        db->errCode = iVar1;\n        return iVar1;\n      }" { (expression_statement "p_00->flags = 1;" (assignment_expression "p_00->flags = 1" (field_expression "p_00->flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "db->errCode = iVar1;" (assignment_expression "db->errCode = iVar1" (field_expression "db->errCode" identifier -> field_identifier) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "vdbeMemClearExternAndSetNull(p_00);" (call_expression "vdbeMemClearExternAndSetNull(p_00)" identifier (argument_list "(p_00)" ( identifier ))) ;) })) (goto_statement "goto LAB_0004f031;" goto statement_identifier ;) })) (expression_statement "db->bBenignMalloc = db->bBenignMalloc + '\x01';" (assignment_expression "db->bBenignMalloc = db->bBenignMalloc + '\x01'" (field_expression "db->bBenignMalloc" identifier -> field_identifier) = (binary_expression "db->bBenignMalloc + '\x01'" (field_expression "db->bBenignMalloc" identifier -> field_identifier) + (char_literal "'\x01'" ' escape_sequence '))) ;) (if_statement "if (p_Var2 != (_func_void *)0x0) {\n    (*p_Var2)();\n  }" if (parenthesized_expression "(p_Var2 != (_func_void *)0x0)" ( (binary_expression "p_Var2 != (_func_void *)0x0" identifier != (cast_expression "(_func_void *)0x0" ( (type_descriptor "_func_void *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*p_Var2)();\n  }" { (expression_statement "(*p_Var2)();" (call_expression "(*p_Var2)()" (parenthesized_expression "(*p_Var2)" ( (pointer_expression "*p_Var2" * identifier) )) (argument_list "()" ( ))) ;) })) (expression_statement "pMem = db->pErr;" (assignment_expression "pMem = db->pErr" identifier = (field_expression "db->pErr" identifier -> field_identifier)) ;) (if_statement "if (pMem == (sqlite3_value *)0x0) {\n    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);\n    if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }\n    db->pErr = (sqlite3_value *)0x0;\n  }\n  else {\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }" if (parenthesized_expression "(pMem == (sqlite3_value *)0x0)" ( (binary_expression "pMem == (sqlite3_value *)0x0" identifier == (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);\n    if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }\n    db->pErr = (sqlite3_value *)0x0;\n  }" { (expression_statement "pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4);" (assignment_expression "pMem = (sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4)" identifier = (cast_expression "(sqlite3_value *)sqlite3DbMallocZero(db,in_stack_ffffffe4)" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocZero(db,in_stack_ffffffe4)" identifier (argument_list "(db,in_stack_ffffffe4)" ( identifier , identifier ))))) ;) (if_statement "if (pMem != (sqlite3_value *)0x0) {\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }" if (parenthesized_expression "(pMem != (sqlite3_value *)0x0)" ( (binary_expression "pMem != (sqlite3_value *)0x0" identifier != (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pMem->db = db;\n      pMem->flags = 1;\n      db->pErr = pMem;\n      goto LAB_0004f00a;\n    }" { (expression_statement "pMem->db = db;" (assignment_expression "pMem->db = db" (field_expression "pMem->db" identifier -> field_identifier) = identifier) ;) (expression_statement "pMem->flags = 1;" (assignment_expression "pMem->flags = 1" (field_expression "pMem->flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "db->pErr = pMem;" (assignment_expression "db->pErr = pMem" (field_expression "db->pErr" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_0004f00a;" goto statement_identifier ;) })) (expression_statement "db->pErr = (sqlite3_value *)0x0;" (assignment_expression "db->pErr = (sqlite3_value *)0x0" (field_expression "db->pErr" identifier -> field_identifier) = (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }" else (compound_statement "{\nLAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);\n  }" { (labeled_statement "LAB_0004f00a:\n    sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);" statement_identifier : (expression_statement "sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff);" (call_expression "sqlite3VdbeMemSetStr(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff)" identifier (argument_list "(pMem,p->zErrMsg,-1,'\x01',(_func_void_void_ptr *)&DAT_ffffffff)" ( identifier , (field_expression "p->zErrMsg" identifier -> field_identifier) , number_literal , (char_literal "'\x01'" ' escape_sequence ') , (cast_expression "(_func_void_void_ptr *)&DAT_ffffffff" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_ffffffff" & identifier)) ))) ;)) }))) (if_statement "if (sqlite3Hooks.xBenignEnd != (_func_void *)0x0) {\n    (*sqlite3Hooks.xBenignEnd)();\n  }" if (parenthesized_expression "(sqlite3Hooks.xBenignEnd != (_func_void *)0x0)" ( (binary_expression "sqlite3Hooks.xBenignEnd != (_func_void *)0x0" (field_expression "sqlite3Hooks.xBenignEnd" identifier . field_identifier) != (cast_expression "(_func_void *)0x0" ( (type_descriptor "_func_void *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*sqlite3Hooks.xBenignEnd)();\n  }" { (expression_statement "(*sqlite3Hooks.xBenignEnd)();" (call_expression "(*sqlite3Hooks.xBenignEnd)()" (parenthesized_expression "(*sqlite3Hooks.xBenignEnd)" ( (pointer_expression "*sqlite3Hooks.xBenignEnd" * (field_expression "sqlite3Hooks.xBenignEnd" identifier . field_identifier)) )) (argument_list "()" ( ))) ;) })) (expression_statement "db->bBenignMalloc = db->bBenignMalloc + 0xff;" (assignment_expression "db->bBenignMalloc = db->bBenignMalloc + 0xff" (field_expression "db->bBenignMalloc" identifier -> field_identifier) = (binary_expression "db->bBenignMalloc + 0xff" (field_expression "db->bBenignMalloc" identifier -> field_identifier) + number_literal)) ;) (labeled_statement "LAB_0004f031:\n  db->errCode = iVar1;" statement_identifier : (expression_statement "db->errCode = iVar1;" (assignment_expression "db->errCode = iVar1" (field_expression "db->errCode" identifier -> field_identifier) = identifier) ;)) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_0004efd0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}\n\n" (function_definition "int FUN_0004efd0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" primitive_type (function_declarator "FUN_0004efd0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "code *pcVar3;" type_identifier (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "piVar4 = (int *)FUN_000d0ab3();" (assignment_expression "piVar4 = (int *)FUN_000d0ab3()" identifier = (cast_expression "(int *)FUN_000d0ab3()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000d0ab3()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) (expression_statement "iVar2 = piVar4[10];" (assignment_expression "iVar2 = piVar4[10]" identifier = (subscript_expression "piVar4[10]" identifier [ number_literal ])) ;) (if_statement "if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" if (parenthesized_expression "(piVar4[0x1e] == 0)" ( (binary_expression "piVar4[0x1e] == 0" (subscript_expression "piVar4[0x1e]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" { (expression_statement "iVar5 = *(int *)(iVar1 + 0x104);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x104)" identifier = (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) ))))) ;) (if_statement "if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" { (if_statement "if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" if (parenthesized_expression "((*(ushort *)(iVar5 + 8) & 0x2400) == 0)" ( (binary_expression "(*(ushort *)(iVar5 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(iVar5 + 8) & 0x2400)" ( (binary_expression "*(ushort *)(iVar5 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar5 + 8)" * (cast_expression "(ushort *)(iVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" { (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" * (cast_expression "(undefined2 *)(iVar5 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" * (cast_expression "(int *)(iVar1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x3c)" ( (binary_expression "iVar1 + 0x3c" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "FUN_0002a070();" (call_expression "FUN_0002a070()" identifier (argument_list "()" ( ))) ;) })) (goto_statement "goto LAB_0004f031;" goto statement_identifier ;) })) (expression_statement "pcVar3 = *(code **)(unaff_EBP + 0xb8a23);" (assignment_expression "pcVar3 = *(code **)(unaff_EBP + 0xb8a23)" identifier = (pointer_expression "*(code **)(unaff_EBP + 0xb8a23)" * (cast_expression "(code **)(unaff_EBP + 0xb8a23)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a23)" ( (binary_expression "unaff_EBP + 0xb8a23" identifier + number_literal) ))))) ;) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) = (binary_expression "*(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) + (char_literal "'\x01'" ' escape_sequence '))) ;) (if_statement "if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }" if (parenthesized_expression "(pcVar3 != (code *)0x0)" ( (binary_expression "pcVar3 != (code *)0x0" identifier != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*pcVar3)();\n  }" { (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" ( (pointer_expression "*pcVar3" * identifier) )) (argument_list "()" ( ))) ;) })) (if_statement "if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" if (parenthesized_expression "(*(int *)(iVar1 + 0x104) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x104) == 0" (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }" { (expression_statement "iVar5 = FUN_0004e890();" (assignment_expression "iVar5 = FUN_0004e890()" identifier = (call_expression "FUN_0004e890()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" { (expression_statement "*(int *)(iVar5 + 0x20) = iVar1;" (assignment_expression "*(int *)(iVar5 + 0x20) = iVar1" (pointer_expression "*(int *)(iVar5 + 0x20)" * (cast_expression "(int *)(iVar5 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x20)" ( (binary_expression "iVar5 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" * (cast_expression "(undefined2 *)(iVar5 + 8)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 8)" ( (binary_expression "iVar5 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(int *)(iVar1 + 0x104) = iVar5;" (assignment_expression "*(int *)(iVar1 + 0x104) = iVar5" (pointer_expression "*(int *)(iVar1 + 0x104)" * (cast_expression "(int *)(iVar1 + 0x104)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_0004f00a;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(iVar1 + 0x104) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x104) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x104)" * (cast_expression "(undefined4 *)(iVar1 + 0x104)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x104)" ( (binary_expression "iVar1 + 0x104" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" else (compound_statement "{\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" { (labeled_statement "LAB_0004f00a:\n    FUN_00031620(1,0xffffffff);" statement_identifier : (expression_statement "FUN_00031620(1,0xffffffff);" (call_expression "FUN_00031620(1,0xffffffff)" identifier (argument_list "(1,0xffffffff)" ( number_literal , number_literal ))) ;)) }))) (if_statement "if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" if (parenthesized_expression "(*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0)" ( (binary_expression "*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0" (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" * (cast_expression "(code **)(unaff_EBP + 0xb8a27)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a27)" ( (binary_expression "unaff_EBP + 0xb8a27" identifier + number_literal) )))) != (cast_expression "(code *)0x0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" { (expression_statement "(**(code **)(unaff_EBP + 0xb8a27))();" (call_expression "(**(code **)(unaff_EBP + 0xb8a27))()" (parenthesized_expression "(**(code **)(unaff_EBP + 0xb8a27))" ( (pointer_expression "**(code **)(unaff_EBP + 0xb8a27)" * (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" * (cast_expression "(code **)(unaff_EBP + 0xb8a27)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0xb8a27)" ( (binary_expression "unaff_EBP + 0xb8a27" identifier + number_literal) ))))) )) (argument_list "()" ( ))) ;) })) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) = (binary_expression "*(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" * (cast_expression "(char *)(iVar1 + 0x4e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4e)" ( (binary_expression "iVar1 + 0x4e" identifier + number_literal) )))) + number_literal)) ;) (labeled_statement "LAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;" statement_identifier : (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" * (cast_expression "(int *)(iVar1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x3c)" ( (binary_expression "iVar1 + 0x3c" identifier + number_literal) )))) = identifier) ;)) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (char_literal ' escape_sequence '))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( LIT , LIT ))) ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (return_statement return IDENT ;) })))
(function_definition "int FUN_0004efd0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" (primitive_type "int") (function_declarator "FUN_0004efd0(void)" (identifier "FUN_0004efd0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  code *pcVar3;\n  int *piVar4;\n  int iVar5;\n  int unaff_EBP;\n  \n  piVar4 = (int *)FUN_000d0ab3();\n  iVar1 = *piVar4;\n  iVar2 = piVar4[10];\n  if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }\n  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';\n  if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }\n  if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }\n  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }\n  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;\nLAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "code *pcVar3;" (type_identifier "code") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (expression_statement "piVar4 = (int *)FUN_000d0ab3();" (assignment_expression "piVar4 = (int *)FUN_000d0ab3()" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_000d0ab3()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000d0ab3()" (identifier "FUN_000d0ab3") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = *piVar4;" (assignment_expression "iVar1 = *piVar4" (identifier "iVar1") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (expression_statement "iVar2 = piVar4[10];" (assignment_expression "iVar2 = piVar4[10]" (identifier "iVar2") (= "=") (subscript_expression "piVar4[10]" (identifier "piVar4") ([ "[") (number_literal "10") (] "]"))) (; ";")) (if_statement "if (piVar4[0x1e] == 0) {\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" (if "if") (parenthesized_expression "(piVar4[0x1e] == 0)" (( "(") (binary_expression "piVar4[0x1e] == 0" (subscript_expression "piVar4[0x1e]" (identifier "piVar4") ([ "[") (number_literal "0x1e") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = *(int *)(iVar1 + 0x104);\n    if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }\n    goto LAB_0004f031;\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(iVar1 + 0x104);" (assignment_expression "iVar5 = *(int *)(iVar1 + 0x104)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar1 + 0x104)" (* "*") (cast_expression "(int *)(iVar1 + 0x104)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x104)" (( "(") (binary_expression "iVar1 + 0x104" (identifier "iVar1") (+ "+") (number_literal "0x104")) () ")"))))) (; ";")) (if_statement "if (iVar5 != 0) {\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" (if "if") (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }\n      FUN_0002a070();\n    }" ({ "{") (if_statement "if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" (if "if") (parenthesized_expression "((*(ushort *)(iVar5 + 8) & 0x2400) == 0)" (( "(") (binary_expression "(*(ushort *)(iVar5 + 8) & 0x2400) == 0" (parenthesized_expression "(*(ushort *)(iVar5 + 8) & 0x2400)" (( "(") (binary_expression "*(ushort *)(iVar5 + 8) & 0x2400" (pointer_expression "*(ushort *)(iVar5 + 8)" (* "*") (cast_expression "(ushort *)(iVar5 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x2400")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined2 *)(iVar5 + 8) = 1;\n        *(int *)(iVar1 + 0x3c) = iVar2;\n        return iVar2;\n      }" ({ "{") (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar5 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" (* "*") (cast_expression "(int *)(iVar1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x3c)" (( "(") (binary_expression "iVar1 + 0x3c" (identifier "iVar1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "FUN_0002a070();" (call_expression "FUN_0002a070()" (identifier "FUN_0002a070") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (goto_statement "goto LAB_0004f031;" (goto "goto") (statement_identifier "LAB_0004f031") (; ";")) (} "}"))) (expression_statement "pcVar3 = *(code **)(unaff_EBP + 0xb8a23);" (assignment_expression "pcVar3 = *(code **)(unaff_EBP + 0xb8a23)" (identifier "pcVar3") (= "=") (pointer_expression "*(code **)(unaff_EBP + 0xb8a23)" (* "*") (cast_expression "(code **)(unaff_EBP + 0xb8a23)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0xb8a23)" (( "(") (binary_expression "unaff_EBP + 0xb8a23" (identifier "unaff_EBP") (+ "+") (number_literal "0xb8a23")) () ")"))))) (; ";")) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" (* "*") (cast_expression "(char *)(iVar1 + 0x4e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4e)" (( "(") (binary_expression "iVar1 + 0x4e" (identifier "iVar1") (+ "+") (number_literal "0x4e")) () ")")))) (= "=") (binary_expression "*(char *)(iVar1 + 0x4e) + '\x01'" (pointer_expression "*(char *)(iVar1 + 0x4e)" (* "*") (cast_expression "(char *)(iVar1 + 0x4e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4e)" (( "(") (binary_expression "iVar1 + 0x4e" (identifier "iVar1") (+ "+") (number_literal "0x4e")) () ")")))) (+ "+") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'")))) (; ";")) (if_statement "if (pcVar3 != (code *)0x0) {\n    (*pcVar3)();\n  }" (if "if") (parenthesized_expression "(pcVar3 != (code *)0x0)" (( "(") (binary_expression "pcVar3 != (code *)0x0" (identifier "pcVar3") (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    (*pcVar3)();\n  }" ({ "{") (expression_statement "(*pcVar3)();" (call_expression "(*pcVar3)()" (parenthesized_expression "(*pcVar3)" (( "(") (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(iVar1 + 0x104) == 0) {\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }\n  else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x104) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x104) == 0" (pointer_expression "*(int *)(iVar1 + 0x104)" (* "*") (cast_expression "(int *)(iVar1 + 0x104)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x104)" (( "(") (binary_expression "iVar1 + 0x104" (identifier "iVar1") (+ "+") (number_literal "0x104")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = FUN_0004e890();\n    if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }\n    *(undefined4 *)(iVar1 + 0x104) = 0;\n  }" ({ "{") (expression_statement "iVar5 = FUN_0004e890();" (assignment_expression "iVar5 = FUN_0004e890()" (identifier "iVar5") (= "=") (call_expression "FUN_0004e890()" (identifier "FUN_0004e890") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar5 != 0) {\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" (if "if") (parenthesized_expression "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(int *)(iVar5 + 0x20) = iVar1;\n      *(undefined2 *)(iVar5 + 8) = 1;\n      *(int *)(iVar1 + 0x104) = iVar5;\n      goto LAB_0004f00a;\n    }" ({ "{") (expression_statement "*(int *)(iVar5 + 0x20) = iVar1;" (assignment_expression "*(int *)(iVar5 + 0x20) = iVar1" (pointer_expression "*(int *)(iVar5 + 0x20)" (* "*") (cast_expression "(int *)(iVar5 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x20)" (( "(") (binary_expression "iVar5 + 0x20" (identifier "iVar5") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(undefined2 *)(iVar5 + 8) = 1;" (assignment_expression "*(undefined2 *)(iVar5 + 8) = 1" (pointer_expression "*(undefined2 *)(iVar5 + 8)" (* "*") (cast_expression "(undefined2 *)(iVar5 + 8)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 8)" (( "(") (binary_expression "iVar5 + 8" (identifier "iVar5") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(int *)(iVar1 + 0x104) = iVar5;" (assignment_expression "*(int *)(iVar1 + 0x104) = iVar5" (pointer_expression "*(int *)(iVar1 + 0x104)" (* "*") (cast_expression "(int *)(iVar1 + 0x104)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x104)" (( "(") (binary_expression "iVar1 + 0x104" (identifier "iVar1") (+ "+") (number_literal "0x104")) () ")")))) (= "=") (identifier "iVar5")) (; ";")) (goto_statement "goto LAB_0004f00a;" (goto "goto") (statement_identifier "LAB_0004f00a") (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(iVar1 + 0x104) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x104) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x104)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x104)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x104)" (( "(") (binary_expression "iVar1 + 0x104" (identifier "iVar1") (+ "+") (number_literal "0x104")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" (else "else") (compound_statement "{\nLAB_0004f00a:\n    FUN_00031620(1,0xffffffff);\n  }" ({ "{") (labeled_statement "LAB_0004f00a:\n    FUN_00031620(1,0xffffffff);" (statement_identifier "LAB_0004f00a") (: ":") (expression_statement "FUN_00031620(1,0xffffffff);" (call_expression "FUN_00031620(1,0xffffffff)" (identifier "FUN_00031620") (argument_list "(1,0xffffffff)" (( "(") (number_literal "1") (, ",") (number_literal "0xffffffff") () ")"))) (; ";"))) (} "}")))) (if_statement "if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" (if "if") (parenthesized_expression "(*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0)" (( "(") (binary_expression "*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0" (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" (* "*") (cast_expression "(code **)(unaff_EBP + 0xb8a27)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0xb8a27)" (( "(") (binary_expression "unaff_EBP + 0xb8a27" (identifier "unaff_EBP") (+ "+") (number_literal "0xb8a27")) () ")")))) (!= "!=") (cast_expression "(code *)0x0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    (**(code **)(unaff_EBP + 0xb8a27))();\n  }" ({ "{") (expression_statement "(**(code **)(unaff_EBP + 0xb8a27))();" (call_expression "(**(code **)(unaff_EBP + 0xb8a27))()" (parenthesized_expression "(**(code **)(unaff_EBP + 0xb8a27))" (( "(") (pointer_expression "**(code **)(unaff_EBP + 0xb8a27)" (* "*") (pointer_expression "*(code **)(unaff_EBP + 0xb8a27)" (* "*") (cast_expression "(code **)(unaff_EBP + 0xb8a27)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0xb8a27)" (( "(") (binary_expression "unaff_EBP + 0xb8a27" (identifier "unaff_EBP") (+ "+") (number_literal "0xb8a27")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;" (assignment_expression "*(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" (* "*") (cast_expression "(char *)(iVar1 + 0x4e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4e)" (( "(") (binary_expression "iVar1 + 0x4e" (identifier "iVar1") (+ "+") (number_literal "0x4e")) () ")")))) (= "=") (binary_expression "*(char *)(iVar1 + 0x4e) + -1" (pointer_expression "*(char *)(iVar1 + 0x4e)" (* "*") (cast_expression "(char *)(iVar1 + 0x4e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4e)" (( "(") (binary_expression "iVar1 + 0x4e" (identifier "iVar1") (+ "+") (number_literal "0x4e")) () ")")))) (+ "+") (number_literal "-1"))) (; ";")) (labeled_statement "LAB_0004f031:\n  *(int *)(iVar1 + 0x3c) = iVar2;" (statement_identifier "LAB_0004f031") (: ":") (expression_statement "*(int *)(iVar1 + 0x3c) = iVar2;" (assignment_expression "*(int *)(iVar1 + 0x3c) = iVar2" (pointer_expression "*(int *)(iVar1 + 0x3c)" (* "*") (cast_expression "(int *)(iVar1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x3c)" (( "(") (binary_expression "iVar1 + 0x3c" (identifier "iVar1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (identifier "iVar2")) (; ";"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */

int __regparm3 function_1(type_1 *p)

{
  type_2 *db;
  int iVar1;
  type_3 *var_1;
  type_4 *var_3;
  type_5 *var_4;
  type_6 in_stack_ffffffe4;
  
  var_3 = sqlite3Hooks.xBenignBegin;
  db = p->db;
  iVar1 = p->rc;
  if (p->zErrMsg == (char *)0x0) {
    var_1 = db->pErr;
    if (var_1 != (type_3 *)0x0) {
      if ((var_1->flags & 0x2400) == 0) {
        var_1->flags = 1;
        db->errCode = iVar1;
        return iVar1;
      }
      var_2(var_1);
    }
    goto LAB_0004f031;
  }
  db->bBenignMalloc = db->bBenignMalloc + '\x01';
  if (var_3 != (type_4 *)0x0) {
    (*var_3)();
  }
  var_4 = db->pErr;
  if (var_4 == (type_5 *)0x0) {
    var_4 = (type_5 *)var_5(db,in_stack_ffffffe4);
    if (var_4 != (type_5 *)0x0) {
      var_4->db = db;
      var_4->flags = 1;
      db->pErr = var_4;
      goto LAB_0004f00a;
    }
    db->pErr = (type_5 *)0x0;
  }
  else {
LAB_0004f00a:
    var_6(var_4,p->zErrMsg,-1,'\x01',(type_7 *)&DAT_ffffffff);
  }
  if (sqlite3Hooks.xBenignEnd != (type_4 *)0x0) {
    (*sqlite3Hooks.xBenignEnd)();
  }
  db->bBenignMalloc = db->bBenignMalloc + 0xff;
LAB_0004f031:
  db->errCode = iVar1;
  return iVar1;
}


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

int MASKED(void)

{
  int iVar1;
  int iVar2;
  code *pcVar3;
  int *piVar4;
  int iVar5;
  int unaff_EBP;
  
  piVar4 = (int *)FUN_000d0ab3();
  iVar1 = *piVar4;
  iVar2 = piVar4[10];
  if (piVar4[0x1e] == 0) {
    iVar5 = *(int *)(iVar1 + 0x104);
    if (iVar5 != 0) {
      if ((*(ushort *)(iVar5 + 8) & 0x2400) == 0) {
        *(undefined2 *)(iVar5 + 8) = 1;
        *(int *)(iVar1 + 0x3c) = iVar2;
        return iVar2;
      }
      FUN_0002a070();
    }
    goto LAB_0004f031;
  }
  pcVar3 = *(code **)(unaff_EBP + 0xb8a23);
  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + '\x01';
  if (pcVar3 != (code *)0x0) {
    (*pcVar3)();
  }
  if (*(int *)(iVar1 + 0x104) == 0) {
    iVar5 = FUN_0004e890();
    if (iVar5 != 0) {
      *(int *)(iVar5 + 0x20) = iVar1;
      *(undefined2 *)(iVar5 + 8) = 1;
      *(int *)(iVar1 + 0x104) = iVar5;
      goto LAB_0004f00a;
    }
    *(undefined4 *)(iVar1 + 0x104) = 0;
  }
  else {
LAB_0004f00a:
    FUN_00031620(1,0xffffffff);
  }
  if (*(code **)(unaff_EBP + 0xb8a27) != (code *)0x0) {
    (**(code **)(unaff_EBP + 0xb8a27))();
  }
  *(char *)(iVar1 + 0x4e) = *(char *)(iVar1 + 0x4e) + -1;
LAB_0004f031:
  *(int *)(iVar1 + 0x3c) = iVar2;
  return iVar2;
}

