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

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

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  DateTime x;
  char zBuf [100];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = isDate(context,argc,argv,&x);
  if (iVar2 == 0) {
    computeYMD_HMS(&x);
    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));
    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_0005d6e0(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_a4 [8];
  undefined4 local_9c;
  undefined4 local_98;
  undefined4 local_94;
  undefined4 local_90;
  undefined4 local_8c;
  double local_84;
  undefined1 local_74 [100];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_0005c330(local_a4);
  if (iVar1 == 0) {
    FUN_000241f0();
    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,
                     local_90,local_8c,(int)ROUND(local_84));
    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001d810
ADD EBX,0x80918
SUB ESP,0xbc
LEA EDI,[ESP + 0x24]
MOV ESI,dword ptr [ESP + 0xcc]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xb8],EAX
XOR EAX,EAX
PUSH EDI
MOV ECX,dword ptr [ESP + 0xd8]
MOV EDX,dword ptr [ESP + 0xd4]
MOV EAX,ESI
CALL 0x0005c330
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0005d793
MOV EAX,EDI
CALL 0x000241f0
SUB ESP,0xc
FNSTCW word ptr [ESP + 0x1a]
MOVZX EAX,word ptr [ESP + 0x1a]
FLD qword ptr [ESP + 0x44]
OR AH,0xc
MOV word ptr [ESP + 0x18],AX
FLDCW word ptr [ESP + 0x18]
FISTP dword ptr [ESP + 0x14]
FLDCW word ptr [ESP + 0x1a]
MOV EAX,dword ptr [ESP + 0x14]
PUSH EAX
LEA EAX,[EBX + 0xfffcc95d]
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH EAX
LEA EDI,[ESP + 0x70]
PUSH EDI
PUSH 0x64
CALL 0x000167c0
ADD ESP,0x30
PUSH -0x1
PUSH -0x1
PUSH EDI
PUSH ESI
CALL 0x00016480
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xac]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0005d7ad
ADD ESP,0xb0
POP EBX
POP ESI
POP EDI
RET
CALL 0x000a9ea0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0005d6e0(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}\n\n" comment (function_definition "void FUN_0005d6e0(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" primitive_type (function_declarator "FUN_0005d6e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a9ea0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_a4 [8];" type_identifier (array_declarator "local_a4 [8]" identifier [ number_literal ]) ;) (declaration "undefined4 local_9c;" type_identifier identifier ;) (declaration "undefined4 local_98;" type_identifier identifier ;) (declaration "undefined4 local_94;" type_identifier identifier ;) (declaration "undefined4 local_90;" type_identifier identifier ;) (declaration "undefined4 local_8c;" type_identifier identifier ;) (declaration "double local_84;" primitive_type identifier ;) (declaration "undefined1 local_74 [100];" type_identifier (array_declarator "local_74 [100]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_0005c330(local_a4);" (assignment_expression "iVar1 = FUN_0005c330(local_a4)" identifier = (call_expression "FUN_0005c330(local_a4)" identifier (argument_list "(local_a4)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" { (expression_statement "FUN_000241f0();" (call_expression "FUN_000241f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));" (call_expression "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" identifier (argument_list "(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" ( number_literal , identifier , (string_literal ""%04d-%02d-%02d %02d:%02d:%02d"" " string_content ") , identifier , identifier , identifier , identifier , identifier , (cast_expression "(int)ROUND(local_84)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(local_84)" identifier (argument_list "(local_84)" ( identifier )))) ))) ;) (expression_statement "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);" (call_expression "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff)" identifier (argument_list "(param_1,local_74,0xffffffff,0xffffffff)" ( identifier , identifier , number_literal , number_literal ))) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid datetimeFunc(sqlite3_context *context,int argc,sqlite3_value **argv)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  DateTime x;\n  char zBuf [100];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = isDate(context,argc,argv,&x);\n  if (iVar2 == 0) {\n    computeYMD_HMS(&x);\n    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));\n    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void datetimeFunc(sqlite3_context *context,int argc,sqlite3_value **argv)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  DateTime x;\n  char zBuf [100];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = isDate(context,argc,argv,&x);\n  if (iVar2 == 0) {\n    computeYMD_HMS(&x);\n    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));\n    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "datetimeFunc(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  int in_GS_OFFSET;\n  DateTime x;\n  char zBuf [100];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = isDate(context,argc,argv,&x);\n  if (iVar2 == 0) {\n    computeYMD_HMS(&x);\n    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));\n    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "DateTime x;" type_identifier identifier ;) (declaration "char zBuf [100];" primitive_type (array_declarator "zBuf [100]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = isDate(context,argc,argv,&x);" (assignment_expression "iVar2 = isDate(context,argc,argv,&x)" identifier = (call_expression "isDate(context,argc,argv,&x)" identifier (argument_list "(context,argc,argv,&x)" ( identifier , identifier , identifier , (pointer_expression "&x" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    computeYMD_HMS(&x);\n    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));\n    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    computeYMD_HMS(&x);\n    sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));\n    sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);\n  }" { (expression_statement "computeYMD_HMS(&x);" (call_expression "computeYMD_HMS(&x)" identifier (argument_list "(&x)" ( (pointer_expression "&x" & identifier) ))) ;) (expression_statement "sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s));" (call_expression "sqlite3_snprintf(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s))" identifier (argument_list "(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)ROUND(x.s))" ( number_literal , identifier , (string_literal ""%04d-%02d-%02d %02d:%02d:%02d"" " string_content ") , (field_expression "x.Y" identifier . field_identifier) , (field_expression "x.M" identifier . field_identifier) , (field_expression "x.D" identifier . field_identifier) , (field_expression "x.h" identifier . field_identifier) , (field_expression "x.m" identifier . field_identifier) , (cast_expression "(int)ROUND(x.s)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(x.s)" identifier (argument_list "(x.s)" ( (field_expression "x.s" identifier . field_identifier) )))) ))) ;) (expression_statement "sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff);" (call_expression "sqlite3_result_text(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff)" identifier (argument_list "(context,zBuf,-1,(_func_void_void_ptr *)&DAT_ffffffff)" ( identifier , identifier , number_literal , (cast_expression "(_func_void_void_ptr *)&DAT_ffffffff" ( (type_descriptor "_func_void_void_ptr *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_ffffffff" & identifier)) ))) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_0005d6e0(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}\n\n" (function_definition "void FUN_0005d6e0(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" primitive_type (function_declarator "FUN_0005d6e0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_a4 [8];" type_identifier (array_declarator "local_a4 [8]" identifier [ number_literal ]) ;) (declaration "undefined4 local_9c;" type_identifier identifier ;) (declaration "undefined4 local_98;" type_identifier identifier ;) (declaration "undefined4 local_94;" type_identifier identifier ;) (declaration "undefined4 local_90;" type_identifier identifier ;) (declaration "undefined4 local_8c;" type_identifier identifier ;) (declaration "double local_84;" primitive_type identifier ;) (declaration "undefined1 local_74 [100];" type_identifier (array_declarator "local_74 [100]" identifier [ number_literal ]) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_0005c330(local_a4);" (assignment_expression "iVar1 = FUN_0005c330(local_a4)" identifier = (call_expression "FUN_0005c330(local_a4)" identifier (argument_list "(local_a4)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" { (expression_statement "FUN_000241f0();" (call_expression "FUN_000241f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));" (call_expression "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" identifier (argument_list "(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" ( number_literal , identifier , (string_literal ""%04d-%02d-%02d %02d:%02d:%02d"" " string_content ") , identifier , identifier , identifier , identifier , identifier , (cast_expression "(int)ROUND(local_84)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(local_84)" identifier (argument_list "(local_84)" ( identifier )))) ))) ;) (expression_statement "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);" (call_expression "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff)" identifier (argument_list "(param_1,local_74,0xffffffff,0xffffffff)" ( identifier , identifier , number_literal , number_literal ))) ;) })) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT , IDENT , IDENT , (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0005d6e0(undefined4 param_1)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" (primitive_type "void") (function_declarator "FUN_0005d6e0(undefined4 param_1)" (identifier "FUN_0005d6e0") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_a4 [8];\n  undefined4 local_9c;\n  undefined4 local_98;\n  undefined4 local_94;\n  undefined4 local_90;\n  undefined4 local_8c;\n  double local_84;\n  undefined1 local_74 [100];\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_0005c330(local_a4);\n  if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a9ea0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_a4 [8];" (type_identifier "undefined1") (array_declarator "local_a4 [8]" (identifier "local_a4") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "undefined4 local_9c;" (type_identifier "undefined4") (identifier "local_9c") (; ";")) (declaration "undefined4 local_98;" (type_identifier "undefined4") (identifier "local_98") (; ";")) (declaration "undefined4 local_94;" (type_identifier "undefined4") (identifier "local_94") (; ";")) (declaration "undefined4 local_90;" (type_identifier "undefined4") (identifier "local_90") (; ";")) (declaration "undefined4 local_8c;" (type_identifier "undefined4") (identifier "local_8c") (; ";")) (declaration "double local_84;" (primitive_type "double") (identifier "local_84") (; ";")) (declaration "undefined1 local_74 [100];" (type_identifier "undefined1") (array_declarator "local_74 [100]" (identifier "local_74") ([ "[") (number_literal "100") (] "]")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = FUN_0005c330(local_a4);" (assignment_expression "iVar1 = FUN_0005c330(local_a4)" (identifier "iVar1") (= "=") (call_expression "FUN_0005c330(local_a4)" (identifier "FUN_0005c330") (argument_list "(local_a4)" (( "(") (identifier "local_a4") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_000241f0();\n    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));\n    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);\n  }" ({ "{") (expression_statement "FUN_000241f0();" (call_expression "FUN_000241f0()" (identifier "FUN_000241f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84));" (call_expression "sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" (identifier "sqlite3_snprintf") (argument_list "(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,\n                     local_90,local_8c,(int)ROUND(local_84))" (( "(") (number_literal "100") (, ",") (identifier "local_74") (, ",") (string_literal ""%04d-%02d-%02d %02d:%02d:%02d"" (" """) (string_content "%04d-%02d-%02d %02d:%02d:%02d") (" """)) (, ",") (identifier "local_9c") (, ",") (identifier "local_98") (, ",") (identifier "local_94") (, ",") (identifier "local_90") (, ",") (identifier "local_8c") (, ",") (cast_expression "(int)ROUND(local_84)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND(local_84)" (identifier "ROUND") (argument_list "(local_84)" (( "(") (identifier "local_84") () ")")))) () ")"))) (; ";")) (expression_statement "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);" (call_expression "sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff)" (identifier "sqlite3_result_text") (argument_list "(param_1,local_74,0xffffffff,0xffffffff)" (( "(") (identifier "param_1") (, ",") (identifier "local_74") (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0xffffffff") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000a9ea0();" (call_expression "FUN_000a9ea0()" (identifier "FUN_000a9ea0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* 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_8;
  int var_3;
  int var_1;
  type_3 x;
  char zBuf [100];
  
  var_8 = *(int *)(var_1 + 0x14);
  var_3 = var_2(context,argc,argv,&x);
  if (var_3 == 0) {
    var_4(&x);
    var_5(100,zBuf,"%04d-%02d-%02d %02d:%02d:%02d",x.Y,x.M,x.D,x.h,x.m,(int)var_6(x.s));
    var_7(context,zBuf,-1,(type_4 *)&DAT_ffffffff);
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


(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: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier) (identifier) (identifier) (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void MASKED(undefined4 param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_a4 [8];
  undefined4 local_9c;
  undefined4 local_98;
  undefined4 local_94;
  undefined4 local_90;
  undefined4 local_8c;
  double local_84;
  undefined1 local_74 [100];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_0005c330(local_a4);
  if (iVar1 == 0) {
    FUN_000241f0();
    sqlite3_snprintf(100,local_74,"%04d-%02d-%02d %02d:%02d:%02d",local_9c,local_98,local_94,
                     local_90,local_8c,(int)ROUND(local_84));
    sqlite3_result_text(param_1,local_74,0xffffffff,0xffffffff);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a9ea0();
}

