
/* WARNING: Unknown calling convention */

void rlogin_size(void *handle,int width,int height)

{
  int iVar1;
  int *piVar2;
  ushort uVar3;
  undefined4 uVar4;
  ushort uVar5;
  int in_GS_OFFSET;
  char b [12];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  b[0] = -1;
  b[1] = -1;
  b[2] = 's';
  b[3] = 's';
  b[4] = '\0';
  b[5] = '\0';
  b[6] = '\0';
  b[7] = '\0';
  piVar2 = *(int **)((int)handle + 4);
  b[8] = '\0';
  b[9] = '\0';
  b[10] = '\0';
  b[0xb] = '\0';
  *(int *)((int)handle + 0x18) = width;
  *(int *)((int)handle + 0x1c) = height;
  if ((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {
    uVar5 = (ushort)width << 8 | (ushort)width >> 8;
    uVar3 = (ushort)height << 8 | (ushort)height >> 8;
    b[6] = (char)uVar5;
    b[7] = (char)(uVar5 >> 8);
    b[4] = (char)uVar3;
    b[5] = (char)(uVar3 >> 8);
    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);
    *(undefined4 *)((int)handle + 0xc) = uVar4;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



void FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)

{
  int *piVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_1c = 0x7373ffff;
  local_18 = 0;
  piVar1 = *(int **)(param_1 + 4);
  local_14 = 0;
  *(undefined4 *)(param_1 + 0x18) = param_2;
  *(undefined4 *)(param_1 + 0x1c) = param_3;
  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {
    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,
                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);
    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);
    *(undefined4 *)(param_1 + 0xc) = uVar2;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a39d0();
}


PUSH EBX
SUB ESP,0x18
MOV ECX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0xc],ECX
XOR ECX,ECX
MOV EBX,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [ESP + 0x24]
MOV dword ptr [ESP],0x7373ffff
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [ESP + 0x4],0x0
MOV ECX,dword ptr [EBX + 0x4]
MOV dword ptr [ESP + 0x8],0x0
MOV dword ptr [EBX + 0x18],EDX
MOV dword ptr [EBX + 0x1c],EAX
TEST ECX,ECX
JZ 0x00033f2f
CMP dword ptr [EBX + 0x14],0x0
JZ 0x00033f2f
ROL DX,0x8
ROL AX,0x8
SUB ESP,0x4
MOV word ptr [ESP + 0xa],DX
MOV word ptr [ESP + 0x8],AX
MOV EAX,dword ptr [ECX]
PUSH 0xc
LEA EDX,[ESP + 0x8]
PUSH EDX
PUSH ECX
CALL dword ptr [EAX + 0x8]
MOV dword ptr [EBX + 0xc],EAX
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00033f41
ADD ESP,0x18
POP EBX
RET
CALL 0x000a39d0
(translation_unit "void FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}\n\n" (function_definition "void FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}" primitive_type (function_declarator "FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (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 "local_1c = 0x7373ffff;" (assignment_expression "local_1c = 0x7373ffff" identifier = number_literal) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x18) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1c) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1c) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(int *)(param_1 + 0x14) != 0)" ( (binary_expression "*(int *)(param_1 + 0x14) != 0" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" { (expression_statement "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);" (assignment_expression "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" identifier = (call_expression "CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" identifier (argument_list "((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" ( (binary_expression "(ushort)param_2 << 8 | (ushort)param_2 >> 8" (binary_expression "(ushort)param_2 << 8" (cast_expression "(ushort)param_2" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_2 >> 8" (cast_expression "(ushort)param_2" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal)) , (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal)) )))) ;) (expression_statement "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);" (assignment_expression "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" identifier = (call_expression "(**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" (parenthesized_expression "(**(code **)(*piVar1 + 8))" ( (pointer_expression "**(code **)(*piVar1 + 8)" * (pointer_expression "*(code **)(*piVar1 + 8)" * (cast_expression "(code **)(*piVar1 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 8)" ( (binary_expression "*piVar1 + 8" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(piVar1,&local_1c,0xc)" ( identifier , (pointer_expression "&local_1c" & identifier) , number_literal )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) })) (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_000a39d0();" (call_expression "FUN_000a39d0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid rlogin_size(void *handle,int width,int height)\n\n{\n  int iVar1;\n  int *piVar2;\n  ushort uVar3;\n  undefined4 uVar4;\n  ushort uVar5;\n  int in_GS_OFFSET;\n  char b [12];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  b[0] = -1;\n  b[1] = -1;\n  b[2] = 's';\n  b[3] = 's';\n  b[4] = '\0';\n  b[5] = '\0';\n  b[6] = '\0';\n  b[7] = '\0';\n  piVar2 = *(int **)((int)handle + 4);\n  b[8] = '\0';\n  b[9] = '\0';\n  b[10] = '\0';\n  b[0xb] = '\0';\n  *(int *)((int)handle + 0x18) = width;\n  *(int *)((int)handle + 0x1c) = height;\n  if ((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {\n    uVar5 = (ushort)width << 8 | (ushort)width >> 8;\n    uVar3 = (ushort)height << 8 | (ushort)height >> 8;\n    b[6] = (char)uVar5;\n    b[7] = (char)(uVar5 >> 8);\n    b[4] = (char)uVar3;\n    b[5] = (char)(uVar3 >> 8);\n    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);\n    *(undefined4 *)((int)handle + 0xc) = uVar4;\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 (function_definition "void rlogin_size(void *handle,int width,int height)\n\n{\n  int iVar1;\n  int *piVar2;\n  ushort uVar3;\n  undefined4 uVar4;\n  ushort uVar5;\n  int in_GS_OFFSET;\n  char b [12];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  b[0] = -1;\n  b[1] = -1;\n  b[2] = 's';\n  b[3] = 's';\n  b[4] = '\0';\n  b[5] = '\0';\n  b[6] = '\0';\n  b[7] = '\0';\n  piVar2 = *(int **)((int)handle + 4);\n  b[8] = '\0';\n  b[9] = '\0';\n  b[10] = '\0';\n  b[0xb] = '\0';\n  *(int *)((int)handle + 0x18) = width;\n  *(int *)((int)handle + 0x1c) = height;\n  if ((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {\n    uVar5 = (ushort)width << 8 | (ushort)width >> 8;\n    uVar3 = (ushort)height << 8 | (ushort)height >> 8;\n    b[6] = (char)uVar5;\n    b[7] = (char)(uVar5 >> 8);\n    b[4] = (char)uVar3;\n    b[5] = (char)(uVar3 >> 8);\n    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);\n    *(undefined4 *)((int)handle + 0xc) = uVar4;\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 "rlogin_size(void *handle,int width,int height)" identifier (parameter_list "(void *handle,int width,int height)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "int width" primitive_type identifier) , (parameter_declaration "int height" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  ushort uVar3;\n  undefined4 uVar4;\n  ushort uVar5;\n  int in_GS_OFFSET;\n  char b [12];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  b[0] = -1;\n  b[1] = -1;\n  b[2] = 's';\n  b[3] = 's';\n  b[4] = '\0';\n  b[5] = '\0';\n  b[6] = '\0';\n  b[7] = '\0';\n  piVar2 = *(int **)((int)handle + 4);\n  b[8] = '\0';\n  b[9] = '\0';\n  b[10] = '\0';\n  b[0xb] = '\0';\n  *(int *)((int)handle + 0x18) = width;\n  *(int *)((int)handle + 0x1c) = height;\n  if ((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {\n    uVar5 = (ushort)width << 8 | (ushort)width >> 8;\n    uVar3 = (ushort)height << 8 | (ushort)height >> 8;\n    b[6] = (char)uVar5;\n    b[7] = (char)(uVar5 >> 8);\n    b[4] = (char)uVar3;\n    b[5] = (char)(uVar3 >> 8);\n    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);\n    *(undefined4 *)((int)handle + 0xc) = uVar4;\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 *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "ushort uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char b [12];" primitive_type (array_declarator "b [12]" 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 "b[0] = -1;" (assignment_expression "b[0] = -1" (subscript_expression "b[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "b[1] = -1;" (assignment_expression "b[1] = -1" (subscript_expression "b[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "b[2] = 's';" (assignment_expression "b[2] = 's'" (subscript_expression "b[2]" identifier [ number_literal ]) = (char_literal "'s'" ' character ')) ;) (expression_statement "b[3] = 's';" (assignment_expression "b[3] = 's'" (subscript_expression "b[3]" identifier [ number_literal ]) = (char_literal "'s'" ' character ')) ;) (expression_statement "b[4] = '\0';" (assignment_expression "b[4] = '\0'" (subscript_expression "b[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[5] = '\0';" (assignment_expression "b[5] = '\0'" (subscript_expression "b[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[6] = '\0';" (assignment_expression "b[6] = '\0'" (subscript_expression "b[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[7] = '\0';" (assignment_expression "b[7] = '\0'" (subscript_expression "b[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "piVar2 = *(int **)((int)handle + 4);" (assignment_expression "piVar2 = *(int **)((int)handle + 4)" identifier = (pointer_expression "*(int **)((int)handle + 4)" * (cast_expression "(int **)((int)handle + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "b[8] = '\0';" (assignment_expression "b[8] = '\0'" (subscript_expression "b[8]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[9] = '\0';" (assignment_expression "b[9] = '\0'" (subscript_expression "b[9]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[10] = '\0';" (assignment_expression "b[10] = '\0'" (subscript_expression "b[10]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "b[0xb] = '\0';" (assignment_expression "b[0xb] = '\0'" (subscript_expression "b[0xb]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "*(int *)((int)handle + 0x18) = width;" (assignment_expression "*(int *)((int)handle + 0x18) = width" (pointer_expression "*(int *)((int)handle + 0x18)" * (cast_expression "(int *)((int)handle + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x18)" ( (binary_expression "(int)handle + 0x18" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (expression_statement "*(int *)((int)handle + 0x1c) = height;" (assignment_expression "*(int *)((int)handle + 0x1c) = height" (pointer_expression "*(int *)((int)handle + 0x1c)" * (cast_expression "(int *)((int)handle + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x1c)" ( (binary_expression "(int)handle + 0x1c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (if_statement "if ((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {\n    uVar5 = (ushort)width << 8 | (ushort)width >> 8;\n    uVar3 = (ushort)height << 8 | (ushort)height >> 8;\n    b[6] = (char)uVar5;\n    b[7] = (char)(uVar5 >> 8);\n    b[4] = (char)uVar3;\n    b[5] = (char)(uVar3 >> 8);\n    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);\n    *(undefined4 *)((int)handle + 0xc) = uVar4;\n  }" if (parenthesized_expression "((piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0))" ( (binary_expression "(piVar2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)" (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(int *)((int)handle + 0x14) != 0)" ( (binary_expression "*(int *)((int)handle + 0x14) != 0" (pointer_expression "*(int *)((int)handle + 0x14)" * (cast_expression "(int *)((int)handle + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x14)" ( (binary_expression "(int)handle + 0x14" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    uVar5 = (ushort)width << 8 | (ushort)width >> 8;\n    uVar3 = (ushort)height << 8 | (ushort)height >> 8;\n    b[6] = (char)uVar5;\n    b[7] = (char)(uVar5 >> 8);\n    b[4] = (char)uVar3;\n    b[5] = (char)(uVar3 >> 8);\n    uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);\n    *(undefined4 *)((int)handle + 0xc) = uVar4;\n  }" { (expression_statement "uVar5 = (ushort)width << 8 | (ushort)width >> 8;" (assignment_expression "uVar5 = (ushort)width << 8 | (ushort)width >> 8" identifier = (binary_expression "(ushort)width << 8 | (ushort)width >> 8" (binary_expression "(ushort)width << 8" (cast_expression "(ushort)width" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)width >> 8" (cast_expression "(ushort)width" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "uVar3 = (ushort)height << 8 | (ushort)height >> 8;" (assignment_expression "uVar3 = (ushort)height << 8 | (ushort)height >> 8" identifier = (binary_expression "(ushort)height << 8 | (ushort)height >> 8" (binary_expression "(ushort)height << 8" (cast_expression "(ushort)height" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)height >> 8" (cast_expression "(ushort)height" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal))) ;) (expression_statement "b[6] = (char)uVar5;" (assignment_expression "b[6] = (char)uVar5" (subscript_expression "b[6]" identifier [ number_literal ]) = (cast_expression "(char)uVar5" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "b[7] = (char)(uVar5 >> 8);" (assignment_expression "b[7] = (char)(uVar5 >> 8)" (subscript_expression "b[7]" identifier [ number_literal ]) = (cast_expression "(char)(uVar5 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar5 >> 8)" ( (binary_expression "uVar5 >> 8" identifier >> number_literal) )))) ;) (expression_statement "b[4] = (char)uVar3;" (assignment_expression "b[4] = (char)uVar3" (subscript_expression "b[4]" identifier [ number_literal ]) = (cast_expression "(char)uVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "b[5] = (char)(uVar3 >> 8);" (assignment_expression "b[5] = (char)(uVar3 >> 8)" (subscript_expression "b[5]" identifier [ number_literal ]) = (cast_expression "(char)(uVar3 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar3 >> 8)" ( (binary_expression "uVar3 >> 8" identifier >> number_literal) )))) ;) (expression_statement "uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc);" (assignment_expression "uVar4 = (**(code **)(*piVar2 + 8))(piVar2,b,0xc)" identifier = (call_expression "(**(code **)(*piVar2 + 8))(piVar2,b,0xc)" (parenthesized_expression "(**(code **)(*piVar2 + 8))" ( (pointer_expression "**(code **)(*piVar2 + 8)" * (pointer_expression "*(code **)(*piVar2 + 8)" * (cast_expression "(code **)(*piVar2 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 8)" ( (binary_expression "*piVar2 + 8" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2,b,0xc)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(undefined4 *)((int)handle + 0xc) = uVar4;" (assignment_expression "*(undefined4 *)((int)handle + 0xc) = uVar4" (pointer_expression "*(undefined4 *)((int)handle + 0xc)" * (cast_expression "(undefined4 *)((int)handle + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0xc)" ( (binary_expression "(int)handle + 0xc" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = 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_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a39d0();\n}\n\n" (function_definition "void FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a39d0();\n}" primitive_type (function_declarator "FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a39d0();\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_1c;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (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 "local_1c = 0x7373ffff;" (assignment_expression "local_1c = 0x7373ffff" identifier = number_literal) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x18) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1c) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1c) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" * (cast_expression "(undefined4 *)(param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" if (parenthesized_expression "((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0))" ( (binary_expression "(piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(*(int *)(param_1 + 0x14) != 0)" ( (binary_expression "*(int *)(param_1 + 0x14) != 0" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" { (expression_statement "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);" (assignment_expression "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" identifier = (call_expression "CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" identifier (argument_list "((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" ( (binary_expression "(ushort)param_2 << 8 | (ushort)param_2 >> 8" (binary_expression "(ushort)param_2 << 8" (cast_expression "(ushort)param_2" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_2 >> 8" (cast_expression "(ushort)param_2" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal)) , (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) << number_literal) | (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" ( (type_descriptor "ushort" type_identifier) ) identifier) >> number_literal)) )))) ;) (expression_statement "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);" (assignment_expression "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" identifier = (call_expression "(**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" (parenthesized_expression "(**(code **)(*piVar1 + 8))" ( (pointer_expression "**(code **)(*piVar1 + 8)" * (pointer_expression "*(code **)(*piVar1 + 8)" * (cast_expression "(code **)(*piVar1 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 8)" ( (binary_expression "*piVar1 + 8" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(piVar1,&local_1c,0xc)" ( identifier , (pointer_expression "&local_1c" & identifier) , number_literal )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) })) (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_000a39d0();" (call_expression "FUN_000a39d0()" 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 (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) , (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (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 ( IDENT , (pointer_expression & IDENT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = 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_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a39d0();\n}" (primitive_type "void") (function_declarator "FUN_00033ec0(int param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_00033ec0") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int *piVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_1c;\n  undefined4 local_18;\n  undefined4 local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  local_1c = 0x7373ffff;\n  local_18 = 0;\n  piVar1 = *(int **)(param_1 + 4);\n  local_14 = 0;\n  *(undefined4 *)(param_1 + 0x18) = param_2;\n  *(undefined4 *)(param_1 + 0x1c) = param_3;\n  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000a39d0();\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_1c;" (type_identifier "undefined4") (identifier "local_1c") (; ";")) (declaration "undefined4 local_18;" (type_identifier "undefined4") (identifier "local_18") (; ";")) (declaration "undefined4 local_14;" (type_identifier "undefined4") (identifier "local_14") (; ";")) (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 "local_1c = 0x7373ffff;" (assignment_expression "local_1c = 0x7373ffff" (identifier "local_1c") (= "=") (number_literal "0x7373ffff")) (; ";")) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" (identifier "local_18") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar1 = *(int **)(param_1 + 4);" (assignment_expression "piVar1 = *(int **)(param_1 + 4)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" (identifier "local_14") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x18) = param_2;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = param_2" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1c) = param_3;" (assignment_expression "*(undefined4 *)(param_1 + 0x1c) = param_3" (pointer_expression "*(undefined4 *)(param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (if_statement "if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" (if "if") (parenthesized_expression "((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0))" (( "(") (binary_expression "(piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)" (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 0x14) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x14) != 0" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);\n    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);\n    *(undefined4 *)(param_1 + 0xc) = uVar2;\n  }" ({ "{") (expression_statement "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);" (assignment_expression "local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" (identifier "local_18") (= "=") (call_expression "CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" (identifier "CONCAT22") (argument_list "((ushort)param_2 << 8 | (ushort)param_2 >> 8,\n                        (ushort)param_3 << 8 | (ushort)param_3 >> 8)" (( "(") (binary_expression "(ushort)param_2 << 8 | (ushort)param_2 >> 8" (binary_expression "(ushort)param_2 << 8" (cast_expression "(ushort)param_2" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_2")) (<< "<<") (number_literal "8")) (| "|") (binary_expression "(ushort)param_2 >> 8" (cast_expression "(ushort)param_2" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_2")) (>> ">>") (number_literal "8"))) (, ",") (binary_expression "(ushort)param_3 << 8 | (ushort)param_3 >> 8" (binary_expression "(ushort)param_3 << 8" (cast_expression "(ushort)param_3" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_3")) (<< "<<") (number_literal "8")) (| "|") (binary_expression "(ushort)param_3 >> 8" (cast_expression "(ushort)param_3" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "param_3")) (>> ">>") (number_literal "8"))) () ")")))) (; ";")) (expression_statement "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);" (assignment_expression "uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc)" (parenthesized_expression "(**(code **)(*piVar1 + 8))" (( "(") (pointer_expression "**(code **)(*piVar1 + 8)" (* "*") (pointer_expression "*(code **)(*piVar1 + 8)" (* "*") (cast_expression "(code **)(*piVar1 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar1 + 8)" (( "(") (binary_expression "*piVar1 + 8" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar1,&local_1c,0xc)" (( "(") (identifier "piVar1") (, ",") (pointer_expression "&local_1c" (& "&") (identifier "local_1c")) (, ",") (number_literal "0xc") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xc) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (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_000a39d0();" (call_expression "FUN_000a39d0()" (identifier "FUN_000a39d0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(void *handle,int width,int height)

{
  int var_5;
  int *var_2;
  type_1 var_4;
  type_2 uVar4;
  type_1 var_3;
  int var_1;
  char b [12];
  
  var_5 = *(int *)(var_1 + 0x14);
  b[0] = -1;
  b[1] = -1;
  b[2] = 's';
  b[3] = 's';
  b[4] = '\0';
  b[5] = '\0';
  b[6] = '\0';
  b[7] = '\0';
  var_2 = *(int **)((int)handle + 4);
  b[8] = '\0';
  b[9] = '\0';
  b[10] = '\0';
  b[0xb] = '\0';
  *(int *)((int)handle + 0x18) = width;
  *(int *)((int)handle + 0x1c) = height;
  if ((var_2 != (int *)0x0) && (*(int *)((int)handle + 0x14) != 0)) {
    var_3 = (type_1)width << 8 | (type_1)width >> 8;
    var_4 = (type_1)height << 8 | (type_1)height >> 8;
    b[6] = (char)var_3;
    b[7] = (char)(var_3 >> 8);
    b[4] = (char)var_4;
    b[5] = (char)(var_4 >> 8);
    uVar4 = (**(type_3 **)(*var_2 + 8))(var_2,b,0xc);
    *(type_2 *)((int)handle + 0xc) = uVar4;
  }
  if (var_5 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_6();
}


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

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

{
  int *piVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_1c = 0x7373ffff;
  local_18 = 0;
  piVar1 = *(int **)(param_1 + 4);
  local_14 = 0;
  *(undefined4 *)(param_1 + 0x18) = param_2;
  *(undefined4 *)(param_1 + 0x1c) = param_3;
  if ((piVar1 != (int *)0x0) && (*(int *)(param_1 + 0x14) != 0)) {
    local_18 = CONCAT22((ushort)param_2 << 8 | (ushort)param_2 >> 8,
                        (ushort)param_3 << 8 | (ushort)param_3 >> 8);
    uVar2 = (**(code **)(*piVar1 + 8))(piVar1,&local_1c,0xc);
    *(undefined4 *)(param_1 + 0xc) = uVar2;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a39d0();
}

