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

int zipfileOpen(sqlite3_vtab *p,sqlite3_vtab_cursor **ppCsr)

{
  char *pcVar1;
  sqlite3_module *psVar2;
  uint uVar3;
  _func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *p_Var4;
  undefined4 *puVar5;
  byte bVar6;
  
  bVar6 = 0;
  psVar2 = (sqlite3_module *)sqlite3_malloc(0x38);
  *ppCsr = (sqlite3_vtab_cursor *)psVar2;
  if (psVar2 != (sqlite3_module *)0x0) {
    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;
    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);
    psVar2->iVersion = 0;
    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;
    for (; uVar3 != 0; uVar3 = uVar3 - 1) {
      *puVar5 = 0;
      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
    }
    uVar3 = p[2].nRef;
    pcVar1 = p[2].zErrMsg;
    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)
             (uVar3 + 1);
    p[2].nRef = (int)p_Var4;
    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);
    psVar2->xCreate = p_Var4;
    psVar2->xConnect =
         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)
         (pcVar1 + (0xfffffffe < uVar3));
    psVar2->xUpdate =
         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;
    p[2].pModule = psVar2;
    return 0;
  }
  return 7;
}



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

undefined4 FUN_0001cca0(int param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  byte bVar6;
  
  bVar6 = 0;
  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);
  *param_2 = puVar1;
  if (puVar1 != (undefined4 *)0x0) {
    puVar1[0xd] = 0;
    *puVar1 = 0;
    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);
    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;
        uVar2 != 0; uVar2 = uVar2 - 1) {
      *puVar5 = 0;
      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
    }
    iVar3 = *(uint *)(param_1 + 0x1c) + 1;
    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));
    *(int *)(param_1 + 0x1c) = iVar3;
    *(int *)(param_1 + 0x20) = iVar4;
    puVar1[1] = iVar3;
    puVar1[2] = iVar4;
    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);
    *(undefined4 **)(param_1 + 0x18) = puVar1;
    return 0;
  }
  return 7;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00017230
