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

void last_valueFinalizeFunc(sqlite3_context *pCtx)

{
  undefined4 *puVar1;
  
  puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8);
  if ((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)) {
    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);
    sqlite3_value_free((sqlite3_value *)*puVar1);
    *puVar1 = 0;
  }
  return;
}



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

void FUN_00042920(undefined4 param_1)

{
  int *piVar1;
  
  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);
  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {
    sqlite3_result_value(param_1,*piVar1);
    sqlite3_value_free(*piVar1);
    *piVar1 = 0;
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x0001d810
ADD EBX,0x9b6d4
SUB ESP,0x8
PUSH 0x8
PUSH EDI
CALL 0x00016750
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00042967
MOV ESI,EAX
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x00042967
SUB ESP,0x8
PUSH EAX
PUSH EDI
CALL 0x00016940
POP EAX
PUSH dword ptr [ESI]
CALL 0x00016930
MOV dword ptr [ESI],0x0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00042920(undefined4 param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00042920(undefined4 param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00042920(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)sqlite3_aggregate_context(param_1,8);" (assignment_expression "piVar1 = (int *)sqlite3_aggregate_context(param_1,8)" identifier = (cast_expression "(int *)sqlite3_aggregate_context(param_1,8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(param_1,8)" identifier (argument_list "(param_1,8)" ( identifier , number_literal ))))) ;) (if_statement "if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar1 != 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (*piVar1 != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) ))) )) (compound_statement "{\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" { (expression_statement "sqlite3_result_value(param_1,*piVar1);" (call_expression "sqlite3_result_value(param_1,*piVar1)" identifier (argument_list "(param_1,*piVar1)" ( identifier , (pointer_expression "*piVar1" * identifier) ))) ;) (expression_statement "sqlite3_value_free(*piVar1);" (call_expression "sqlite3_value_free(*piVar1)" identifier (argument_list "(*piVar1)" ( (pointer_expression "*piVar1" * identifier) ))) ;) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) })) (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 last_valueFinalizeFunc(sqlite3_context *pCtx)\n\n{\n  undefined4 *puVar1;\n  \n  puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8);\n  if ((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)) {\n    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);\n    sqlite3_value_free((sqlite3_value *)*puVar1);\n    *puVar1 = 0;\n  }\n  return;\n}\n\n" comment comment (function_definition "void last_valueFinalizeFunc(sqlite3_context *pCtx)\n\n{\n  undefined4 *puVar1;\n  \n  puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8);\n  if ((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)) {\n    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);\n    sqlite3_value_free((sqlite3_value *)*puVar1);\n    *puVar1 = 0;\n  }\n  return;\n}" primitive_type (function_declarator "last_valueFinalizeFunc(sqlite3_context *pCtx)" identifier (parameter_list "(sqlite3_context *pCtx)" ( (parameter_declaration "sqlite3_context *pCtx" type_identifier (pointer_declarator "*pCtx" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  \n  puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8);\n  if ((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)) {\n    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);\n    sqlite3_value_free((sqlite3_value *)*puVar1);\n    *puVar1 = 0;\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (expression_statement "puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8);" (assignment_expression "puVar1 = (undefined4 *)sqlite3_aggregate_context(pCtx,8)" identifier = (cast_expression "(undefined4 *)sqlite3_aggregate_context(pCtx,8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(pCtx,8)" identifier (argument_list "(pCtx,8)" ( identifier , number_literal ))))) ;) (if_statement "if ((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)) {\n    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);\n    sqlite3_value_free((sqlite3_value *)*puVar1);\n    *puVar1 = 0;\n  }" if (parenthesized_expression "((puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0))" ( (binary_expression "(puVar1 != (undefined4 *)0x0) && ((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)" (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)) )) && (parenthesized_expression "((sqlite3_value *)*puVar1 != (sqlite3_value *)0x0)" ( (binary_expression "(sqlite3_value *)*puVar1 != (sqlite3_value *)0x0" (cast_expression "(sqlite3_value *)*puVar1" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier)) != (cast_expression "(sqlite3_value *)0x0" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);\n    sqlite3_value_free((sqlite3_value *)*puVar1);\n    *puVar1 = 0;\n  }" { (expression_statement "sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1);" (call_expression "sqlite3_result_value(pCtx,(sqlite3_value *)*puVar1)" identifier (argument_list "(pCtx,(sqlite3_value *)*puVar1)" ( identifier , (cast_expression "(sqlite3_value *)*puVar1" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier)) ))) ;) (expression_statement "sqlite3_value_free((sqlite3_value *)*puVar1);" (call_expression "sqlite3_value_free((sqlite3_value *)*puVar1)" identifier (argument_list "((sqlite3_value *)*puVar1)" ( (cast_expression "(sqlite3_value *)*puVar1" ( (type_descriptor "sqlite3_value *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier)) ))) ;) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00042920(undefined4 param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00042920(undefined4 param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00042920(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)sqlite3_aggregate_context(param_1,8);" (assignment_expression "piVar1 = (int *)sqlite3_aggregate_context(param_1,8)" identifier = (cast_expression "(int *)sqlite3_aggregate_context(param_1,8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sqlite3_aggregate_context(param_1,8)" identifier (argument_list "(param_1,8)" ( identifier , number_literal ))))) ;) (if_statement "if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar1 != 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (*piVar1 != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) ))) )) (compound_statement "{\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" { (expression_statement "sqlite3_result_value(param_1,*piVar1);" (call_expression "sqlite3_result_value(param_1,*piVar1)" identifier (argument_list "(param_1,*piVar1)" ( identifier , (pointer_expression "*piVar1" * identifier) ))) ;) (expression_statement "sqlite3_value_free(*piVar1);" (call_expression "sqlite3_value_free(*piVar1)" identifier (argument_list "(*piVar1)" ( (pointer_expression "*piVar1" * identifier) ))) ;) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" * identifier) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00042920(undefined4 param_1)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00042920(undefined4 param_1)" (identifier "FUN_00042920") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);\n  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (expression_statement "piVar1 = (int *)sqlite3_aggregate_context(param_1,8);" (assignment_expression "piVar1 = (int *)sqlite3_aggregate_context(param_1,8)" (identifier "piVar1") (= "=") (cast_expression "(int *)sqlite3_aggregate_context(param_1,8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "sqlite3_aggregate_context(param_1,8)" (identifier "sqlite3_aggregate_context") (argument_list "(param_1,8)" (( "(") (identifier "param_1") (, ",") (number_literal "8") () ")"))))) (; ";")) (if_statement "if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" (if "if") (parenthesized_expression "((piVar1 != (int *)0x0) && (*piVar1 != 0))" (( "(") (binary_expression "(piVar1 != (int *)0x0) && (*piVar1 != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*piVar1 != 0)" (( "(") (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    sqlite3_result_value(param_1,*piVar1);\n    sqlite3_value_free(*piVar1);\n    *piVar1 = 0;\n  }" ({ "{") (expression_statement "sqlite3_result_value(param_1,*piVar1);" (call_expression "sqlite3_result_value(param_1,*piVar1)" (identifier "sqlite3_result_value") (argument_list "(param_1,*piVar1)" (( "(") (identifier "param_1") (, ",") (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) () ")"))) (; ";")) (expression_statement "sqlite3_value_free(*piVar1);" (call_expression "sqlite3_value_free(*piVar1)" (identifier "sqlite3_value_free") (argument_list "(*piVar1)" (( "(") (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) () ")"))) (; ";")) (expression_statement "*piVar1 = 0;" (assignment_expression "*piVar1 = 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (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 *pCtx)

{
  type_2 *var_2;
  
  var_2 = (type_2 *)var_1(pCtx,8);
  if ((var_2 != (type_2 *)0x0) && ((type_3 *)*var_2 != (type_3 *)0x0)) {
    var_3(pCtx,(type_3 *)*var_2);
    var_4((type_3 *)*var_2);
    *var_2 = 0;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (return_statement))))

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

void MASKED(undefined4 param_1)

{
  int *piVar1;
  
  piVar1 = (int *)sqlite3_aggregate_context(param_1,8);
  if ((piVar1 != (int *)0x0) && (*piVar1 != 0)) {
    sqlite3_result_value(param_1,*piVar1);
    sqlite3_value_free(*piVar1);
    *piVar1 = 0;
  }
  return;
}

