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

void statInit(sqlite3_context *context,int argc,sqlite3_value **argv)

{
  int iVar1;
  int iVar2;
  sqlite3 *db;
  undefined4 *z;
  sqlite3_context *psVar3;
  undefined4 in_stack_ffffffc8;
  
  iVar1 = sqlite3_value_int(*argv);
  iVar2 = sqlite3_value_int(argv[1]);
  psVar3 = context;
  db = sqlite3_context_db_handle(context);
  z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3));
  if (z != (undefined4 *)0x0) {
    z[0xe] = db;
    z[6] = z + 0xf;
    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);
    z[2] = iVar1;
    *z = 0;
    z[3] = iVar2;
    sqlite3_result_blob(context,z,0x3c,stat4Destructor);
    return;
  }
  sqlite3_result_error_nomem(context);
  return;
}



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

void FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  iVar1 = FUN_0002d340(*param_3);
  uVar2 = FUN_0002d340(param_3[1]);
  uVar3 = FUN_0001d2d0(param_1);
  puVar4 = (undefined4 *)FUN_00028410();
  if (puVar4 != (undefined4 *)0x0) {
    puVar4[0xe] = uVar3;
    puVar4[6] = puVar4 + 0xf;
    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);
    puVar4[2] = iVar1;
    *puVar4 = 0;
    puVar4[3] = uVar2;
    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);
    return;
  }
  FUN_00029080(param_1);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014d20