ADD EBX,0x15f17c
SUB ESP,0xc
PUSH 0x38
CALL 0x0005bfa0
MOV EDX,EAX
MOV EAX,dword ptr [ESP + 0x24]
ADD ESP,0x10
MOV dword ptr [EAX],EDX
TEST EDX,EDX
JZ 0x0001cd18
LEA EDI,[EDX + 0x4]
MOV ECX,EDX
XOR EAX,EAX
MOV dword ptr [EDX + 0x34],0x0
AND EDI,0xfffffffc
MOV dword ptr [EDX],0x0
SUB ECX,EDI
ADD ECX,0x38
SHR ECX,0x2
STOSD.REP ES:EDI
MOV ECX,dword ptr [ESI + 0x1c]
MOV EBX,dword ptr [ESI + 0x20]
ADD ECX,0x1
ADC EBX,0x0
MOV dword ptr [ESI + 0x1c],ECX
MOV dword ptr [ESI + 0x20],EBX
MOV dword ptr [EDX + 0x4],ECX
MOV dword ptr [EDX + 0x8],EBX
MOV EAX,dword ptr [ESI + 0x18]
MOV dword ptr [EDX + 0x34],EAX
XOR EAX,EAX
MOV dword ptr [ESI + 0x18],EDX
POP EBX
POP ESI
POP EDI
RET
POP EBX
MOV EAX,0x7
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001cca0(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}\n\n" comment (function_definition "undefined4 FUN_0001cca0(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_0001cca0(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar1 = (undefined4 *)FUN_0005bfa0(0x38);" (assignment_expression "puVar1 = (undefined4 *)FUN_0005bfa0(0x38)" identifier = (cast_expression "(undefined4 *)FUN_0005bfa0(0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0005bfa0(0x38)" identifier (argument_list "(0x38)" ( number_literal ))))) ;) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" { (expression_statement "puVar1[0xd] = 0;" (assignment_expression "puVar1[0xd] = 0" (subscript_expression "puVar1[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" for ( (assignment_expression "uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar2 != 0" identifier != number_literal) ; (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" identifier + (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "iVar3 = *(uint *)(param_1 + 0x1c) + 1;" (assignment_expression "iVar3 = *(uint *)(param_1 + 0x1c) + 1" identifier = (binary_expression "*(uint *)(param_1 + 0x1c) + 1" (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));" (assignment_expression "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" identifier = (binary_expression "*(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + (call_expression "(uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < *(uint *)(param_1 + 0x1c))" ( (binary_expression "0xfffffffe < *(uint *)(param_1 + 0x1c)" number_literal < (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))))) ;) (expression_statement "*(int *)(param_1 + 0x1c) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar3" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x20) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar4" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[1] = iVar3;" (assignment_expression "puVar1[1] = iVar3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[2] = iVar4;" (assignment_expression "puVar1[2] = iVar4" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18)" (subscript_expression "puVar1[0xd]" identifier [ number_literal ]) = (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x18) = puVar1;" (assignment_expression "*(undefined4 **)(param_1 + 0x18) = puVar1" (pointer_expression "*(undefined4 **)(param_1 + 0x18)" * (cast_expression "(undefined4 **)(param_1 + 0x18)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint zipfileOpen(sqlite3_vtab *p,sqlite3_vtab_cursor **ppCsr)\n\n{\n  char *pcVar1;\n  sqlite3_module *psVar2;\n  uint uVar3;\n  _func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *p_Var4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  psVar2 = (sqlite3_module *)sqlite3_malloc(0x38);\n  *ppCsr = (sqlite3_vtab_cursor *)psVar2;\n  if (psVar2 != (sqlite3_module *)0x0) {\n    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;\n    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);\n    psVar2->iVersion = 0;\n    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;\n    for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    uVar3 = p[2].nRef;\n    pcVar1 = p[2].zErrMsg;\n    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);\n    p[2].nRef = (int)p_Var4;\n    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);\n    psVar2->xCreate = p_Var4;\n    psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));\n    psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;\n    p[2].pModule = psVar2;\n    return 0;\n  }\n  return 7;\n}\n\n" comment (function_definition "int zipfileOpen(sqlite3_vtab *p,sqlite3_vtab_cursor **ppCsr)\n\n{\n  char *pcVar1;\n  sqlite3_module *psVar2;\n  uint uVar3;\n  _func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *p_Var4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  psVar2 = (sqlite3_module *)sqlite3_malloc(0x38);\n  *ppCsr = (sqlite3_vtab_cursor *)psVar2;\n  if (psVar2 != (sqlite3_module *)0x0) {\n    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;\n    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);\n    psVar2->iVersion = 0;\n    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;\n    for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    uVar3 = p[2].nRef;\n    pcVar1 = p[2].zErrMsg;\n    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);\n    p[2].nRef = (int)p_Var4;\n    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);\n    psVar2->xCreate = p_Var4;\n    psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));\n    psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;\n    p[2].pModule = psVar2;\n    return 0;\n  }\n  return 7;\n}" primitive_type (function_declarator "zipfileOpen(sqlite3_vtab *p,sqlite3_vtab_cursor **ppCsr)" identifier (parameter_list "(sqlite3_vtab *p,sqlite3_vtab_cursor **ppCsr)" ( (parameter_declaration "sqlite3_vtab *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "sqlite3_vtab_cursor **ppCsr" type_identifier (pointer_declarator "**ppCsr" * (pointer_declarator "*ppCsr" * identifier))) ))) (compound_statement "{\n  char *pcVar1;\n  sqlite3_module *psVar2;\n  uint uVar3;\n  _func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *p_Var4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  psVar2 = (sqlite3_module *)sqlite3_malloc(0x38);\n  *ppCsr = (sqlite3_vtab_cursor *)psVar2;\n  if (psVar2 != (sqlite3_module *)0x0) {\n    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;\n    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);\n    psVar2->iVersion = 0;\n    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;\n    for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    uVar3 = p[2].nRef;\n    pcVar1 = p[2].zErrMsg;\n    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);\n    p[2].nRef = (int)p_Var4;\n    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);\n    psVar2->xCreate = p_Var4;\n    psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));\n    psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;\n    p[2].pModule = psVar2;\n    return 0;\n  }\n  return 7;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "sqlite3_module *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *p_Var4;" type_identifier (pointer_declarator "*p_Var4" * identifier) ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (expression_statement "psVar2 = (sqlite3_module *)sqlite3_malloc(0x38);" (assignment_expression "psVar2 = (sqlite3_module *)sqlite3_malloc(0x38)" identifier = (cast_expression "(sqlite3_module *)sqlite3_malloc(0x38)" ( (type_descriptor "sqlite3_module *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_malloc(0x38)" identifier (argument_list "(0x38)" ( number_literal ))))) ;) (expression_statement "*ppCsr = (sqlite3_vtab_cursor *)psVar2;" (assignment_expression "*ppCsr = (sqlite3_vtab_cursor *)psVar2" (pointer_expression "*ppCsr" * identifier) = (cast_expression "(sqlite3_vtab_cursor *)psVar2" ( (type_descriptor "sqlite3_vtab_cursor *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (psVar2 != (sqlite3_module *)0x0) {\n    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;\n    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);\n    psVar2->iVersion = 0;\n    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;\n    for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    uVar3 = p[2].nRef;\n    pcVar1 = p[2].zErrMsg;\n    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);\n    p[2].nRef = (int)p_Var4;\n    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);\n    psVar2->xCreate = p_Var4;\n    psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));\n    psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;\n    p[2].pModule = psVar2;\n    return 0;\n  }" if (parenthesized_expression "(psVar2 != (sqlite3_module *)0x0)" ( (binary_expression "psVar2 != (sqlite3_module *)0x0" identifier != (cast_expression "(sqlite3_module *)0x0" ( (type_descriptor "sqlite3_module *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;\n    puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);\n    psVar2->iVersion = 0;\n    uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;\n    for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    uVar3 = p[2].nRef;\n    pcVar1 = p[2].zErrMsg;\n    p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);\n    p[2].nRef = (int)p_Var4;\n    p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);\n    psVar2->xCreate = p_Var4;\n    psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));\n    psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;\n    p[2].pModule = psVar2;\n    return 0;\n  }" { (expression_statement "psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0;" (assignment_expression "psVar2->xUpdate = (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0" (field_expression "psVar2->xUpdate" identifier -> field_identifier) = (cast_expression "(_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)0x0" ( (type_descriptor "_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)&psVar2->xCreate & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)&psVar2->xCreate & 0xfffffffc)" ( (binary_expression "(uint)&psVar2->xCreate & 0xfffffffc" (binary_expression "(uint)&psVar2->xCreate" (parenthesized_expression "(uint)" ( identifier )) & (field_expression "psVar2->xCreate" identifier -> field_identifier)) & number_literal) )))) ;) (expression_statement "psVar2->iVersion = 0;" (assignment_expression "psVar2->iVersion = 0" (field_expression "psVar2->iVersion" identifier -> field_identifier) = number_literal) ;) (expression_statement "uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2;" (assignment_expression "uVar3 = (uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2" identifier = (binary_expression "(uint)((int)psVar2 + (0x38 - (int)puVar5)) >> 2" (call_expression "(uint)((int)psVar2 + (0x38 - (int)puVar5))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)psVar2 + (0x38 - (int)puVar5))" ( (binary_expression "(int)psVar2 + (0x38 - (int)puVar5)" (cast_expression "(int)psVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x38 - (int)puVar5)" ( (binary_expression "0x38 - (int)puVar5" number_literal - (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal)) ;) (for_statement "for (; uVar3 != 0; uVar3 = uVar3 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" for ( ; (binary_expression "uVar3 != 0" identifier != number_literal) ; (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" identifier + (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "uVar3 = p[2].nRef;" (assignment_expression "uVar3 = p[2].nRef" identifier = (field_expression "p[2].nRef" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "pcVar1 = p[2].zErrMsg;" (assignment_expression "pcVar1 = p[2].zErrMsg" identifier = (field_expression "p[2].zErrMsg" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier)) ;) (expression_statement "p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1);" (assignment_expression "p_Var4 = (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1)" identifier = (cast_expression "(_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n             (uVar3 + 1)" ( (type_descriptor "_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar3 + 1)" ( (binary_expression "uVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "p[2].nRef = (int)p_Var4;" (assignment_expression "p[2].nRef = (int)p_Var4" (field_expression "p[2].nRef" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(int)p_Var4" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3);" (assignment_expression "p[2].zErrMsg = pcVar1 + (0xfffffffe < uVar3)" (field_expression "p[2].zErrMsg" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier) = (binary_expression "pcVar1 + (0xfffffffe < uVar3)" identifier + (parenthesized_expression "(0xfffffffe < uVar3)" ( (binary_expression "0xfffffffe < uVar3" number_literal < identifier) )))) ;) (expression_statement "psVar2->xCreate = p_Var4;" (assignment_expression "psVar2->xCreate = p_Var4" (field_expression "psVar2->xCreate" identifier -> field_identifier) = identifier) ;) (expression_statement "psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3));" (assignment_expression "psVar2->xConnect =\n         (_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3))" (field_expression "psVar2->xConnect" identifier -> field_identifier) = (cast_expression "(_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *)\n         (pcVar1 + (0xfffffffe < uVar3))" ( (type_descriptor "_func_int_sqlite3_ptr_void_ptr_int_char_ptr_ptr_sqlite3_vtab_ptr_ptr_char_ptr_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar1 + (0xfffffffe < uVar3))" ( (binary_expression "pcVar1 + (0xfffffffe < uVar3)" identifier + (parenthesized_expression "(0xfffffffe < uVar3)" ( (binary_expression "0xfffffffe < uVar3" number_literal < identifier) ))) )))) ;) (expression_statement "psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule;" (assignment_expression "psVar2->xUpdate =\n         (_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule" (field_expression "psVar2->xUpdate" identifier -> field_identifier) = (cast_expression "(_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *)p[2].pModule" ( (type_descriptor "_func_int_sqlite3_vtab_ptr_int_sqlite3_value_ptr_ptr_sqlite3_int64_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "p[2].pModule" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier))) ;) (expression_statement "p[2].pModule = psVar2;" (assignment_expression "p[2].pModule = psVar2" (field_expression "p[2].pModule" (subscript_expression "p[2]" identifier [ number_literal ]) . field_identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0001cca0(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}\n\n" (function_definition "undefined4 FUN_0001cca0(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" type_identifier (function_declarator "FUN_0001cca0(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "byte bVar6;" type_identifier identifier ;) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar1 = (undefined4 *)FUN_0005bfa0(0x38);" (assignment_expression "puVar1 = (undefined4 *)FUN_0005bfa0(0x38)" identifier = (cast_expression "(undefined4 *)FUN_0005bfa0(0x38)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0005bfa0(0x38)" identifier (argument_list "(0x38)" ( number_literal ))))) ;) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" if (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" ( (binary_expression "puVar1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" { (expression_statement "puVar1[0xd] = 0;" (assignment_expression "puVar1[0xd] = 0" (subscript_expression "puVar1[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" for ( (assignment_expression "uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar2 != 0" identifier != number_literal) ; (assignment_expression "uVar2 = uVar2 - 1" identifier = (binary_expression "uVar2 - 1" identifier - number_literal)) ) (compound_statement "{\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" identifier = (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" identifier + (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "iVar3 = *(uint *)(param_1 + 0x1c) + 1;" (assignment_expression "iVar3 = *(uint *)(param_1 + 0x1c) + 1" identifier = (binary_expression "*(uint *)(param_1 + 0x1c) + 1" (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));" (assignment_expression "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" identifier = (binary_expression "*(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) + (call_expression "(uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < *(uint *)(param_1 + 0x1c))" ( (binary_expression "0xfffffffe < *(uint *)(param_1 + 0x1c)" number_literal < (pointer_expression "*(uint *)(param_1 + 0x1c)" * (cast_expression "(uint *)(param_1 + 0x1c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) ))))) ;) (expression_statement "*(int *)(param_1 + 0x1c) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar3" (pointer_expression "*(int *)(param_1 + 0x1c)" * (cast_expression "(int *)(param_1 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x20) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar4" (pointer_expression "*(int *)(param_1 + 0x20)" * (cast_expression "(int *)(param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[1] = iVar3;" (assignment_expression "puVar1[1] = iVar3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[2] = iVar4;" (assignment_expression "puVar1[2] = iVar4" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18)" (subscript_expression "puVar1[0xd]" identifier [ number_literal ]) = (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(param_1 + 0x18) = puVar1;" (assignment_expression "*(undefined4 **)(param_1 + 0x18) = puVar1" (pointer_expression "*(undefined4 **)(param_1 + 0x18)" * (cast_expression "(undefined4 **)(param_1 + 0x18)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 7;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ))) ))) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0001cca0(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001cca0(int param_1,undefined4 *param_2)" (identifier "FUN_0001cca0") (parameter_list "(int param_1,undefined4 *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  byte bVar6;\n  \n  bVar6 = 0;\n  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);\n  *param_2 = puVar1;\n  if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }\n  return 7;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "byte bVar6;" (type_identifier "byte") (identifier "bVar6") (; ";")) (expression_statement "bVar6 = 0;" (assignment_expression "bVar6 = 0" (identifier "bVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1 = (undefined4 *)FUN_0005bfa0(0x38);" (assignment_expression "puVar1 = (undefined4 *)FUN_0005bfa0(0x38)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_0005bfa0(0x38)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0005bfa0(0x38)" (identifier "FUN_0005bfa0") (argument_list "(0x38)" (( "(") (number_literal "0x38") () ")"))))) (; ";")) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "puVar1")) (; ";")) (if_statement "if (puVar1 != (undefined4 *)0x0) {\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined4 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar1[0xd] = 0;\n    *puVar1 = 0;\n    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }\n    iVar3 = *(uint *)(param_1 + 0x1c) + 1;\n    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));\n    *(int *)(param_1 + 0x1c) = iVar3;\n    *(int *)(param_1 + 0x20) = iVar4;\n    puVar1[1] = iVar3;\n    puVar1[2] = iVar4;\n    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);\n    *(undefined4 **)(param_1 + 0x18) = puVar1;\n    return 0;\n  }" ({ "{") (expression_statement "puVar1[0xd] = 0;" (assignment_expression "puVar1[0xd] = 0" (subscript_expression "puVar1[0xd]" (identifier "puVar1") ([ "[") (number_literal "0xd") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n        uVar2 != 0; uVar2 = uVar2 - 1) {\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" (for "for") (( "(") (assignment_expression "uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (identifier "uVar2") (= "=") (binary_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (( "(") (binary_expression "(int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (parenthesized_expression "(0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (( "(") (binary_expression "0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" (number_literal "0x38") (- "-") (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) () ")"))) () ")"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar2 = uVar2 - 1" (identifier "uVar2") (= "=") (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n      *puVar5 = 0;\n      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;\n    }" ({ "{") (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = puVar5 + (uint)bVar6 * -2 + 1;" (assignment_expression "puVar5 = puVar5 + (uint)bVar6 * -2 + 1" (identifier "puVar5") (= "=") (binary_expression "puVar5 + (uint)bVar6 * -2 + 1" (binary_expression "puVar5 + (uint)bVar6 * -2" (identifier "puVar5") (+ "+") (binary_expression "(uint)bVar6 * -2" (cast_expression "(uint)bVar6" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar6")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar3 = *(uint *)(param_1 + 0x1c) + 1;" (assignment_expression "iVar3 = *(uint *)(param_1 + 0x1c) + 1" (identifier "iVar3") (= "=") (binary_expression "*(uint *)(param_1 + 0x1c) + 1" (pointer_expression "*(uint *)(param_1 + 0x1c)" (* "*") (cast_expression "(uint *)(param_1 + 0x1c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));" (assignment_expression "iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (identifier "iVar4") (= "=") (binary_expression "*(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (+ "+") (call_expression "(uint)(0xfffffffe < *(uint *)(param_1 + 0x1c))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xfffffffe < *(uint *)(param_1 + 0x1c))" (( "(") (binary_expression "0xfffffffe < *(uint *)(param_1 + 0x1c)" (number_literal "0xfffffffe") (< "<") (pointer_expression "*(uint *)(param_1 + 0x1c)" (* "*") (cast_expression "(uint *)(param_1 + 0x1c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x1c) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x1c) = iVar3" (pointer_expression "*(int *)(param_1 + 0x1c)" (* "*") (cast_expression "(int *)(param_1 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(int *)(param_1 + 0x20) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x20) = iVar4" (pointer_expression "*(int *)(param_1 + 0x20)" (* "*") (cast_expression "(int *)(param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "puVar1[1] = iVar3;" (assignment_expression "puVar1[1] = iVar3" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "puVar1[2] = iVar4;" (assignment_expression "puVar1[2] = iVar4" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "puVar1[0xd] = *(undefined4 *)(param_1 + 0x18)" (subscript_expression "puVar1[0xd]" (identifier "puVar1") ([ "[") (number_literal "0xd") (] "]")) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(param_1 + 0x18) = puVar1;" (assignment_expression "*(undefined4 **)(param_1 + 0x18) = puVar1" (pointer_expression "*(undefined4 **)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 **)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return 7;" (return "return") (number_literal "7") (; ";")) (} "}")))

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

int function_1(type_1 *p,type_2 **ppCsr)

{
  char *var_5;
  type_3 *var_2;
  type_4 var_3;
  type_5 *p_Var4;
  type_6 *var_4;
  type_7 bVar6;
  
  bVar6 = 0;
  var_2 = (type_3 *)var_1(0x38);
  *ppCsr = (type_2 *)var_2;
  if (var_2 != (type_3 *)0x0) {
    var_2->xUpdate = (type_8 *)0x0;
    var_4 = (type_6 *)((type_4)&var_2->xCreate & 0xfffffffc);
    var_2->iVersion = 0;
    var_3 = (type_4)((int)var_2 + (0x38 - (int)var_4)) >> 2;
    for (; var_3 != 0; var_3 = var_3 - 1) {
      *var_4 = 0;
      var_4 = var_4 + (type_4)bVar6 * -2 + 1;
    }
    var_3 = p[2].nRef;
    var_5 = p[2].zErrMsg;
    p_Var4 = (type_5 *)
             (var_3 + 1);
    p[2].nRef = (int)p_Var4;
    p[2].zErrMsg = var_5 + (0xfffffffe < var_3);
    var_2->xCreate = p_Var4;
    var_2->xConnect =
         (type_5 *)
         (var_5 + (0xfffffffe < var_3));
    var_2->xUpdate =
         (type_8 *)p[2].pModule;
    p[2].pModule = var_2;
    return 0;
  }
  return 7;
}


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

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

undefined4 MASKED(int param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  undefined4 *puVar5;
  byte bVar6;
  
  bVar6 = 0;
  puVar1 = (undefined4 *)FUN_0005bfa0(0x38);
  *param_2 = puVar1;
  if (puVar1 != (undefined4 *)0x0) {
    puVar1[0xd] = 0;
    *puVar1 = 0;
    puVar5 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);
    for (uVar2 = (uint)((int)puVar1 + (0x38 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;
        uVar2 != 0; uVar2 = uVar2 - 1) {
      *puVar5 = 0;
      puVar5 = puVar5 + (uint)bVar6 * -2 + 1;
    }
    iVar3 = *(uint *)(param_1 + 0x1c) + 1;
    iVar4 = *(int *)(param_1 + 0x20) + (uint)(0xfffffffe < *(uint *)(param_1 + 0x1c));
    *(int *)(param_1 + 0x1c) = iVar3;
    *(int *)(param_1 + 0x20) = iVar4;
    puVar1[1] = iVar3;
    puVar1[2] = iVar4;
    puVar1[0xd] = *(undefined4 *)(param_1 + 0x18);
    *(undefined4 **)(param_1 + 0x18) = puVar1;
    return 0;
  }
  return 7;
}

