
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm2 sessionDiffNew(void *pCtx,int iVal,sqlite3_value **ppVal)

{
  sqlite3_value *psVar1;
  FuncDef *pFVar2;
  sqlite3 *psVar3;
  uint extraout_EDX;
  uint uVar4;
  Mem *pOut;
  undefined1 *puVar5;
  uint in_stack_00000008;
  undefined4 *in_stack_0000000c;
  
  psVar1 = *ppVal;
  if (psVar1 != (sqlite3_value *)0x0) {
    pFVar2 = ((psVar1->u).pDef)->pNext;
    if (pFVar2 != (FuncDef *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);
      iVal = extraout_EDX;
    }
    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||
       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {
      psVar3 = (sqlite3 *)(psVar1->u).pDef;
      puVar5 = nullMem_24113;
      psVar3->errCode = 0x19;
      sqlite3ErrorFinish(psVar3,iVal);
    }
    else {
      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;
      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {
        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =
             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;
      }
    }
    psVar3 = (sqlite3 *)(psVar1->u).pDef;
    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {
      uVar4 = psVar1[1].u.nZero & psVar3->errMask;
    }
    else {
      uVar4 = apiOomError(psVar3);
      psVar3 = (sqlite3 *)(psVar1->u).pDef;
    }
    psVar1[1].u.nZero = uVar4;
    if (psVar3->mutex != (sqlite3_mutex *)0x0) {
      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);
    }
    *in_stack_0000000c = puVar5;
    return 0;
  }
  *in_stack_0000000c = nullMem_24113;
  return 0;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)

{
  int iVar1;
  uint uVar2;
  undefined *puVar3;
  
  param_1 = (int *)*param_1;
  if (param_1 != (int *)0x0) {
    if (*(int *)(*param_1 + 0xc) != 0) {
      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));
    }
    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {
      puVar3 = &DAT_00162d60;
      *(undefined4 *)(*param_1 + 0x3c) = 0x19;
      FUN_0004c5a0();
    }
    else {
      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);
      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {
        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;
      }
    }
    iVar1 = *param_1;
    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {
      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);
    }
    else {
      uVar2 = FUN_0004c680();
      iVar1 = *param_1;
    }
    param_1[10] = uVar2;
    if (*(int *)(iVar1 + 0xc) != 0) {
      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));
    }
    *param_3 = puVar3;
    return 0;
  }
  *param_3 = &DAT_00162d60;
  return 0;
}