ADD EBX,0x1032eb
SUB ESP,0x28
MOV ESI,dword ptr [ESP + 0x44]
PUSH dword ptr [ESI]
CALL 0x0002d340
MOV EDI,EAX
POP EAX
PUSH dword ptr [ESI + 0x4]
LEA ESI,[EDI + 0x1]
AND ESI,0xfffffffe
CALL 0x0002d340
MOV dword ptr [ESP + 0x1c],EAX
POP EDX
PUSH dword ptr [ESP + 0x3c]
CALL 0x0001d2d0
LEA EDX,[ESI*0x8 + 0x3c]
MOV ECX,EDX
MOV EBP,EAX
SAR ECX,0x1f
CALL 0x00028410
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00047c78
LEA EDX,[EAX + 0x3c]
MOV ECX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX + 0x38],EBP
MOV dword ptr [EAX + 0x18],EDX
LEA EDX,[EDX + ESI*0x4]
MOV dword ptr [EAX + 0x14],EDX
LEA EDX,[EBX + 0xffedc05c]
MOV dword ptr [EAX + 0x8],EDI
MOV dword ptr [EAX],0x0
MOV dword ptr [EAX + 0xc],ECX
PUSH EDX
PUSH 0x3c
PUSH EAX
PUSH dword ptr [ESP + 0x3c]
CALL 0x00047bc0
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x3c]
CALL 0x00029080
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "iVar1 = FUN_0002d340(*param_3);" (assignment_expression "iVar1 = FUN_0002d340(*param_3)" identifier = (call_expression "FUN_0002d340(*param_3)" identifier (argument_list "(*param_3)" ( (pointer_expression "*param_3" * identifier) )))) ;) (expression_statement "uVar2 = FUN_0002d340(param_3[1]);" (assignment_expression "uVar2 = FUN_0002d340(param_3[1])" identifier = (call_expression "FUN_0002d340(param_3[1])" identifier (argument_list "(param_3[1])" ( (subscript_expression "param_3[1]" identifier [ number_literal ]) )))) ;) (expression_statement "uVar3 = FUN_0001d2d0(param_1);" (assignment_expression "uVar3 = FUN_0001d2d0(param_1)" identifier = (call_expression "FUN_0001d2d0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar4 = (undefined4 *)FUN_00028410();" (assignment_expression "puVar4 = (undefined4 *)FUN_00028410()" identifier = (cast_expression "(undefined4 *)FUN_00028410()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028410()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" if (parenthesized_expression "(puVar4 != (undefined4 *)0x0)" ( (binary_expression "puVar4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" { (expression_statement "puVar4[0xe] = uVar3;" (assignment_expression "puVar4[0xe] = uVar3" (subscript_expression "puVar4[0xe]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[6] = puVar4 + 0xf;" (assignment_expression "puVar4[6] = puVar4 + 0xf" (subscript_expression "puVar4[6]" identifier [ number_literal ]) = (binary_expression "puVar4 + 0xf" identifier + number_literal)) ;) (expression_statement "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);" (assignment_expression "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (subscript_expression "puVar4[5]" identifier [ number_literal ]) = (binary_expression "puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (binary_expression "puVar4 + 0xf" identifier + number_literal) + (parenthesized_expression "(iVar1 + 1U & 0xfffffffe)" ( (binary_expression "iVar1 + 1U & 0xfffffffe" (binary_expression "iVar1 + 1U" identifier + number_literal) & number_literal) )))) ;) (expression_statement "puVar4[2] = iVar1;" (assignment_expression "puVar4[2] = iVar1" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[3] = uVar2;" (assignment_expression "puVar4[3] = uVar2" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);" (call_expression "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30)" identifier (argument_list "(param_1,puVar4,0x3c,FUN_00026f30)" ( identifier , identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00029080(param_1);" (call_expression "FUN_00029080(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid statInit(sqlite3_context *context,int argc,sqlite3_value **argv)\n\n{\n  int iVar1;\n  int iVar2;\n  sqlite3 *db;\n  undefined4 *z;\n  sqlite3_context *psVar3;\n  undefined4 in_stack_ffffffc8;\n  \n  iVar1 = sqlite3_value_int(*argv);\n  iVar2 = sqlite3_value_int(argv[1]);\n  psVar3 = context;\n  db = sqlite3_context_db_handle(context);\n  z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3));\n  if (z != (undefined4 *)0x0) {\n    z[0xe] = db;\n    z[6] = z + 0xf;\n    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);\n    z[2] = iVar1;\n    *z = 0;\n    z[3] = iVar2;\n    sqlite3_result_blob(context,z,0x3c,stat4Destructor);\n    return;\n  }\n  sqlite3_result_error_nomem(context);\n  return;\n}\n\n" comment comment (function_definition "void statInit(sqlite3_context *context,int argc,sqlite3_value **argv)\n\n{\n  int iVar1;\n  int iVar2;\n  sqlite3 *db;\n  undefined4 *z;\n  sqlite3_context *psVar3;\n  undefined4 in_stack_ffffffc8;\n  \n  iVar1 = sqlite3_value_int(*argv);\n  iVar2 = sqlite3_value_int(argv[1]);\n  psVar3 = context;\n  db = sqlite3_context_db_handle(context);\n  z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3));\n  if (z != (undefined4 *)0x0) {\n    z[0xe] = db;\n    z[6] = z + 0xf;\n    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);\n    z[2] = iVar1;\n    *z = 0;\n    z[3] = iVar2;\n    sqlite3_result_blob(context,z,0x3c,stat4Destructor);\n    return;\n  }\n  sqlite3_result_error_nomem(context);\n  return;\n}" primitive_type (function_declarator "statInit(sqlite3_context *context,int argc,sqlite3_value **argv)" identifier (parameter_list "(sqlite3_context *context,int argc,sqlite3_value **argv)" ( (parameter_declaration "sqlite3_context *context" type_identifier (pointer_declarator "*context" * identifier)) , (parameter_declaration "int argc" primitive_type identifier) , (parameter_declaration "sqlite3_value **argv" type_identifier (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  sqlite3 *db;\n  undefined4 *z;\n  sqlite3_context *psVar3;\n  undefined4 in_stack_ffffffc8;\n  \n  iVar1 = sqlite3_value_int(*argv);\n  iVar2 = sqlite3_value_int(argv[1]);\n  psVar3 = context;\n  db = sqlite3_context_db_handle(context);\n  z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3));\n  if (z != (undefined4 *)0x0) {\n    z[0xe] = db;\n    z[6] = z + 0xf;\n    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);\n    z[2] = iVar1;\n    *z = 0;\n    z[3] = iVar2;\n    sqlite3_result_blob(context,z,0x3c,stat4Destructor);\n    return;\n  }\n  sqlite3_result_error_nomem(context);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "sqlite3 *db;" type_identifier (pointer_declarator "*db" * identifier) ;) (declaration "undefined4 *z;" type_identifier (pointer_declarator "*z" * identifier) ;) (declaration "sqlite3_context *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "undefined4 in_stack_ffffffc8;" type_identifier identifier ;) (expression_statement "iVar1 = sqlite3_value_int(*argv);" (assignment_expression "iVar1 = sqlite3_value_int(*argv)" identifier = (call_expression "sqlite3_value_int(*argv)" identifier (argument_list "(*argv)" ( (pointer_expression "*argv" * identifier) )))) ;) (expression_statement "iVar2 = sqlite3_value_int(argv[1]);" (assignment_expression "iVar2 = sqlite3_value_int(argv[1])" identifier = (call_expression "sqlite3_value_int(argv[1])" identifier (argument_list "(argv[1])" ( (subscript_expression "argv[1]" identifier [ number_literal ]) )))) ;) (expression_statement "psVar3 = context;" (assignment_expression "psVar3 = context" identifier = identifier) ;) (expression_statement "db = sqlite3_context_db_handle(context);" (assignment_expression "db = sqlite3_context_db_handle(context)" identifier = (call_expression "sqlite3_context_db_handle(context)" identifier (argument_list "(context)" ( identifier )))) ;) (expression_statement "z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3));" (assignment_expression "z = (undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3))" identifier = (cast_expression "(undefined4 *)sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3DbMallocZero(db,CONCAT44(in_stack_ffffffc8,psVar3))" identifier (argument_list "(db,CONCAT44(in_stack_ffffffc8,psVar3))" ( identifier , (call_expression "CONCAT44(in_stack_ffffffc8,psVar3)" identifier (argument_list "(in_stack_ffffffc8,psVar3)" ( identifier , identifier ))) ))))) ;) (if_statement "if (z != (undefined4 *)0x0) {\n    z[0xe] = db;\n    z[6] = z + 0xf;\n    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);\n    z[2] = iVar1;\n    *z = 0;\n    z[3] = iVar2;\n    sqlite3_result_blob(context,z,0x3c,stat4Destructor);\n    return;\n  }" if (parenthesized_expression "(z != (undefined4 *)0x0)" ( (binary_expression "z != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    z[0xe] = db;\n    z[6] = z + 0xf;\n    z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);\n    z[2] = iVar1;\n    *z = 0;\n    z[3] = iVar2;\n    sqlite3_result_blob(context,z,0x3c,stat4Destructor);\n    return;\n  }" { (expression_statement "z[0xe] = db;" (assignment_expression "z[0xe] = db" (subscript_expression "z[0xe]" identifier [ number_literal ]) = identifier) ;) (expression_statement "z[6] = z + 0xf;" (assignment_expression "z[6] = z + 0xf" (subscript_expression "z[6]" identifier [ number_literal ]) = (binary_expression "z + 0xf" identifier + number_literal)) ;) (expression_statement "z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe);" (assignment_expression "z[5] = z + 0xf + (iVar1 + 1U & 0xfffffffe)" (subscript_expression "z[5]" identifier [ number_literal ]) = (binary_expression "z + 0xf + (iVar1 + 1U & 0xfffffffe)" (binary_expression "z + 0xf" identifier + number_literal) + (parenthesized_expression "(iVar1 + 1U & 0xfffffffe)" ( (binary_expression "iVar1 + 1U & 0xfffffffe" (binary_expression "iVar1 + 1U" identifier + number_literal) & number_literal) )))) ;) (expression_statement "z[2] = iVar1;" (assignment_expression "z[2] = iVar1" (subscript_expression "z[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*z = 0;" (assignment_expression "*z = 0" (pointer_expression "*z" * identifier) = number_literal) ;) (expression_statement "z[3] = iVar2;" (assignment_expression "z[3] = iVar2" (subscript_expression "z[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "sqlite3_result_blob(context,z,0x3c,stat4Destructor);" (call_expression "sqlite3_result_blob(context,z,0x3c,stat4Destructor)" identifier (argument_list "(context,z,0x3c,stat4Destructor)" ( identifier , identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "sqlite3_result_error_nomem(context);" (call_expression "sqlite3_result_error_nomem(context)" identifier (argument_list "(context)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}\n\n" (function_definition "void FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "iVar1 = FUN_0002d340(*param_3);" (assignment_expression "iVar1 = FUN_0002d340(*param_3)" identifier = (call_expression "FUN_0002d340(*param_3)" identifier (argument_list "(*param_3)" ( (pointer_expression "*param_3" * identifier) )))) ;) (expression_statement "uVar2 = FUN_0002d340(param_3[1]);" (assignment_expression "uVar2 = FUN_0002d340(param_3[1])" identifier = (call_expression "FUN_0002d340(param_3[1])" identifier (argument_list "(param_3[1])" ( (subscript_expression "param_3[1]" identifier [ number_literal ]) )))) ;) (expression_statement "uVar3 = FUN_0001d2d0(param_1);" (assignment_expression "uVar3 = FUN_0001d2d0(param_1)" identifier = (call_expression "FUN_0001d2d0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar4 = (undefined4 *)FUN_00028410();" (assignment_expression "puVar4 = (undefined4 *)FUN_00028410()" identifier = (cast_expression "(undefined4 *)FUN_00028410()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00028410()" identifier (argument_list "()" ( ))))) ;) (if_statement "if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" if (parenthesized_expression "(puVar4 != (undefined4 *)0x0)" ( (binary_expression "puVar4 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" { (expression_statement "puVar4[0xe] = uVar3;" (assignment_expression "puVar4[0xe] = uVar3" (subscript_expression "puVar4[0xe]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar4[6] = puVar4 + 0xf;" (assignment_expression "puVar4[6] = puVar4 + 0xf" (subscript_expression "puVar4[6]" identifier [ number_literal ]) = (binary_expression "puVar4 + 0xf" identifier + number_literal)) ;) (expression_statement "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);" (assignment_expression "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (subscript_expression "puVar4[5]" identifier [ number_literal ]) = (binary_expression "puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (binary_expression "puVar4 + 0xf" identifier + number_literal) + (parenthesized_expression "(iVar1 + 1U & 0xfffffffe)" ( (binary_expression "iVar1 + 1U & 0xfffffffe" (binary_expression "iVar1 + 1U" identifier + number_literal) & number_literal) )))) ;) (expression_statement "puVar4[2] = iVar1;" (assignment_expression "puVar4[2] = iVar1" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "puVar4[3] = uVar2;" (assignment_expression "puVar4[3] = uVar2" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);" (call_expression "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30)" identifier (argument_list "(param_1,puVar4,0x3c,FUN_00026f30)" ( identifier , identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00029080(param_1);" (call_expression "FUN_00029080(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (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 ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (binary_expression IDENT + LIT) + (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) & LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00047be0(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" (identifier "FUN_00047be0") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  undefined4 *puVar4;\n  \n  iVar1 = FUN_0002d340(*param_3);\n  uVar2 = FUN_0002d340(param_3[1]);\n  uVar3 = FUN_0001d2d0(param_1);\n  puVar4 = (undefined4 *)FUN_00028410();\n  if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }\n  FUN_00029080(param_1);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "iVar1 = FUN_0002d340(*param_3);" (assignment_expression "iVar1 = FUN_0002d340(*param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_0002d340(*param_3)" (identifier "FUN_0002d340") (argument_list "(*param_3)" (( "(") (pointer_expression "*param_3" (* "*") (identifier "param_3")) () ")")))) (; ";")) (expression_statement "uVar2 = FUN_0002d340(param_3[1]);" (assignment_expression "uVar2 = FUN_0002d340(param_3[1])" (identifier "uVar2") (= "=") (call_expression "FUN_0002d340(param_3[1])" (identifier "FUN_0002d340") (argument_list "(param_3[1])" (( "(") (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) () ")")))) (; ";")) (expression_statement "uVar3 = FUN_0001d2d0(param_1);" (assignment_expression "uVar3 = FUN_0001d2d0(param_1)" (identifier "uVar3") (= "=") (call_expression "FUN_0001d2d0(param_1)" (identifier "FUN_0001d2d0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "puVar4 = (undefined4 *)FUN_00028410();" (assignment_expression "puVar4 = (undefined4 *)FUN_00028410()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)FUN_00028410()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00028410()" (identifier "FUN_00028410") (argument_list "()" (( "(") () ")"))))) (; ";")) (if_statement "if (puVar4 != (undefined4 *)0x0) {\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" (if "if") (parenthesized_expression "(puVar4 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar4 != (undefined4 *)0x0" (identifier "puVar4") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar4[0xe] = uVar3;\n    puVar4[6] = puVar4 + 0xf;\n    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);\n    puVar4[2] = iVar1;\n    *puVar4 = 0;\n    puVar4[3] = uVar2;\n    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);\n    return;\n  }" ({ "{") (expression_statement "puVar4[0xe] = uVar3;" (assignment_expression "puVar4[0xe] = uVar3" (subscript_expression "puVar4[0xe]" (identifier "puVar4") ([ "[") (number_literal "0xe") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "puVar4[6] = puVar4 + 0xf;" (assignment_expression "puVar4[6] = puVar4 + 0xf" (subscript_expression "puVar4[6]" (identifier "puVar4") ([ "[") (number_literal "6") (] "]")) (= "=") (binary_expression "puVar4 + 0xf" (identifier "puVar4") (+ "+") (number_literal "0xf"))) (; ";")) (expression_statement "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);" (assignment_expression "puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (subscript_expression "puVar4[5]" (identifier "puVar4") ([ "[") (number_literal "5") (] "]")) (= "=") (binary_expression "puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe)" (binary_expression "puVar4 + 0xf" (identifier "puVar4") (+ "+") (number_literal "0xf")) (+ "+") (parenthesized_expression "(iVar1 + 1U & 0xfffffffe)" (( "(") (binary_expression "iVar1 + 1U & 0xfffffffe" (binary_expression "iVar1 + 1U" (identifier "iVar1") (+ "+") (number_literal "1U")) (& "&") (number_literal "0xfffffffe")) () ")")))) (; ";")) (expression_statement "puVar4[2] = iVar1;" (assignment_expression "puVar4[2] = iVar1" (subscript_expression "puVar4[2]" (identifier "puVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[3] = uVar2;" (assignment_expression "puVar4[3] = uVar2" (subscript_expression "puVar4[3]" (identifier "puVar4") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);" (call_expression "FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30)" (identifier "FUN_00047bc0") (argument_list "(param_1,puVar4,0x3c,FUN_00026f30)" (( "(") (identifier "param_1") (, ",") (identifier "puVar4") (, ",") (number_literal "0x3c") (, ",") (identifier "FUN_00026f30") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00029080(param_1);" (call_expression "FUN_00029080(param_1)" (identifier "FUN_00029080") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *context,int argc,type_2 **argv)

{
  int var_6;
  int iVar2;
  type_3 *db;
  type_4 *var_5;
  type_1 *psVar3;
  type_4 in_stack_ffffffc8;
  
  var_6 = var_1(*argv);
  iVar2 = var_1(argv[1]);
  psVar3 = context;
  db = var_2(context);
  var_5 = (type_4 *)var_3(db,var_4(in_stack_ffffffc8,psVar3));
  if (var_5 != (type_4 *)0x0) {
    var_5[0xe] = db;
    var_5[6] = var_5 + 0xf;
    var_5[5] = var_5 + 0xf + (var_6 + 1U & 0xfffffffe);
    var_5[2] = var_6;
    *var_5 = 0;
    var_5[3] = iVar2;
    var_7(context,var_5,0x3c,stat4Destructor);
    return;
  }
  var_8(context);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) 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: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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))))) (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: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

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

void MASKED(undefined4 param_1,undefined4 param_2,undefined4 *param_3)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  undefined4 *puVar4;
  
  iVar1 = FUN_0002d340(*param_3);
  uVar2 = FUN_0002d340(param_3[1]);
  uVar3 = FUN_0001d2d0(param_1);
  puVar4 = (undefined4 *)FUN_00028410();
  if (puVar4 != (undefined4 *)0x0) {
    puVar4[0xe] = uVar3;
    puVar4[6] = puVar4 + 0xf;
    puVar4[5] = puVar4 + 0xf + (iVar1 + 1U & 0xfffffffe);
    puVar4[2] = iVar1;
    *puVar4 = 0;
    puVar4[3] = uVar2;
    FUN_00047bc0(param_1,puVar4,0x3c,FUN_00026f30);
    return;
  }
  FUN_00029080(param_1);
  return;
}

