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

void colourchoose_response(GtkDialog *dialog,gint response_id,gpointer data)

{
  int iVar1;
  float fVar2;
  undefined4 uVar3;
  int *piVar4;
  int in_GS_OFFSET;
  GdkRGBA rgba;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  uVar3 = g_type_check_instance_cast(dialog,0x50);
  piVar4 = (int *)g_object_get_data(uVar3,"user-data");
  if (response_id == -5) {
    uVar3 = gtk_color_chooser_get_type();
    uVar3 = g_type_check_instance_cast(dialog,uVar3);
    gtk_color_chooser_get_rgba(uVar3,&rgba);
    fVar2 = DAT_00088e40;
    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);
    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);
    *(undefined1 *)((int)data + 0xf) = 1;
    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);
  }
  else {
    *(undefined1 *)((int)data + 0xf) = 0;
  }
  (**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4);
  uVar3 = gtk_widget_get_type();
  uVar3 = g_type_check_instance_cast(dialog,uVar3);
  gtk_widget_destroy(uVar3);
  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_000506a0(undefined4 param_1,int param_2,int param_3)

{
  float fVar1;
  undefined4 uVar2;
  int *piVar3;
  int in_GS_OFFSET;
  double local_44;
  double local_3c;
  double local_34;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x506a9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = g_type_check_instance_cast(param_1,0x50);
  piVar3 = (int *)g_object_get_data(uVar2,"user-data");
  if (param_2 == -5) {
    uVar2 = gtk_color_chooser_get_type();
    uVar2 = g_type_check_instance_cast(param_1,uVar2);
    gtk_color_chooser_get_rgba(uVar2,&local_44);
    fVar1 = DAT_00088e40;
    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);
    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);
    *(undefined1 *)(param_3 + 0xf) = 1;
    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);
  }
  else {
    *(undefined1 *)(param_3 + 0xf) = 0;
  }
  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);
  uVar2 = gtk_widget_get_type();
  uVar2 = g_type_check_instance_cast(param_1,uVar2);
  gtk_widget_destroy(uVar2);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006c950();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a360