PUSH EDI
PUSH ESI
CALL 0x00152e6c
ADD ESI,0x1543a1
PUSH EBX
MOV EAX,dword ptr [ESP + 0x10]
MOV EBX,dword ptr [EAX]
TEST EBX,EBX
JZ 0x00066b50
MOV EAX,dword ptr [EBX]
MOV EAX,dword ptr [EAX + 0xc]
TEST EAX,EAX
JZ 0x00066ab2
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x614]
ADD ESP,0x10
MOV EAX,dword ptr [EBX + 0x74]
TEST EAX,EAX
JZ 0x00066ac6
MOVZX EDX,word ptr [EBX + 0x88]
CMP dword ptr [ESP + 0x14],EDX
JC 0x00066b28
MOV EAX,dword ptr [EBX]
LEA EDI,[ESI + 0xfffa7f38]
MOV dword ptr [EAX + 0x3c],0x19
CALL 0x0004c5a0
MOV EAX,dword ptr [EBX]
MOV EDX,dword ptr [EBX + 0x28]
CMP byte ptr [EAX + 0x4d],0x0
JNZ 0x00066b18
CMP EDX,0xc0a
JZ 0x00066b18
AND EDX,dword ptr [EAX + 0x40]
MOV dword ptr [EBX + 0x28],EDX
MOV EAX,dword ptr [EAX + 0xc]
TEST EAX,EAX
JZ 0x00066b07
SUB ESP,0xc
PUSH EAX
CALL dword ptr [ESI + 0x61c]
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [EAX],EDI
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
CALL 0x0004c680
MOV EDX,EAX
MOV EAX,dword ptr [EBX]
JMP 0x00066af0
MOV ECX,dword ptr [ESP + 0x14]
LEA EDX,[ECX + ECX*0x4]
LEA EDI,[EAX + EDX*0x8]
MOVZX EAX,word ptr [EDI + 0x8]
TEST AH,0x8
JZ 0x00066ada
AND AH,0xf7
OR AH,0x10
MOV word ptr [EDI + 0x8],AX
JMP 0x00066ada
MOV EAX,dword ptr [ESP + 0x18]
LEA EDI,[ESI + 0xfffa7f38]
MOV dword ptr [EAX],EDI
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nundefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" type_identifier (function_declarator "FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)" identifier (parameter_list "(int *param_1,uint param_2,undefined4 *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "param_1 = (int *)*param_1;" (assignment_expression "param_1 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" if (parenthesized_expression "(param_1 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" { (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" { (expression_statement "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(*param_1 + 0xc))" ( (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) })) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" if (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" ( (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" ( (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" ( (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" * (cast_expression "(ushort *)(param_1 + 0x22)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x22)" ( (binary_expression "param_1 + 0x22" identifier + number_literal) )))) <= identifier) ))) )) (compound_statement "{\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }" { (expression_statement "puVar3 = &DAT_00162d60;" (assignment_expression "puVar3 = &DAT_00162d60" identifier = (pointer_expression "&DAT_00162d60" & identifier)) ;) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" * (cast_expression "(undefined4 *)(*param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x3c)" ( (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" else (compound_statement "{\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" { (expression_statement "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" identifier = (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" ( (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) )))) ;) (if_statement "if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" if (parenthesized_expression "((*(ushort *)(puVar3 + 8) & 0x800) != 0)" ( (binary_expression "(*(ushort *)(puVar3 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar3 + 8) & 0x800)" ( (binary_expression "*(ushort *)(puVar3 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" { (expression_statement "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) = (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) & number_literal) | number_literal)) ;) })) }))) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" if (parenthesized_expression "((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a))" ( (binary_expression "(*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)" (parenthesized_expression "(*(char *)(iVar1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(iVar1 + 0x4d) == '\0'" (pointer_expression "*(char *)(iVar1 + 0x4d)" * (cast_expression "(char *)(iVar1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4d)" ( (binary_expression "iVar1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(param_1[10] != 0xc0a)" ( (binary_expression "param_1[10] != 0xc0a" (subscript_expression "param_1[10]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }" { (expression_statement "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);" (assignment_expression "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40)" identifier = (binary_expression "param_1[10] & *(uint *)(iVar1 + 0x40)" (subscript_expression "param_1[10]" identifier [ number_literal ]) & (pointer_expression "*(uint *)(iVar1 + 0x40)" * (cast_expression "(uint *)(iVar1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x40)" ( (binary_expression "iVar1 + 0x40" identifier + number_literal) )))))) ;) }) (else_clause "else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" else (compound_statement "{\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" { (expression_statement "uVar2 = FUN_0004c680();" (assignment_expression "uVar2 = FUN_0004c680()" identifier = (call_expression "FUN_0004c680()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) (expression_statement "param_1[10] = uVar2;" (assignment_expression "param_1[10] = uVar2" (subscript_expression "param_1[10]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(*DAT_001bb444)(*(int *)(iVar1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "*param_3 = puVar3;" (assignment_expression "*param_3 = puVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "*param_3 = &DAT_00162d60;" (assignment_expression "*param_3 = &DAT_00162d60" (pointer_expression "*param_3" * identifier) = (pointer_expression "&DAT_00162d60" & identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nint __regparm2 sessionDiffNew(void *pCtx,int iVal,sqlite3_value **ppVal)\n\n{\n  sqlite3_value *psVar1;\n  FuncDef *pFVar2;\n  sqlite3 *psVar3;\n  uint extraout_EDX;\n  uint uVar4;\n  Mem *pOut;\n  undefined1 *puVar5;\n  uint in_stack_00000008;\n  undefined4 *in_stack_0000000c;\n  \n  psVar1 = *ppVal;\n  if (psVar1 != (sqlite3_value *)0x0) {\n    pFVar2 = ((psVar1->u).pDef)->pNext;\n    if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }\n    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }\n    psVar1[1].u.nZero = uVar4;\n    if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }\n    *in_stack_0000000c = puVar5;\n    return 0;\n  }\n  *in_stack_0000000c = nullMem_24113;\n  return 0;\n}\n\n" comment (function_definition "int __regparm2 sessionDiffNew(void *pCtx,int iVal,sqlite3_value **ppVal)\n\n{\n  sqlite3_value *psVar1;\n  FuncDef *pFVar2;\n  sqlite3 *psVar3;\n  uint extraout_EDX;\n  uint uVar4;\n  Mem *pOut;\n  undefined1 *puVar5;\n  uint in_stack_00000008;\n  undefined4 *in_stack_0000000c;\n  \n  psVar1 = *ppVal;\n  if (psVar1 != (sqlite3_value *)0x0) {\n    pFVar2 = ((psVar1->u).pDef)->pNext;\n    if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }\n    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }\n    psVar1[1].u.nZero = uVar4;\n    if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }\n    *in_stack_0000000c = puVar5;\n    return 0;\n  }\n  *in_stack_0000000c = nullMem_24113;\n  return 0;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "sessionDiffNew(void *pCtx,int iVal,sqlite3_value **ppVal)" identifier (parameter_list "(void *pCtx,int iVal,sqlite3_value **ppVal)" ( (parameter_declaration "void *pCtx" primitive_type (pointer_declarator "*pCtx" * identifier)) , (parameter_declaration "int iVal" primitive_type identifier) , (parameter_declaration "sqlite3_value **ppVal" type_identifier (pointer_declarator "**ppVal" * (pointer_declarator "*ppVal" * identifier))) ))) (compound_statement "{\n  sqlite3_value *psVar1;\n  FuncDef *pFVar2;\n  sqlite3 *psVar3;\n  uint extraout_EDX;\n  uint uVar4;\n  Mem *pOut;\n  undefined1 *puVar5;\n  uint in_stack_00000008;\n  undefined4 *in_stack_0000000c;\n  \n  psVar1 = *ppVal;\n  if (psVar1 != (sqlite3_value *)0x0) {\n    pFVar2 = ((psVar1->u).pDef)->pNext;\n    if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }\n    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }\n    psVar1[1].u.nZero = uVar4;\n    if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }\n    *in_stack_0000000c = puVar5;\n    return 0;\n  }\n  *in_stack_0000000c = nullMem_24113;\n  return 0;\n}" { (declaration "sqlite3_value *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "FuncDef *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (declaration "sqlite3 *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "uint extraout_EDX;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "Mem *pOut;" type_identifier (pointer_declarator "*pOut" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint in_stack_00000008;" type_identifier identifier ;) (declaration "undefined4 *in_stack_0000000c;" type_identifier (pointer_declarator "*in_stack_0000000c" * identifier) ;) (expression_statement "psVar1 = *ppVal;" (assignment_expression "psVar1 = *ppVal" identifier = (pointer_expression "*ppVal" * identifier)) ;) (if_statement "if (psVar1 != (sqlite3_value *)0x0) {\n    pFVar2 = ((psVar1->u).pDef)->pNext;\n    if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }\n    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }\n    psVar1[1].u.nZero = uVar4;\n    if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }\n    *in_stack_0000000c = puVar5;\n    return 0;\n  }" if (parenthesized_expression "(psVar1 != (sqlite3_value *)0x0)" ( (binary_expression "psVar1 != (sqlite3_value *)0x0" identifier != (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pFVar2 = ((psVar1->u).pDef)->pNext;\n    if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }\n    if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }\n    psVar1[1].u.nZero = uVar4;\n    if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }\n    *in_stack_0000000c = puVar5;\n    return 0;\n  }" { (expression_statement "pFVar2 = ((psVar1->u).pDef)->pNext;" (assignment_expression "pFVar2 = ((psVar1->u).pDef)->pNext" identifier = (field_expression "((psVar1->u).pDef)->pNext" (parenthesized_expression "((psVar1->u).pDef)" ( (field_expression "(psVar1->u).pDef" (parenthesized_expression "(psVar1->u)" ( (field_expression "psVar1->u" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) (if_statement "if (pFVar2 != (FuncDef *)0x0) {\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }" if (parenthesized_expression "(pFVar2 != (FuncDef *)0x0)" ( (binary_expression "pFVar2 != (FuncDef *)0x0" identifier != (cast_expression "(FuncDef *)0x0" ( (type_descriptor "FuncDef *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);\n      iVal = extraout_EDX;\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2);" (call_expression "(*sqlite3Config.mutex.xMutexEnter)((sqlite3_mutex *)pFVar2)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexEnter)" ( (pointer_expression "*sqlite3Config.mutex.xMutexEnter" * (field_expression "sqlite3Config.mutex.xMutexEnter" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "((sqlite3_mutex *)pFVar2)" ( (cast_expression "(sqlite3_mutex *)pFVar2" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "iVal = extraout_EDX;" (assignment_expression "iVal = extraout_EDX" identifier = identifier) ;) })) (if_statement "if ((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)) {\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }\n    else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }" if (parenthesized_expression "((psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008))" ( (binary_expression "(psVar1[2].xDel == (_func_void_void_ptr *)0x0) ||\n       (iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)" (parenthesized_expression "(psVar1[2].xDel == (_func_void_void_ptr *)0x0)" ( (binary_expression "psVar1[2].xDel == (_func_void_void_ptr *)0x0" (field_expression "psVar1[2].xDel" (subscript_expression "psVar1[2]" identifier [ number_literal ]) . field_identifier) == (cast_expression "(_func_void_void_ptr *)0x0" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008)" ( (comma_expression "iVal = (int)*(ushort *)&psVar1[3].z, (uint)iVal <= in_stack_00000008" (assignment_expression "iVal = (int)*(ushort *)&psVar1[3].z" identifier = (cast_expression "(int)*(ushort *)&psVar1[3].z" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(ushort *)&psVar1[3].z" * (cast_expression "(ushort *)&psVar1[3].z" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&psVar1[3].z" & (field_expression "psVar1[3].z" (subscript_expression "psVar1[3]" identifier [ number_literal ]) . field_identifier)))))) , (binary_expression "(uint)iVal <= in_stack_00000008" (cast_expression "(uint)iVal" ( (type_descriptor "uint" type_identifier) ) identifier) <= identifier)) ))) )) (compound_statement "{\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n      puVar5 = nullMem_24113;\n      psVar3->errCode = 0x19;\n      sqlite3ErrorFinish(psVar3,iVal);\n    }" { (expression_statement "psVar3 = (sqlite3 *)(psVar1->u).pDef;" (assignment_expression "psVar3 = (sqlite3 *)(psVar1->u).pDef" identifier = (cast_expression "(sqlite3 *)(psVar1->u).pDef" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(psVar1->u).pDef" (parenthesized_expression "(psVar1->u)" ( (field_expression "psVar1->u" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "puVar5 = nullMem_24113;" (assignment_expression "puVar5 = nullMem_24113" identifier = identifier) ;) (expression_statement "psVar3->errCode = 0x19;" (assignment_expression "psVar3->errCode = 0x19" (field_expression "psVar3->errCode" identifier -> field_identifier) = number_literal) ;) (expression_statement "sqlite3ErrorFinish(psVar3,iVal);" (call_expression "sqlite3ErrorFinish(psVar3,iVal)" identifier (argument_list "(psVar3,iVal)" ( identifier , identifier ))) ;) }) (else_clause "else {\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }" else (compound_statement "{\n      puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;\n      if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }\n    }" { (expression_statement "puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28;" (assignment_expression "puVar5 = psVar1[2].xDel + in_stack_00000008 * 0x28" identifier = (binary_expression "psVar1[2].xDel + in_stack_00000008 * 0x28" (field_expression "psVar1[2].xDel" (subscript_expression "psVar1[2]" identifier [ number_literal ]) . field_identifier) + (binary_expression "in_stack_00000008 * 0x28" identifier * number_literal))) ;) (if_statement "if ((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0) {\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }" if (parenthesized_expression "((*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0)" ( (binary_expression "(*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800)" ( (binary_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0x800" (pointer_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8)" * (cast_expression "(ushort *)((_func_void_void_ptr *)puVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((_func_void_void_ptr *)puVar5 + 8)" ( (binary_expression "(_func_void_void_ptr *)puVar5 + 8" (cast_expression "(_func_void_void_ptr *)puVar5" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n        *(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;\n      }" { (expression_statement "*(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8) =\n             *(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8)" * (cast_expression "(ushort *)((_func_void_void_ptr *)puVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((_func_void_void_ptr *)puVar5 + 8)" ( (binary_expression "(_func_void_void_ptr *)puVar5 + 8" (cast_expression "(_func_void_void_ptr *)puVar5" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) = (binary_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8) & 0xf7ff" (pointer_expression "*(ushort *)((_func_void_void_ptr *)puVar5 + 8)" * (cast_expression "(ushort *)((_func_void_void_ptr *)puVar5 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((_func_void_void_ptr *)puVar5 + 8)" ( (binary_expression "(_func_void_void_ptr *)puVar5 + 8" (cast_expression "(_func_void_void_ptr *)puVar5" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) & number_literal) | number_literal)) ;) })) }))) (expression_statement "psVar3 = (sqlite3 *)(psVar1->u).pDef;" (assignment_expression "psVar3 = (sqlite3 *)(psVar1->u).pDef" identifier = (cast_expression "(sqlite3 *)(psVar1->u).pDef" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(psVar1->u).pDef" (parenthesized_expression "(psVar1->u)" ( (field_expression "psVar1->u" identifier -> field_identifier) )) . field_identifier))) ;) (if_statement "if ((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)) {\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }\n    else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }" if (parenthesized_expression "((psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a))" ( (binary_expression "(psVar3->mallocFailed == '\0') && (psVar1[1].u.nZero != 0xc0a)" (parenthesized_expression "(psVar3->mallocFailed == '\0')" ( (binary_expression "psVar3->mallocFailed == '\0'" (field_expression "psVar3->mallocFailed" identifier -> field_identifier) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(psVar1[1].u.nZero != 0xc0a)" ( (binary_expression "psVar1[1].u.nZero != 0xc0a" (field_expression "psVar1[1].u.nZero" (field_expression "psVar1[1].u" (subscript_expression "psVar1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) != number_literal) ))) )) (compound_statement "{\n      uVar4 = psVar1[1].u.nZero & psVar3->errMask;\n    }" { (expression_statement "uVar4 = psVar1[1].u.nZero & psVar3->errMask;" (assignment_expression "uVar4 = psVar1[1].u.nZero & psVar3->errMask" identifier = (binary_expression "psVar1[1].u.nZero & psVar3->errMask" (field_expression "psVar1[1].u.nZero" (field_expression "psVar1[1].u" (subscript_expression "psVar1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) & (field_expression "psVar3->errMask" identifier -> field_identifier))) ;) }) (else_clause "else {\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }" else (compound_statement "{\n      uVar4 = apiOomError(psVar3);\n      psVar3 = (sqlite3 *)(psVar1->u).pDef;\n    }" { (expression_statement "uVar4 = apiOomError(psVar3);" (assignment_expression "uVar4 = apiOomError(psVar3)" identifier = (call_expression "apiOomError(psVar3)" identifier (argument_list "(psVar3)" ( identifier )))) ;) (expression_statement "psVar3 = (sqlite3 *)(psVar1->u).pDef;" (assignment_expression "psVar3 = (sqlite3 *)(psVar1->u).pDef" identifier = (cast_expression "(sqlite3 *)(psVar1->u).pDef" ( (type_descriptor "sqlite3 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(psVar1->u).pDef" (parenthesized_expression "(psVar1->u)" ( (field_expression "psVar1->u" identifier -> field_identifier) )) . field_identifier))) ;) }))) (expression_statement "psVar1[1].u.nZero = uVar4;" (assignment_expression "psVar1[1].u.nZero = uVar4" (field_expression "psVar1[1].u.nZero" (field_expression "psVar1[1].u" (subscript_expression "psVar1[1]" identifier [ number_literal ]) . field_identifier) . field_identifier) = identifier) ;) (if_statement "if (psVar3->mutex != (sqlite3_mutex *)0x0) {\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }" if (parenthesized_expression "(psVar3->mutex != (sqlite3_mutex *)0x0)" ( (binary_expression "psVar3->mutex != (sqlite3_mutex *)0x0" (field_expression "psVar3->mutex" identifier -> field_identifier) != (cast_expression "(sqlite3_mutex *)0x0" ( (type_descriptor "sqlite3_mutex *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);\n    }" { (expression_statement "(*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);" (call_expression "(*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex)" (parenthesized_expression "(*sqlite3Config.mutex.xMutexLeave)" ( (pointer_expression "*sqlite3Config.mutex.xMutexLeave" * (field_expression "sqlite3Config.mutex.xMutexLeave" (field_expression "sqlite3Config.mutex" identifier . field_identifier) . field_identifier)) )) (argument_list "(psVar3->mutex)" ( (field_expression "psVar3->mutex" identifier -> field_identifier) ))) ;) })) (expression_statement "*in_stack_0000000c = puVar5;" (assignment_expression "*in_stack_0000000c = puVar5" (pointer_expression "*in_stack_0000000c" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "*in_stack_0000000c = nullMem_24113;" (assignment_expression "*in_stack_0000000c = nullMem_24113" (pointer_expression "*in_stack_0000000c" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" type_identifier (function_declarator "FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)" identifier (parameter_list "(int *param_1,uint param_2,undefined4 *param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "param_1 = (int *)*param_1;" (assignment_expression "param_1 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" if (parenthesized_expression "(param_1 != (int *)0x0)" ( (binary_expression "param_1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" { (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" ( (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" { (expression_statement "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" ( (pointer_expression "*DAT_001bb43c" * identifier) )) (argument_list "(*(int *)(*param_1 + 0xc))" ( (pointer_expression "*(int *)(*param_1 + 0xc)" * (cast_expression "(int *)(*param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0xc)" ( (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) ))) ;) })) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" if (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" ( (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" ( (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) == number_literal) )) || (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" ( (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" * (cast_expression "(ushort *)(param_1 + 0x22)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x22)" ( (binary_expression "param_1 + 0x22" identifier + number_literal) )))) <= identifier) ))) )) (compound_statement "{\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }" { (expression_statement "puVar3 = &DAT_00162d60;" (assignment_expression "puVar3 = &DAT_00162d60" identifier = (pointer_expression "&DAT_00162d60" & identifier)) ;) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" * (cast_expression "(undefined4 *)(*param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x3c)" ( (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" * identifier) + number_literal) )))) = number_literal) ;) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" identifier (argument_list "()" ( ))) ;) }) (else_clause "else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" else (compound_statement "{\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" { (expression_statement "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" identifier = (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" ( (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" identifier [ number_literal ]) + (binary_expression "param_2 * 0x28" identifier * number_literal)) )))) ;) (if_statement "if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" if (parenthesized_expression "((*(ushort *)(puVar3 + 8) & 0x800) != 0)" ( (binary_expression "(*(ushort *)(puVar3 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar3 + 8) & 0x800)" ( (binary_expression "*(ushort *)(puVar3 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" { (expression_statement "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) = (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar3 + 8)" * (cast_expression "(ushort *)(puVar3 + 8)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 8)" ( (binary_expression "puVar3 + 8" identifier + number_literal) )))) & number_literal) | number_literal)) ;) })) }))) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" if (parenthesized_expression "((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a))" ( (binary_expression "(*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)" (parenthesized_expression "(*(char *)(iVar1 + 0x4d) == '\0')" ( (binary_expression "*(char *)(iVar1 + 0x4d) == '\0'" (pointer_expression "*(char *)(iVar1 + 0x4d)" * (cast_expression "(char *)(iVar1 + 0x4d)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4d)" ( (binary_expression "iVar1 + 0x4d" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(param_1[10] != 0xc0a)" ( (binary_expression "param_1[10] != 0xc0a" (subscript_expression "param_1[10]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }" { (expression_statement "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);" (assignment_expression "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40)" identifier = (binary_expression "param_1[10] & *(uint *)(iVar1 + 0x40)" (subscript_expression "param_1[10]" identifier [ number_literal ]) & (pointer_expression "*(uint *)(iVar1 + 0x40)" * (cast_expression "(uint *)(iVar1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x40)" ( (binary_expression "iVar1 + 0x40" identifier + number_literal) )))))) ;) }) (else_clause "else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" else (compound_statement "{\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" { (expression_statement "uVar2 = FUN_0004c680();" (assignment_expression "uVar2 = FUN_0004c680()" identifier = (call_expression "FUN_0004c680()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) }))) (expression_statement "param_1[10] = uVar2;" (assignment_expression "param_1[10] = uVar2" (subscript_expression "param_1[10]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "(*DAT_001bb444)(*(int *)(iVar1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" ( (pointer_expression "*DAT_001bb444" * identifier) )) (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "*param_3 = puVar3;" (assignment_expression "*param_3 = puVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "*param_3 = &DAT_00162d60;" (assignment_expression "*param_3 = &DAT_00162d60" (pointer_expression "*param_3" * identifier) = (pointer_expression "&DAT_00162d60" & identifier)) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) )))) ;) (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) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) | LIT)) ;) })) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (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) )))) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) & (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (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 (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_00066a80(int *param_1,uint param_2,undefined4 *param_3)" (identifier "FUN_00066a80") (parameter_list "(int *param_1,uint param_2,undefined4 *param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  \n  param_1 = (int *)*param_1;\n  if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }\n  *param_3 = &DAT_00162d60;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (expression_statement "param_1 = (int *)*param_1;" (assignment_expression "param_1 = (int *)*param_1" (identifier "param_1") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (param_1 != (int *)0x0) {\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 != (int *)0x0)" (( "(") (binary_expression "param_1 != (int *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }\n    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }\n    iVar1 = *param_1;\n    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }\n    param_1[10] = uVar2;\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }\n    *param_3 = puVar3;\n    return 0;\n  }" ({ "{") (if_statement "if (*(int *)(*param_1 + 0xc) != 0) {\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" (if "if") (parenthesized_expression "(*(int *)(*param_1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(*param_1 + 0xc) != 0" (pointer_expression "*(int *)(*param_1 + 0xc)" (* "*") (cast_expression "(int *)(*param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0xc)" (( "(") (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));\n    }" ({ "{") (expression_statement "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc));" (call_expression "(*DAT_001bb43c)(*(int *)(*param_1 + 0xc))" (parenthesized_expression "(*DAT_001bb43c)" (( "(") (pointer_expression "*DAT_001bb43c" (* "*") (identifier "DAT_001bb43c")) () ")")) (argument_list "(*(int *)(*param_1 + 0xc))" (( "(") (pointer_expression "*(int *)(*param_1 + 0xc)" (* "*") (cast_expression "(int *)(*param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0xc)" (( "(") (binary_expression "*param_1 + 0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }\n    else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" (if "if") (parenthesized_expression "((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2))" (( "(") (binary_expression "(param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)" (parenthesized_expression "(param_1[0x1d] == 0)" (( "(") (binary_expression "param_1[0x1d] == 0" (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(ushort *)(param_1 + 0x22) <= param_2)" (( "(") (binary_expression "*(ushort *)(param_1 + 0x22) <= param_2" (pointer_expression "*(ushort *)(param_1 + 0x22)" (* "*") (cast_expression "(ushort *)(param_1 + 0x22)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x22)" (( "(") (binary_expression "param_1 + 0x22" (identifier "param_1") (+ "+") (number_literal "0x22")) () ")")))) (<= "<=") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n      puVar3 = &DAT_00162d60;\n      *(undefined4 *)(*param_1 + 0x3c) = 0x19;\n      FUN_0004c5a0();\n    }" ({ "{") (expression_statement "puVar3 = &DAT_00162d60;" (assignment_expression "puVar3 = &DAT_00162d60" (identifier "puVar3") (= "=") (pointer_expression "&DAT_00162d60" (& "&") (identifier "DAT_00162d60"))) (; ";")) (expression_statement "*(undefined4 *)(*param_1 + 0x3c) = 0x19;" (assignment_expression "*(undefined4 *)(*param_1 + 0x3c) = 0x19" (pointer_expression "*(undefined4 *)(*param_1 + 0x3c)" (* "*") (cast_expression "(undefined4 *)(*param_1 + 0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x3c)" (( "(") (binary_expression "*param_1 + 0x3c" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (number_literal "0x19")) (; ";")) (expression_statement "FUN_0004c5a0();" (call_expression "FUN_0004c5a0()" (identifier "FUN_0004c5a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" (else "else") (compound_statement "{\n      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);\n      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }\n    }" ({ "{") (expression_statement "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);" (assignment_expression "puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28)" (identifier "puVar3") (= "=") (cast_expression "(undefined *)(param_1[0x1d] + param_2 * 0x28)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0x1d] + param_2 * 0x28)" (( "(") (binary_expression "param_1[0x1d] + param_2 * 0x28" (subscript_expression "param_1[0x1d]" (identifier "param_1") ([ "[") (number_literal "0x1d") (] "]")) (+ "+") (binary_expression "param_2 * 0x28" (identifier "param_2") (* "*") (number_literal "0x28"))) () ")")))) (; ";")) (if_statement "if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" (if "if") (parenthesized_expression "((*(ushort *)(puVar3 + 8) & 0x800) != 0)" (( "(") (binary_expression "(*(ushort *)(puVar3 + 8) & 0x800) != 0" (parenthesized_expression "(*(ushort *)(puVar3 + 8) & 0x800)" (( "(") (binary_expression "*(ushort *)(puVar3 + 8) & 0x800" (pointer_expression "*(ushort *)(puVar3 + 8)" (* "*") (cast_expression "(ushort *)(puVar3 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 8)" (( "(") (binary_expression "puVar3 + 8" (identifier "puVar3") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0x800")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;\n      }" ({ "{") (expression_statement "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;" (assignment_expression "*(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (pointer_expression "*(ushort *)(puVar3 + 8)" (* "*") (cast_expression "(ushort *)(puVar3 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 8)" (( "(") (binary_expression "puVar3 + 8" (identifier "puVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000" (binary_expression "*(ushort *)(puVar3 + 8) & 0xf7ff" (pointer_expression "*(ushort *)(puVar3 + 8)" (* "*") (cast_expression "(ushort *)(puVar3 + 8)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 8)" (( "(") (binary_expression "puVar3 + 8" (identifier "puVar3") (+ "+") (number_literal "8")) () ")")))) (& "&") (number_literal "0xf7ff")) (| "|") (number_literal "0x1000"))) (; ";")) (} "}"))) (} "}")))) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }\n    else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" (if "if") (parenthesized_expression "((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a))" (( "(") (binary_expression "(*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)" (parenthesized_expression "(*(char *)(iVar1 + 0x4d) == '\0')" (( "(") (binary_expression "*(char *)(iVar1 + 0x4d) == '\0'" (pointer_expression "*(char *)(iVar1 + 0x4d)" (* "*") (cast_expression "(char *)(iVar1 + 0x4d)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4d)" (( "(") (binary_expression "iVar1 + 0x4d" (identifier "iVar1") (+ "+") (number_literal "0x4d")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(param_1[10] != 0xc0a)" (( "(") (binary_expression "param_1[10] != 0xc0a" (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]")) (!= "!=") (number_literal "0xc0a")) () ")"))) () ")")) (compound_statement "{\n      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);\n    }" ({ "{") (expression_statement "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);" (assignment_expression "uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40)" (identifier "uVar2") (= "=") (binary_expression "param_1[10] & *(uint *)(iVar1 + 0x40)" (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]")) (& "&") (pointer_expression "*(uint *)(iVar1 + 0x40)" (* "*") (cast_expression "(uint *)(iVar1 + 0x40)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x40)" (( "(") (binary_expression "iVar1 + 0x40" (identifier "iVar1") (+ "+") (number_literal "0x40")) () ")")))))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" (else "else") (compound_statement "{\n      uVar2 = FUN_0004c680();\n      iVar1 = *param_1;\n    }" ({ "{") (expression_statement "uVar2 = FUN_0004c680();" (assignment_expression "uVar2 = FUN_0004c680()" (identifier "uVar2") (= "=") (call_expression "FUN_0004c680()" (identifier "FUN_0004c680") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}")))) (expression_statement "param_1[10] = uVar2;" (assignment_expression "param_1[10] = uVar2" (subscript_expression "param_1[10]" (identifier "param_1") ([ "[") (number_literal "10") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));\n    }" ({ "{") (expression_statement "(*DAT_001bb444)(*(int *)(iVar1 + 0xc));" (call_expression "(*DAT_001bb444)(*(int *)(iVar1 + 0xc))" (parenthesized_expression "(*DAT_001bb444)" (( "(") (pointer_expression "*DAT_001bb444" (* "*") (identifier "DAT_001bb444")) () ")")) (argument_list "(*(int *)(iVar1 + 0xc))" (( "(") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "*param_3 = puVar3;" (assignment_expression "*param_3 = puVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "puVar3")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "*param_3 = &DAT_00162d60;" (assignment_expression "*param_3 = &DAT_00162d60" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (pointer_expression "&DAT_00162d60" (& "&") (identifier "DAT_00162d60"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

int __regparm2 function_1(void *pCtx,int iVal,type_1 **ppVal)

{
  type_1 *var_1;
  type_2 *var_2;
  type_3 *psVar3;
  type_4 extraout_EDX;
  type_4 uVar4;
  type_5 *pOut;
  type_6 *puVar5;
  type_4 var_3;
  type_7 *in_stack_0000000c;
  
  var_1 = *ppVal;
  if (var_1 != (type_1 *)0x0) {
    var_2 = ((var_1->u).pDef)->pNext;
    if (var_2 != (type_2 *)0x0) {
      (*sqlite3Config.mutex.xMutexEnter)((type_8 *)var_2);
      iVal = extraout_EDX;
    }
    if ((var_1[2].xDel == (type_9 *)0x0) ||
       (iVal = (int)*(type_10 *)&var_1[3].z, (type_4)iVal <= var_3)) {
      psVar3 = (type_3 *)(var_1->u).pDef;
      puVar5 = nullMem_24113;
      psVar3->errCode = 0x19;
      var_4(psVar3,iVal);
    }
    else {
      puVar5 = var_1[2].xDel + var_3 * 0x28;
      if ((*(type_10 *)((type_9 *)puVar5 + 8) & 0x800) != 0) {
        *(type_10 *)((type_9 *)puVar5 + 8) =
             *(type_10 *)((type_9 *)puVar5 + 8) & 0xf7ff | 0x1000;
      }
    }
    psVar3 = (type_3 *)(var_1->u).pDef;
    if ((psVar3->mallocFailed == '\0') && (var_1[1].u.nZero != 0xc0a)) {
      uVar4 = var_1[1].u.nZero & psVar3->errMask;
    }
    else {
      uVar4 = var_5(psVar3);
      psVar3 = (type_3 *)(var_1->u).pDef;
    }
    var_1[1].u.nZero = uVar4;
    if (psVar3->mutex != (type_8 *)0x0) {
      (*sqlite3Config.mutex.xMutexLeave)(psVar3->mutex);
    }
    *in_stack_0000000c = puVar5;
    return 0;
  }
  *in_stack_0000000c = nullMem_24113;
  return 0;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 MASKED(int *param_1,uint param_2,undefined4 *param_3)

{
  int iVar1;
  uint uVar2;
  undefined *puVar3;
  
  param_1 = (int *)*param_1;
  if (param_1 != (int *)0x0) {
    if (*(int *)(*param_1 + 0xc) != 0) {
      (*DAT_001bb43c)(*(int *)(*param_1 + 0xc));
    }
    if ((param_1[0x1d] == 0) || (*(ushort *)(param_1 + 0x22) <= param_2)) {
      puVar3 = &DAT_00162d60;
      *(undefined4 *)(*param_1 + 0x3c) = 0x19;
      FUN_0004c5a0();
    }
    else {
      puVar3 = (undefined *)(param_1[0x1d] + param_2 * 0x28);
      if ((*(ushort *)(puVar3 + 8) & 0x800) != 0) {
        *(ushort *)(puVar3 + 8) = *(ushort *)(puVar3 + 8) & 0xf7ff | 0x1000;
      }
    }
    iVar1 = *param_1;
    if ((*(char *)(iVar1 + 0x4d) == '\0') && (param_1[10] != 0xc0a)) {
      uVar2 = param_1[10] & *(uint *)(iVar1 + 0x40);
    }
    else {
      uVar2 = FUN_0004c680();
      iVar1 = *param_1;
    }
    param_1[10] = uVar2;
    if (*(int *)(iVar1 + 0xc) != 0) {
      (*DAT_001bb444)(*(int *)(iVar1 + 0xc));
    }
    *param_3 = puVar3;
    return 0;
  }
  *param_3 = &DAT_00162d60;
  return 0;
}