ADD EBX,0x6513b
SUB ESP,0x54
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x44],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x68]
MOV ESI,dword ptr [ESP + 0x70]
PUSH 0x50
PUSH EDI
CALL 0x00018580
POP EBP
POP EDX
LEA EDX,[EBX + 0xfffd21be]
PUSH EDX
PUSH EAX
CALL 0x00019e20
ADD ESP,0x10
CMP dword ptr [ESP + 0x64],-0x5
MOV EBP,EAX
JZ 0x00050730
MOV byte ptr [ESI + 0xf],0x0
MOV EAX,dword ptr [EBP]
PUSH 0x4
PUSH dword ptr [ESI + 0x8]
PUSH ESI
PUSH EAX
CALL dword ptr [EAX + 0x10]
CALL 0x00018530
POP EDX
POP ECX
PUSH EAX
PUSH EDI
CALL 0x00018580
MOV dword ptr [ESP],EAX
CALL 0x00019fc0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x3c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x000507b8
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x000183a0
SUB ESP,0x8
PUSH EAX
PUSH EDI
CALL 0x00018580
POP EDX
POP ECX
LEA EDX,[ESP + 0x20]
PUSH EDX
PUSH EAX
CALL 0x00019180
FLD dword ptr [EBX + 0xfffd365c]
FLD qword ptr [ESP + 0x28]
FNSTCW word ptr [ESP + 0x1e]
MOVZX EAX,word ptr [ESP + 0x1e]
FMUL ST1
OR AH,0xc
MOV word ptr [ESP + 0x1c],AX
FLDCW word ptr [ESP + 0x1c]
FISTP dword ptr [ESP + 0x18]
FLDCW word ptr [ESP + 0x1e]
FLD qword ptr [ESP + 0x30]
MOV EAX,dword ptr [ESP + 0x18]
MOV byte ptr [ESI + 0xc],AL
FMUL ST1
FLDCW word ptr [ESP + 0x1c]
FISTP dword ptr [ESP + 0x18]
FLDCW word ptr [ESP + 0x1e]
MOV EAX,dword ptr [ESP + 0x18]
FMUL qword ptr [ESP + 0x38]
MOV byte ptr [ESI + 0xd],AL
FLDCW word ptr [ESP + 0x1c]
FISTP dword ptr [ESP + 0x18]
FLDCW word ptr [ESP + 0x1e]
MOV EAX,dword ptr [ESP + 0x18]
MOV byte ptr [ESI + 0xf],0x1
ADD ESP,0x10
MOV byte ptr [ESI + 0xe],AL
JMP 0x000506ed
CALL 0x0006c950
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000506a0(undefined4 param_1,int param_2,int param_3)\n\n{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006c950();\n}\n\n" comment (function_definition "void FUN_000506a0(undefined4 param_1,int param_2,int param_3)\n\n{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006c950();\n}" primitive_type (function_declarator "FUN_000506a0(undefined4 param_1,int param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006c950();\n}" { (declaration "float fVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double local_44;" primitive_type identifier ;) (declaration "double local_3c;" primitive_type identifier ;) (declaration "double local_34;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x506a9;" (assignment_expression "uStack_14 = 0x506a9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "uVar2 = g_type_check_instance_cast(param_1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,0x50)" identifier = (call_expression "g_type_check_instance_cast(param_1,0x50)" identifier (argument_list "(param_1,0x50)" ( identifier , number_literal )))) ;) (expression_statement "piVar3 = (int *)g_object_get_data(uVar2,"user-data");" (assignment_expression "piVar3 = (int *)g_object_get_data(uVar2,"user-data")" identifier = (cast_expression "(int *)g_object_get_data(uVar2,"user-data")" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "g_object_get_data(uVar2,"user-data")" identifier (argument_list "(uVar2,"user-data")" ( identifier , (string_literal ""user-data"" " string_content ") ))))) ;) (if_statement "if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" if (parenthesized_expression "(param_2 == -5)" ( (binary_expression "param_2 == -5" identifier == number_literal) )) (compound_statement "{\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }" { (expression_statement "uVar2 = gtk_color_chooser_get_type();" (assignment_expression "uVar2 = gtk_color_chooser_get_type()" identifier = (call_expression "gtk_color_chooser_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "gtk_color_chooser_get_rgba(uVar2,&local_44);" (call_expression "gtk_color_chooser_get_rgba(uVar2,&local_44)" identifier (argument_list "(uVar2,&local_44)" ( identifier , (pointer_expression "&local_44" & identifier) ))) ;) (expression_statement "fVar1 = DAT_00088e40;" (assignment_expression "fVar1 = DAT_00088e40" identifier = identifier) ;) (expression_statement "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);" (assignment_expression "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40)" (pointer_expression "*(char *)(param_3 + 0xc)" * (cast_expression "(char *)(param_3 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)local_44 * DAT_00088e40)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)local_44 * DAT_00088e40)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)local_44 * DAT_00088e40)" identifier (argument_list "((float)local_44 * DAT_00088e40)" ( (binary_expression "(float)local_44 * DAT_00088e40" (cast_expression "(float)local_44" ( (type_descriptor "float" primitive_type) ) identifier) * identifier) )))))) ;) (expression_statement "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);" (assignment_expression "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1)" (pointer_expression "*(char *)(param_3 + 0xd)" * (cast_expression "(char *)(param_3 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xd)" ( (binary_expression "param_3 + 0xd" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)local_3c * fVar1)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)local_3c * fVar1)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)local_3c * fVar1)" identifier (argument_list "((float)local_3c * fVar1)" ( (binary_expression "(float)local_3c * fVar1" (cast_expression "(float)local_3c" ( (type_descriptor "float" primitive_type) ) identifier) * identifier) )))))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xf) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" * (cast_expression "(undefined1 *)(param_3 + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xf)" ( (binary_expression "param_3 + 0xf" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);" (assignment_expression "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34)" (pointer_expression "*(char *)(param_3 + 0xe)" * (cast_expression "(char *)(param_3 + 0xe)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xe)" ( (binary_expression "param_3 + 0xe" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND(fVar1 * (float)local_34)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND(fVar1 * (float)local_34)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(fVar1 * (float)local_34)" identifier (argument_list "(fVar1 * (float)local_34)" ( (binary_expression "fVar1 * (float)local_34" identifier * (cast_expression "(float)local_34" ( (type_descriptor "float" primitive_type) ) identifier)) )))))) ;) }) (else_clause "else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" else (compound_statement "{\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" { (expression_statement "*(undefined1 *)(param_3 + 0xf) = 0;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 0" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" * (cast_expression "(undefined1 *)(param_3 + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xf)" ( (binary_expression "param_3 + 0xf" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);" (call_expression "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" (parenthesized_expression "(**(code **)(*piVar3 + 0x10))" ( (pointer_expression "**(code **)(*piVar3 + 0x10)" * (pointer_expression "*(code **)(*piVar3 + 0x10)" * (cast_expression "(code **)(*piVar3 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x10)" ( (binary_expression "*piVar3 + 0x10" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" ( (pointer_expression "*piVar3" * identifier) , identifier , (pointer_expression "*(undefined4 *)(param_3 + 8)" * (cast_expression "(undefined4 *)(param_3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "uVar2 = gtk_widget_get_type();" (assignment_expression "uVar2 = gtk_widget_get_type()" identifier = (call_expression "gtk_widget_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "gtk_widget_destroy(uVar2);" (call_expression "gtk_widget_destroy(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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_0006c950();" (call_expression "FUN_0006c950()" 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 colourchoose_response(GtkDialog *dialog,gint response_id,gpointer data)\n\n{\n  int iVar1;\n  float fVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  GdkRGBA rgba;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar3 = g_type_check_instance_cast(dialog,0x50);\n  piVar4 = (int *)g_object_get_data(uVar3,"user-data");\n  if (response_id == -5) {\n    uVar3 = gtk_color_chooser_get_type();\n    uVar3 = g_type_check_instance_cast(dialog,uVar3);\n    gtk_color_chooser_get_rgba(uVar3,&rgba);\n    fVar2 = DAT_00088e40;\n    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);\n    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);\n    *(undefined1 *)((int)data + 0xf) = 1;\n    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);\n  }\n  else {\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }\n  (**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4);\n  uVar3 = gtk_widget_get_type();\n  uVar3 = g_type_check_instance_cast(dialog,uVar3);\n  gtk_widget_destroy(uVar3);\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 colourchoose_response(GtkDialog *dialog,gint response_id,gpointer data)\n\n{\n  int iVar1;\n  float fVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  GdkRGBA rgba;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar3 = g_type_check_instance_cast(dialog,0x50);\n  piVar4 = (int *)g_object_get_data(uVar3,"user-data");\n  if (response_id == -5) {\n    uVar3 = gtk_color_chooser_get_type();\n    uVar3 = g_type_check_instance_cast(dialog,uVar3);\n    gtk_color_chooser_get_rgba(uVar3,&rgba);\n    fVar2 = DAT_00088e40;\n    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);\n    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);\n    *(undefined1 *)((int)data + 0xf) = 1;\n    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);\n  }\n  else {\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }\n  (**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4);\n  uVar3 = gtk_widget_get_type();\n  uVar3 = g_type_check_instance_cast(dialog,uVar3);\n  gtk_widget_destroy(uVar3);\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 "colourchoose_response(GtkDialog *dialog,gint response_id,gpointer data)" identifier (parameter_list "(GtkDialog *dialog,gint response_id,gpointer data)" ( (parameter_declaration "GtkDialog *dialog" type_identifier (pointer_declarator "*dialog" * identifier)) , (parameter_declaration "gint response_id" type_identifier identifier) , (parameter_declaration "gpointer data" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  float fVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  GdkRGBA rgba;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar3 = g_type_check_instance_cast(dialog,0x50);\n  piVar4 = (int *)g_object_get_data(uVar3,"user-data");\n  if (response_id == -5) {\n    uVar3 = gtk_color_chooser_get_type();\n    uVar3 = g_type_check_instance_cast(dialog,uVar3);\n    gtk_color_chooser_get_rgba(uVar3,&rgba);\n    fVar2 = DAT_00088e40;\n    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);\n    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);\n    *(undefined1 *)((int)data + 0xf) = 1;\n    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);\n  }\n  else {\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }\n  (**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4);\n  uVar3 = gtk_widget_get_type();\n  uVar3 = g_type_check_instance_cast(dialog,uVar3);\n  gtk_widget_destroy(uVar3);\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 "float fVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "GdkRGBA rgba;" type_identifier identifier ;) (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 "uVar3 = g_type_check_instance_cast(dialog,0x50);" (assignment_expression "uVar3 = g_type_check_instance_cast(dialog,0x50)" identifier = (call_expression "g_type_check_instance_cast(dialog,0x50)" identifier (argument_list "(dialog,0x50)" ( identifier , number_literal )))) ;) (expression_statement "piVar4 = (int *)g_object_get_data(uVar3,"user-data");" (assignment_expression "piVar4 = (int *)g_object_get_data(uVar3,"user-data")" identifier = (cast_expression "(int *)g_object_get_data(uVar3,"user-data")" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "g_object_get_data(uVar3,"user-data")" identifier (argument_list "(uVar3,"user-data")" ( identifier , (string_literal ""user-data"" " string_content ") ))))) ;) (if_statement "if (response_id == -5) {\n    uVar3 = gtk_color_chooser_get_type();\n    uVar3 = g_type_check_instance_cast(dialog,uVar3);\n    gtk_color_chooser_get_rgba(uVar3,&rgba);\n    fVar2 = DAT_00088e40;\n    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);\n    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);\n    *(undefined1 *)((int)data + 0xf) = 1;\n    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);\n  }\n  else {\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }" if (parenthesized_expression "(response_id == -5)" ( (binary_expression "response_id == -5" identifier == number_literal) )) (compound_statement "{\n    uVar3 = gtk_color_chooser_get_type();\n    uVar3 = g_type_check_instance_cast(dialog,uVar3);\n    gtk_color_chooser_get_rgba(uVar3,&rgba);\n    fVar2 = DAT_00088e40;\n    *(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);\n    *(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);\n    *(undefined1 *)((int)data + 0xf) = 1;\n    *(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);\n  }" { (expression_statement "uVar3 = gtk_color_chooser_get_type();" (assignment_expression "uVar3 = gtk_color_chooser_get_type()" identifier = (call_expression "gtk_color_chooser_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = g_type_check_instance_cast(dialog,uVar3);" (assignment_expression "uVar3 = g_type_check_instance_cast(dialog,uVar3)" identifier = (call_expression "g_type_check_instance_cast(dialog,uVar3)" identifier (argument_list "(dialog,uVar3)" ( identifier , identifier )))) ;) (expression_statement "gtk_color_chooser_get_rgba(uVar3,&rgba);" (call_expression "gtk_color_chooser_get_rgba(uVar3,&rgba)" identifier (argument_list "(uVar3,&rgba)" ( identifier , (pointer_expression "&rgba" & identifier) ))) ;) (expression_statement "fVar2 = DAT_00088e40;" (assignment_expression "fVar2 = DAT_00088e40" identifier = identifier) ;) (expression_statement "*(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40);" (assignment_expression "*(char *)((int)data + 0xc) = (char)(int)ROUND((float)rgba.red * DAT_00088e40)" (pointer_expression "*(char *)((int)data + 0xc)" * (cast_expression "(char *)((int)data + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xc)" ( (binary_expression "(int)data + 0xc" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)rgba.red * DAT_00088e40)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)rgba.red * DAT_00088e40)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)rgba.red * DAT_00088e40)" identifier (argument_list "((float)rgba.red * DAT_00088e40)" ( (binary_expression "(float)rgba.red * DAT_00088e40" (cast_expression "(float)rgba.red" ( (type_descriptor "float" primitive_type) ) (field_expression "rgba.red" identifier . field_identifier)) * identifier) )))))) ;) (expression_statement "*(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2);" (assignment_expression "*(char *)((int)data + 0xd) = (char)(int)ROUND((float)rgba.green * fVar2)" (pointer_expression "*(char *)((int)data + 0xd)" * (cast_expression "(char *)((int)data + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xd)" ( (binary_expression "(int)data + 0xd" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)rgba.green * fVar2)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)rgba.green * fVar2)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)rgba.green * fVar2)" identifier (argument_list "((float)rgba.green * fVar2)" ( (binary_expression "(float)rgba.green * fVar2" (cast_expression "(float)rgba.green" ( (type_descriptor "float" primitive_type) ) (field_expression "rgba.green" identifier . field_identifier)) * identifier) )))))) ;) (expression_statement "*(undefined1 *)((int)data + 0xf) = 1;" (assignment_expression "*(undefined1 *)((int)data + 0xf) = 1" (pointer_expression "*(undefined1 *)((int)data + 0xf)" * (cast_expression "(undefined1 *)((int)data + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xf)" ( (binary_expression "(int)data + 0xf" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue);" (assignment_expression "*(char *)((int)data + 0xe) = (char)(int)ROUND(fVar2 * (float)rgba.blue)" (pointer_expression "*(char *)((int)data + 0xe)" * (cast_expression "(char *)((int)data + 0xe)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xe)" ( (binary_expression "(int)data + 0xe" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (cast_expression "(char)(int)ROUND(fVar2 * (float)rgba.blue)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND(fVar2 * (float)rgba.blue)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(fVar2 * (float)rgba.blue)" identifier (argument_list "(fVar2 * (float)rgba.blue)" ( (binary_expression "fVar2 * (float)rgba.blue" identifier * (cast_expression "(float)rgba.blue" ( (type_descriptor "float" primitive_type) ) (field_expression "rgba.blue" identifier . field_identifier))) )))))) ;) }) (else_clause "else {\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }" else (compound_statement "{\n    *(undefined1 *)((int)data + 0xf) = 0;\n  }" { (expression_statement "*(undefined1 *)((int)data + 0xf) = 0;" (assignment_expression "*(undefined1 *)((int)data + 0xf) = 0" (pointer_expression "*(undefined1 *)((int)data + 0xf)" * (cast_expression "(undefined1 *)((int)data + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 0xf)" ( (binary_expression "(int)data + 0xf" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) }))) (expression_statement "(**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4);" (call_expression "(**(code **)(*piVar4 + 0x10))(*piVar4,data,*(undefined4 *)((int)data + 8),4)" (parenthesized_expression "(**(code **)(*piVar4 + 0x10))" ( (pointer_expression "**(code **)(*piVar4 + 0x10)" * (pointer_expression "*(code **)(*piVar4 + 0x10)" * (cast_expression "(code **)(*piVar4 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar4 + 0x10)" ( (binary_expression "*piVar4 + 0x10" (pointer_expression "*piVar4" * identifier) + number_literal) ))))) )) (argument_list "(*piVar4,data,*(undefined4 *)((int)data + 8),4)" ( (pointer_expression "*piVar4" * identifier) , identifier , (pointer_expression "*(undefined4 *)((int)data + 8)" * (cast_expression "(undefined4 *)((int)data + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + 8)" ( (binary_expression "(int)data + 8" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) , number_literal ))) ;) (expression_statement "uVar3 = gtk_widget_get_type();" (assignment_expression "uVar3 = gtk_widget_get_type()" identifier = (call_expression "gtk_widget_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar3 = g_type_check_instance_cast(dialog,uVar3);" (assignment_expression "uVar3 = g_type_check_instance_cast(dialog,uVar3)" identifier = (call_expression "g_type_check_instance_cast(dialog,uVar3)" identifier (argument_list "(dialog,uVar3)" ( identifier , identifier )))) ;) (expression_statement "gtk_widget_destroy(uVar3);" (call_expression "gtk_widget_destroy(uVar3)" identifier (argument_list "(uVar3)" ( 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_000506a0(undefined4 param_1,int param_2,int param_3)\n\n{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006c950();\n}\n\n" (function_definition "void FUN_000506a0(undefined4 param_1,int param_2,int param_3)\n\n{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006c950();\n}" primitive_type (function_declarator "FUN_000506a0(undefined4 param_1,int param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006c950();\n}" { (declaration "float fVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "double local_44;" primitive_type identifier ;) (declaration "double local_3c;" primitive_type identifier ;) (declaration "double local_34;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x506a9;" (assignment_expression "uStack_14 = 0x506a9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "uVar2 = g_type_check_instance_cast(param_1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,0x50)" identifier = (call_expression "g_type_check_instance_cast(param_1,0x50)" identifier (argument_list "(param_1,0x50)" ( identifier , number_literal )))) ;) (expression_statement "piVar3 = (int *)g_object_get_data(uVar2,"user-data");" (assignment_expression "piVar3 = (int *)g_object_get_data(uVar2,"user-data")" identifier = (cast_expression "(int *)g_object_get_data(uVar2,"user-data")" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "g_object_get_data(uVar2,"user-data")" identifier (argument_list "(uVar2,"user-data")" ( identifier , (string_literal ""user-data"" " string_content ") ))))) ;) (if_statement "if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" if (parenthesized_expression "(param_2 == -5)" ( (binary_expression "param_2 == -5" identifier == number_literal) )) (compound_statement "{\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }" { (expression_statement "uVar2 = gtk_color_chooser_get_type();" (assignment_expression "uVar2 = gtk_color_chooser_get_type()" identifier = (call_expression "gtk_color_chooser_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "gtk_color_chooser_get_rgba(uVar2,&local_44);" (call_expression "gtk_color_chooser_get_rgba(uVar2,&local_44)" identifier (argument_list "(uVar2,&local_44)" ( identifier , (pointer_expression "&local_44" & identifier) ))) ;) (expression_statement "fVar1 = DAT_00088e40;" (assignment_expression "fVar1 = DAT_00088e40" identifier = identifier) ;) (expression_statement "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);" (assignment_expression "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40)" (pointer_expression "*(char *)(param_3 + 0xc)" * (cast_expression "(char *)(param_3 + 0xc)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xc)" ( (binary_expression "param_3 + 0xc" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)local_44 * DAT_00088e40)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)local_44 * DAT_00088e40)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)local_44 * DAT_00088e40)" identifier (argument_list "((float)local_44 * DAT_00088e40)" ( (binary_expression "(float)local_44 * DAT_00088e40" (cast_expression "(float)local_44" ( (type_descriptor "float" primitive_type) ) identifier) * identifier) )))))) ;) (expression_statement "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);" (assignment_expression "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1)" (pointer_expression "*(char *)(param_3 + 0xd)" * (cast_expression "(char *)(param_3 + 0xd)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xd)" ( (binary_expression "param_3 + 0xd" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND((float)local_3c * fVar1)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND((float)local_3c * fVar1)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND((float)local_3c * fVar1)" identifier (argument_list "((float)local_3c * fVar1)" ( (binary_expression "(float)local_3c * fVar1" (cast_expression "(float)local_3c" ( (type_descriptor "float" primitive_type) ) identifier) * identifier) )))))) ;) (expression_statement "*(undefined1 *)(param_3 + 0xf) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" * (cast_expression "(undefined1 *)(param_3 + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xf)" ( (binary_expression "param_3 + 0xf" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);" (assignment_expression "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34)" (pointer_expression "*(char *)(param_3 + 0xe)" * (cast_expression "(char *)(param_3 + 0xe)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xe)" ( (binary_expression "param_3 + 0xe" identifier + number_literal) )))) = (cast_expression "(char)(int)ROUND(fVar1 * (float)local_34)" ( (type_descriptor "char" primitive_type) ) (cast_expression "(int)ROUND(fVar1 * (float)local_34)" ( (type_descriptor "int" primitive_type) ) (call_expression "ROUND(fVar1 * (float)local_34)" identifier (argument_list "(fVar1 * (float)local_34)" ( (binary_expression "fVar1 * (float)local_34" identifier * (cast_expression "(float)local_34" ( (type_descriptor "float" primitive_type) ) identifier)) )))))) ;) }) (else_clause "else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" else (compound_statement "{\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" { (expression_statement "*(undefined1 *)(param_3 + 0xf) = 0;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 0" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" * (cast_expression "(undefined1 *)(param_3 + 0xf)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 0xf)" ( (binary_expression "param_3 + 0xf" identifier + number_literal) )))) = number_literal) ;) }))) (expression_statement "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);" (call_expression "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" (parenthesized_expression "(**(code **)(*piVar3 + 0x10))" ( (pointer_expression "**(code **)(*piVar3 + 0x10)" * (pointer_expression "*(code **)(*piVar3 + 0x10)" * (cast_expression "(code **)(*piVar3 + 0x10)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x10)" ( (binary_expression "*piVar3 + 0x10" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" ( (pointer_expression "*piVar3" * identifier) , identifier , (pointer_expression "*(undefined4 *)(param_3 + 8)" * (cast_expression "(undefined4 *)(param_3 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 8)" ( (binary_expression "param_3 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "uVar2 = gtk_widget_get_type();" (assignment_expression "uVar2 = gtk_widget_get_type()" identifier = (call_expression "gtk_widget_get_type()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" identifier = (call_expression "g_type_check_instance_cast(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier )))) ;) (expression_statement "gtk_widget_destroy(uVar2);" (call_expression "gtk_widget_destroy(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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_0006c950();" (call_expression "FUN_0006c950()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 , LIT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * IDENT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * IDENT) )))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (binary_expression IDENT * (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( (pointer_expression * IDENT) , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (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_000506a0(undefined4 param_1,int param_2,int param_3)\n\n{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006c950();\n}" (primitive_type "void") (function_declarator "FUN_000506a0(undefined4 param_1,int param_2,int param_3)" (identifier "FUN_000506a0") (parameter_list "(undefined4 param_1,int param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  float fVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  int in_GS_OFFSET;\n  double local_44;\n  double local_3c;\n  double local_34;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x506a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = g_type_check_instance_cast(param_1,0x50);\n  piVar3 = (int *)g_object_get_data(uVar2,"user-data");\n  if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }\n  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);\n  uVar2 = gtk_widget_get_type();\n  uVar2 = g_type_check_instance_cast(param_1,uVar2);\n  gtk_widget_destroy(uVar2);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006c950();\n}" ({ "{") (declaration "float fVar1;" (primitive_type "float") (identifier "fVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "double local_44;" (primitive_type "double") (identifier "local_44") (; ";")) (declaration "double local_3c;" (primitive_type "double") (identifier "local_3c") (; ";")) (declaration "double local_34;" (primitive_type "double") (identifier "local_34") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x506a9;" (assignment_expression "uStack_14 = 0x506a9" (identifier "uStack_14") (= "=") (number_literal "0x506a9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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 "uVar2 = g_type_check_instance_cast(param_1,0x50);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,0x50)" (identifier "uVar2") (= "=") (call_expression "g_type_check_instance_cast(param_1,0x50)" (identifier "g_type_check_instance_cast") (argument_list "(param_1,0x50)" (( "(") (identifier "param_1") (, ",") (number_literal "0x50") () ")")))) (; ";")) (expression_statement "piVar3 = (int *)g_object_get_data(uVar2,"user-data");" (assignment_expression "piVar3 = (int *)g_object_get_data(uVar2,"user-data")" (identifier "piVar3") (= "=") (cast_expression "(int *)g_object_get_data(uVar2,"user-data")" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "g_object_get_data(uVar2,"user-data")" (identifier "g_object_get_data") (argument_list "(uVar2,"user-data")" (( "(") (identifier "uVar2") (, ",") (string_literal ""user-data"" (" """) (string_content "user-data") (" """)) () ")"))))) (; ";")) (if_statement "if (param_2 == -5) {\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }\n  else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" (if "if") (parenthesized_expression "(param_2 == -5)" (( "(") (binary_expression "param_2 == -5" (identifier "param_2") (== "==") (number_literal "-5")) () ")")) (compound_statement "{\n    uVar2 = gtk_color_chooser_get_type();\n    uVar2 = g_type_check_instance_cast(param_1,uVar2);\n    gtk_color_chooser_get_rgba(uVar2,&local_44);\n    fVar1 = DAT_00088e40;\n    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);\n    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);\n    *(undefined1 *)(param_3 + 0xf) = 1;\n    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);\n  }" ({ "{") (expression_statement "uVar2 = gtk_color_chooser_get_type();" (assignment_expression "uVar2 = gtk_color_chooser_get_type()" (identifier "uVar2") (= "=") (call_expression "gtk_color_chooser_get_type()" (identifier "gtk_color_chooser_get_type") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" (identifier "uVar2") (= "=") (call_expression "g_type_check_instance_cast(param_1,uVar2)" (identifier "g_type_check_instance_cast") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "gtk_color_chooser_get_rgba(uVar2,&local_44);" (call_expression "gtk_color_chooser_get_rgba(uVar2,&local_44)" (identifier "gtk_color_chooser_get_rgba") (argument_list "(uVar2,&local_44)" (( "(") (identifier "uVar2") (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) () ")"))) (; ";")) (expression_statement "fVar1 = DAT_00088e40;" (assignment_expression "fVar1 = DAT_00088e40" (identifier "fVar1") (= "=") (identifier "DAT_00088e40")) (; ";")) (expression_statement "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);" (assignment_expression "*(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40)" (pointer_expression "*(char *)(param_3 + 0xc)" (* "*") (cast_expression "(char *)(param_3 + 0xc)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xc)" (( "(") (binary_expression "param_3 + 0xc" (identifier "param_3") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (cast_expression "(char)(int)ROUND((float)local_44 * DAT_00088e40)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (cast_expression "(int)ROUND((float)local_44 * DAT_00088e40)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND((float)local_44 * DAT_00088e40)" (identifier "ROUND") (argument_list "((float)local_44 * DAT_00088e40)" (( "(") (binary_expression "(float)local_44 * DAT_00088e40" (cast_expression "(float)local_44" (( "(") (type_descriptor "float" (primitive_type "float")) () ")") (identifier "local_44")) (* "*") (identifier "DAT_00088e40")) () ")")))))) (; ";")) (expression_statement "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);" (assignment_expression "*(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1)" (pointer_expression "*(char *)(param_3 + 0xd)" (* "*") (cast_expression "(char *)(param_3 + 0xd)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xd)" (( "(") (binary_expression "param_3 + 0xd" (identifier "param_3") (+ "+") (number_literal "0xd")) () ")")))) (= "=") (cast_expression "(char)(int)ROUND((float)local_3c * fVar1)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (cast_expression "(int)ROUND((float)local_3c * fVar1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND((float)local_3c * fVar1)" (identifier "ROUND") (argument_list "((float)local_3c * fVar1)" (( "(") (binary_expression "(float)local_3c * fVar1" (cast_expression "(float)local_3c" (( "(") (type_descriptor "float" (primitive_type "float")) () ")") (identifier "local_3c")) (* "*") (identifier "fVar1")) () ")")))))) (; ";")) (expression_statement "*(undefined1 *)(param_3 + 0xf) = 1;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 1" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" (* "*") (cast_expression "(undefined1 *)(param_3 + 0xf)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xf)" (( "(") (binary_expression "param_3 + 0xf" (identifier "param_3") (+ "+") (number_literal "0xf")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);" (assignment_expression "*(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34)" (pointer_expression "*(char *)(param_3 + 0xe)" (* "*") (cast_expression "(char *)(param_3 + 0xe)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xe)" (( "(") (binary_expression "param_3 + 0xe" (identifier "param_3") (+ "+") (number_literal "0xe")) () ")")))) (= "=") (cast_expression "(char)(int)ROUND(fVar1 * (float)local_34)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (cast_expression "(int)ROUND(fVar1 * (float)local_34)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "ROUND(fVar1 * (float)local_34)" (identifier "ROUND") (argument_list "(fVar1 * (float)local_34)" (( "(") (binary_expression "fVar1 * (float)local_34" (identifier "fVar1") (* "*") (cast_expression "(float)local_34" (( "(") (type_descriptor "float" (primitive_type "float")) () ")") (identifier "local_34"))) () ")")))))) (; ";")) (} "}")) (else_clause "else {\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" (else "else") (compound_statement "{\n    *(undefined1 *)(param_3 + 0xf) = 0;\n  }" ({ "{") (expression_statement "*(undefined1 *)(param_3 + 0xf) = 0;" (assignment_expression "*(undefined1 *)(param_3 + 0xf) = 0" (pointer_expression "*(undefined1 *)(param_3 + 0xf)" (* "*") (cast_expression "(undefined1 *)(param_3 + 0xf)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 0xf)" (( "(") (binary_expression "param_3 + 0xf" (identifier "param_3") (+ "+") (number_literal "0xf")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);" (call_expression "(**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" (parenthesized_expression "(**(code **)(*piVar3 + 0x10))" (( "(") (pointer_expression "**(code **)(*piVar3 + 0x10)" (* "*") (pointer_expression "*(code **)(*piVar3 + 0x10)" (* "*") (cast_expression "(code **)(*piVar3 + 0x10)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 0x10)" (( "(") (binary_expression "*piVar3 + 0x10" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "0x10")) () ")"))))) () ")")) (argument_list "(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (, ",") (identifier "param_3") (, ",") (pointer_expression "*(undefined4 *)(param_3 + 8)" (* "*") (cast_expression "(undefined4 *)(param_3 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 8)" (( "(") (binary_expression "param_3 + 8" (identifier "param_3") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "uVar2 = gtk_widget_get_type();" (assignment_expression "uVar2 = gtk_widget_get_type()" (identifier "uVar2") (= "=") (call_expression "gtk_widget_get_type()" (identifier "gtk_widget_get_type") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = g_type_check_instance_cast(param_1,uVar2);" (assignment_expression "uVar2 = g_type_check_instance_cast(param_1,uVar2)" (identifier "uVar2") (= "=") (call_expression "g_type_check_instance_cast(param_1,uVar2)" (identifier "g_type_check_instance_cast") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "gtk_widget_destroy(uVar2);" (call_expression "gtk_widget_destroy(uVar2)" (identifier "gtk_widget_destroy") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (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_0006c950();" (call_expression "FUN_0006c950()" (identifier "FUN_0006c950") (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 *dialog,type_2 var_4,type_3 data)

{
  int var_12;
  float var_9;
  type_4 uVar3;
  int *piVar4;
  int var_1;
  type_5 rgba;
  
  var_12 = *(int *)(var_1 + 0x14);
  uVar3 = var_2(dialog,0x50);
  piVar4 = (int *)var_3(uVar3,"user-data");
  if (var_4 == -5) {
    uVar3 = var_5();
    uVar3 = var_2(dialog,uVar3);
    var_6(uVar3,&rgba);
    var_9 = var_8;
    *(char *)((int)data + 0xc) = (char)(int)var_7((float)rgba.red * var_8);
    *(char *)((int)data + 0xd) = (char)(int)var_7((float)rgba.green * var_9);
    *(type_6 *)((int)data + 0xf) = 1;
    *(char *)((int)data + 0xe) = (char)(int)var_7(var_9 * (float)rgba.blue);
  }
  else {
    *(type_6 *)((int)data + 0xf) = 0;
  }
  (**(type_7 **)(*piVar4 + 0x10))(*piVar4,data,*(type_4 *)((int)data + 8),4);
  uVar3 = var_10();
  uVar3 = var_2(dialog,uVar3);
  var_11(uVar3);
  if (var_12 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_13();
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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) (number_literal))))) (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) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) 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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) 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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) 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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (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: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (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))))) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (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 param_2,int param_3)

{
  float fVar1;
  undefined4 uVar2;
  int *piVar3;
  int in_GS_OFFSET;
  double local_44;
  double local_3c;
  double local_34;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x506a9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = g_type_check_instance_cast(param_1,0x50);
  piVar3 = (int *)g_object_get_data(uVar2,"user-data");
  if (param_2 == -5) {
    uVar2 = gtk_color_chooser_get_type();
    uVar2 = g_type_check_instance_cast(param_1,uVar2);
    gtk_color_chooser_get_rgba(uVar2,&local_44);
    fVar1 = DAT_00088e40;
    *(char *)(param_3 + 0xc) = (char)(int)ROUND((float)local_44 * DAT_00088e40);
    *(char *)(param_3 + 0xd) = (char)(int)ROUND((float)local_3c * fVar1);
    *(undefined1 *)(param_3 + 0xf) = 1;
    *(char *)(param_3 + 0xe) = (char)(int)ROUND(fVar1 * (float)local_34);
  }
  else {
    *(undefined1 *)(param_3 + 0xf) = 0;
  }
  (**(code **)(*piVar3 + 0x10))(*piVar3,param_3,*(undefined4 *)(param_3 + 8),4);
  uVar2 = gtk_widget_get_type();
  uVar2 = g_type_check_instance_cast(param_1,uVar2);
  gtk_widget_destroy(uVar2);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006c950();
}

