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

control * ctrl_columns(controlset *s,int ncolumns,...)

{
  control *pcVar1;
  char *pcVar2;
  int iVar3;
  control **ppcVar4;
  
  pcVar1 = (control *)safemalloc(1,0x3c);
  iVar3 = s->ncontrols;
  if (iVar3 < s->ctrlsize) {
    ppcVar4 = s->ctrls;
  }
  else {
    s->ctrlsize = iVar3 + 0x20U;
    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);
    iVar3 = s->ncontrols;
    s->ctrls = ppcVar4;
  }
  s->ncontrols = iVar3 + 1;
  ppcVar4[iVar3] = pcVar1;
  iVar3 = s->ncolumns;
  (pcVar1->generic).type = 6;
  (pcVar1->generic).tabdelay = 0;
  (pcVar1->generic).helpctx.p = (void *)0x0;
  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;
  (pcVar1->generic).handler = (handler_fn)0x0;
  (pcVar1->generic).context.p = (void *)0x0;
  (pcVar1->generic).label = (char *)0x0;
  if (iVar3 == 1) {
    (pcVar1->columns).ncols = ncolumns;
    s->ncolumns = ncolumns;
    if (ncolumns != 1) {
      pcVar2 = (char *)safemalloc(ncolumns,4);
      (pcVar1->fileselect).filter = pcVar2;
      if (ncolumns < 1) {
        return pcVar1;
      }
      iVar3 = 0;
      do {
        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =
             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);
        iVar3 = iVar3 + 1;
      } while (ncolumns != iVar3);
      return pcVar1;
    }
  }
  else {
    if (ncolumns != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");
    }
    (pcVar1->columns).ncols = 1;
    s->ncolumns = 1;
  }
  (pcVar1->editbox).percentwidth = 0;
  return pcVar1;
}



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

undefined4 * FUN_00028940(int param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);
  iVar3 = *(int *)(param_1 + 0x10);
  if (iVar3 < *(int *)(param_1 + 0x14)) {
    iVar4 = *(int *)(param_1 + 0x18);
  }
  else {
    *(int *)(param_1 + 0x14) = iVar3 + 0x20;
    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);
    iVar3 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x18) = iVar4;
  }
  *(int *)(param_1 + 0x10) = iVar3 + 1;
  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;
  iVar3 = *(int *)(param_1 + 0xc);
  *puVar1 = 6;
  puVar1[2] = 0;
  puVar1[6] = 0;
  puVar1[3] = (iVar3 + -1) * 0x10000;
  puVar1[4] = 0;
  puVar1[5] = 0;
  puVar1[1] = 0;
  if (iVar3 == 1) {
    puVar1[7] = param_2;
    *(int *)(param_1 + 0xc) = param_2;
    if (param_2 != 1) {
      uVar2 = FUN_00030000(param_2,4);
      puVar1[8] = uVar2;
      if (param_2 < 1) {
        return puVar1;
      }
      iVar3 = 0;
      do {
        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);
        iVar3 = iVar3 + 1;
      } while (param_2 != iVar3);
      return puVar1;
    }
  }
  else {
    if (param_2 != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");
    }
    puVar1[7] = 1;
    *(undefined4 *)(param_1 + 0xc) = 1;
  }
  puVar1[8] = 0;
  return puVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a360
ADD EBX,0x8ce9b
SUB ESP,0x14
MOV EBP,dword ptr [ESP + 0x28]
MOV EDI,dword ptr [ESP + 0x2c]
PUSH 0x3c
PUSH 0x1
CALL 0x00030000
MOV EDX,dword ptr [EBP + 0x10]
ADD ESP,0x10
MOV ESI,EAX
CMP EDX,dword ptr [EBP + 0x14]
JGE 0x00028a30
MOV EAX,dword ptr [EBP + 0x18]
LEA ECX,[EDX + 0x1]
MOV dword ptr [EBP + 0x10],ECX
MOV dword ptr [EAX + EDX*0x4],ESI
MOV EDX,dword ptr [EBP + 0xc]
MOV dword ptr [ESI],0x6
LEA EAX,[EDX + -0x1]
MOV dword ptr [ESI + 0x8],0x0
SHL EAX,0x10
MOV dword ptr [ESI + 0x18],0x0
MOV dword ptr [ESI + 0xc],EAX
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x14],0x0
MOV dword ptr [ESI + 0x4],0x0
CMP EDX,0x1
JZ 0x000289e8
CMP EDI,0x1
JNZ 0x00028a52
MOV dword ptr [ESI + 0x1c],0x1
MOV dword ptr [EBP + 0xc],0x1
MOV dword ptr [ESI + 0x20],0x0
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI + 0x1c],EDI
MOV dword ptr [EBP + 0xc],EDI
CMP EDI,0x1
JZ 0x000289d1
SUB ESP,0x8
PUSH 0x4
PUSH EDI
CALL 0x00030000
LEA EBX,[ESP + 0x38]
ADD ESP,0x10
MOV dword ptr [ESI + 0x20],EAX
TEST EDI,EDI
JLE 0x000289d8
XOR EAX,EAX
NOP
MOV ECX,dword ptr [EBX + EAX*0x4]
MOV EDX,dword ptr [ESI + 0x20]
MOV dword ptr [EDX + EAX*0x4],ECX
ADD EAX,0x1
CMP EDI,EAX
JNZ 0x00028a10
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
ADD EDX,0x20
MOV dword ptr [EBP + 0x14],EDX
PUSH 0x4
PUSH EDX
PUSH dword ptr [EBP + 0x18]
CALL 0x000300c0
MOV EDX,dword ptr [EBP + 0x10]
ADD ESP,0x10
MOV dword ptr [EBP + 0x18],EAX
JMP 0x00028977
LEA EAX,[EBX + 0xfffccaac]
PUSH EAX
LEA EAX,[EBX + 0xfffcca7d]
PUSH 0xf3
PUSH EAX
LEA EAX,[EBX + 0xfffcca88]
PUSH EAX
CALL 0x00019e90
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * FUN_00028940(int param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}\n\n" comment (function_definition "undefined4 * FUN_00028940(int param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00028940(int param_1,int param_2)" * (function_declarator "FUN_00028940(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined4 *)FUN_00030000(1,0x3c);" (assignment_expression "puVar1 = (undefined4 *)FUN_00030000(1,0x3c)" identifier = (cast_expression "(undefined4 *)FUN_00030000(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00030000(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" if (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x14))" ( (binary_expression "iVar3 < *(int *)(param_1 + 0x14)" identifier < (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) ))))) )) (compound_statement "{\n    iVar4 = *(int *)(param_1 + 0x18);\n  }" { (expression_statement "iVar4 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" { (expression_statement "*(int *)(param_1 + 0x14) = iVar3 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3 + 0x20" (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) )))) = (binary_expression "iVar3 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" identifier = (call_expression "FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" ( (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) )))) , (binary_expression "iVar3 + 0x20" identifier + number_literal) , number_literal )))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar4" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int *)(param_1 + 0x10) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3 + 1" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar4 + iVar3 * 4)" * (cast_expression "(undefined4 **)(iVar4 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + iVar3 * 4)" ( (binary_expression "iVar4 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = 6;" (assignment_expression "*puVar1 = 6" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = (iVar3 + -1) * 0x10000;" (assignment_expression "puVar1[3] = (iVar3 + -1) * 0x10000" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = (binary_expression "(iVar3 + -1) * 0x10000" (parenthesized_expression "(iVar3 + -1)" ( (binary_expression "iVar3 + -1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }" { (expression_statement "puVar1[7] = param_2;" (assignment_expression "puVar1[7] = param_2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(int *)(param_1 + 0xc) = param_2;" (assignment_expression "*(int *)(param_1 + 0xc) = param_2" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" { (expression_statement "uVar2 = FUN_00030000(param_2,4);" (assignment_expression "uVar2 = FUN_00030000(param_2,4)" identifier = (call_expression "FUN_00030000(param_2,4)" identifier (argument_list "(param_2,4)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[8] = uVar2;" (assignment_expression "puVar1[8] = uVar2" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 < 1) {\n        return puVar1;\n      }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n        return puVar1;\n      }" { (return_statement "return puVar1;" return identifier ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);" do (compound_statement "{\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      }" { (expression_statement "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);" (assignment_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (pointer_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4)" * (cast_expression "(undefined4 *)(puVar1[8] + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[8] + iVar3 * 4)" ( (binary_expression "puVar1[8] + iVar3 * 4" (subscript_expression "puVar1[8]" identifier [ number_literal ]) + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)(&stack0x0000000c + iVar3 * 4)" * (cast_expression "(undefined4 *)(&stack0x0000000c + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&stack0x0000000c + iVar3 * 4)" ( (binary_expression "&stack0x0000000c + iVar3 * 4" (pointer_expression "&stack0x0000000c" & identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar3)" ( (binary_expression "param_2 != iVar3" identifier != identifier) )) ;) (return_statement "return puVar1;" return identifier ;) })) }) (else_clause "else {\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" else (compound_statement "{\n    if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" { (if_statement "if (param_2 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" { comment (expression_statement "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");" (call_expression "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" identifier (argument_list "("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" ( (string_literal ""s->ncolumns == 1 || ncolumns == 1"" " string_content ") , (string_literal ""dialog.c"" " string_content ") , number_literal , (string_literal ""ctrl_columns"" " string_content ") ))) ;) })) (expression_statement "puVar1[7] = 1;" (assignment_expression "puVar1[7] = 1" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (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) )))) = number_literal) ;) }))) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\ncontrol * ctrl_columns(controlset *s,int ncolumns,...)\n\n{\n  control *pcVar1;\n  char *pcVar2;\n  int iVar3;\n  control **ppcVar4;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar4 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar4[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 6;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).helpctx.p = (void *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).handler = (handler_fn)0x0;\n  (pcVar1->generic).context.p = (void *)0x0;\n  (pcVar1->generic).label = (char *)0x0;\n  if (iVar3 == 1) {\n    (pcVar1->columns).ncols = ncolumns;\n    s->ncolumns = ncolumns;\n    if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }\n  }\n  else {\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }\n  (pcVar1->editbox).percentwidth = 0;\n  return pcVar1;\n}\n\n" comment comment (function_definition "control * ctrl_columns(controlset *s,int ncolumns,...)\n\n{\n  control *pcVar1;\n  char *pcVar2;\n  int iVar3;\n  control **ppcVar4;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar4 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar4[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 6;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).helpctx.p = (void *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).handler = (handler_fn)0x0;\n  (pcVar1->generic).context.p = (void *)0x0;\n  (pcVar1->generic).label = (char *)0x0;\n  if (iVar3 == 1) {\n    (pcVar1->columns).ncols = ncolumns;\n    s->ncolumns = ncolumns;\n    if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }\n  }\n  else {\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }\n  (pcVar1->editbox).percentwidth = 0;\n  return pcVar1;\n}" type_identifier (pointer_declarator "* ctrl_columns(controlset *s,int ncolumns,...)" * (function_declarator "ctrl_columns(controlset *s,int ncolumns,...)" identifier (parameter_list "(controlset *s,int ncolumns,...)" ( (parameter_declaration "controlset *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "int ncolumns" primitive_type identifier) , (variadic_parameter "..." ...) )))) (compound_statement "{\n  control *pcVar1;\n  char *pcVar2;\n  int iVar3;\n  control **ppcVar4;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar4 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar4[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 6;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).helpctx.p = (void *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).handler = (handler_fn)0x0;\n  (pcVar1->generic).context.p = (void *)0x0;\n  (pcVar1->generic).label = (char *)0x0;\n  if (iVar3 == 1) {\n    (pcVar1->columns).ncols = ncolumns;\n    s->ncolumns = ncolumns;\n    if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }\n  }\n  else {\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }\n  (pcVar1->editbox).percentwidth = 0;\n  return pcVar1;\n}" { (declaration "control *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "control **ppcVar4;" type_identifier (pointer_declarator "**ppcVar4" * (pointer_declarator "*ppcVar4" * identifier)) ;) (expression_statement "pcVar1 = (control *)safemalloc(1,0x3c);" (assignment_expression "pcVar1 = (control *)safemalloc(1,0x3c)" identifier = (cast_expression "(control *)safemalloc(1,0x3c)" ( (type_descriptor "control *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "iVar3 = s->ncontrols;" (assignment_expression "iVar3 = s->ncontrols" identifier = (field_expression "s->ncontrols" identifier -> field_identifier)) ;) (if_statement "if (iVar3 < s->ctrlsize) {\n    ppcVar4 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }" if (parenthesized_expression "(iVar3 < s->ctrlsize)" ( (binary_expression "iVar3 < s->ctrlsize" identifier < (field_expression "s->ctrlsize" identifier -> field_identifier)) )) (compound_statement "{\n    ppcVar4 = s->ctrls;\n  }" { (expression_statement "ppcVar4 = s->ctrls;" (assignment_expression "ppcVar4 = s->ctrls" identifier = (field_expression "s->ctrls" identifier -> field_identifier)) ;) }) (else_clause "else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }" else (compound_statement "{\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar4;\n  }" { (expression_statement "s->ctrlsize = iVar3 + 0x20U;" (assignment_expression "s->ctrlsize = iVar3 + 0x20U" (field_expression "s->ctrlsize" identifier -> field_identifier) = (binary_expression "iVar3 + 0x20U" identifier + number_literal)) ;) (expression_statement "ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);" (assignment_expression "ppcVar4 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4)" identifier = (cast_expression "(control **)saferealloc(s->ctrls,iVar3 + 0x20U,4)" ( (type_descriptor "control **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "saferealloc(s->ctrls,iVar3 + 0x20U,4)" identifier (argument_list "(s->ctrls,iVar3 + 0x20U,4)" ( (field_expression "s->ctrls" identifier -> field_identifier) , (binary_expression "iVar3 + 0x20U" identifier + number_literal) , number_literal ))))) ;) (expression_statement "iVar3 = s->ncontrols;" (assignment_expression "iVar3 = s->ncontrols" identifier = (field_expression "s->ncontrols" identifier -> field_identifier)) ;) (expression_statement "s->ctrls = ppcVar4;" (assignment_expression "s->ctrls = ppcVar4" (field_expression "s->ctrls" identifier -> field_identifier) = identifier) ;) }))) (expression_statement "s->ncontrols = iVar3 + 1;" (assignment_expression "s->ncontrols = iVar3 + 1" (field_expression "s->ncontrols" identifier -> field_identifier) = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "ppcVar4[iVar3] = pcVar1;" (assignment_expression "ppcVar4[iVar3] = pcVar1" (subscript_expression "ppcVar4[iVar3]" identifier [ identifier ]) = identifier) ;) (expression_statement "iVar3 = s->ncolumns;" (assignment_expression "iVar3 = s->ncolumns" identifier = (field_expression "s->ncolumns" identifier -> field_identifier)) ;) (expression_statement "(pcVar1->generic).type = 6;" (assignment_expression "(pcVar1->generic).type = 6" (field_expression "(pcVar1->generic).type" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "(pcVar1->generic).tabdelay = 0;" (assignment_expression "(pcVar1->generic).tabdelay = 0" (field_expression "(pcVar1->generic).tabdelay" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "(pcVar1->generic).helpctx.p = (void *)0x0;" (assignment_expression "(pcVar1->generic).helpctx.p = (void *)0x0" (field_expression "(pcVar1->generic).helpctx.p" (field_expression "(pcVar1->generic).helpctx" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(pcVar1->generic).column = (iVar3 + -1) * 0x10000;" (assignment_expression "(pcVar1->generic).column = (iVar3 + -1) * 0x10000" (field_expression "(pcVar1->generic).column" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = (binary_expression "(iVar3 + -1) * 0x10000" (parenthesized_expression "(iVar3 + -1)" ( (binary_expression "iVar3 + -1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "(pcVar1->generic).handler = (handler_fn)0x0;" (assignment_expression "(pcVar1->generic).handler = (handler_fn)0x0" (field_expression "(pcVar1->generic).handler" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(handler_fn)0x0" ( (type_descriptor "handler_fn" type_identifier) ) number_literal)) ;) (expression_statement "(pcVar1->generic).context.p = (void *)0x0;" (assignment_expression "(pcVar1->generic).context.p = (void *)0x0" (field_expression "(pcVar1->generic).context.p" (field_expression "(pcVar1->generic).context" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "(pcVar1->generic).label = (char *)0x0;" (assignment_expression "(pcVar1->generic).label = (char *)0x0" (field_expression "(pcVar1->generic).label" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (iVar3 == 1) {\n    (pcVar1->columns).ncols = ncolumns;\n    s->ncolumns = ncolumns;\n    if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }\n  }\n  else {\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    (pcVar1->columns).ncols = ncolumns;\n    s->ncolumns = ncolumns;\n    if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }\n  }" { (expression_statement "(pcVar1->columns).ncols = ncolumns;" (assignment_expression "(pcVar1->columns).ncols = ncolumns" (field_expression "(pcVar1->columns).ncols" (parenthesized_expression "(pcVar1->columns)" ( (field_expression "pcVar1->columns" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "s->ncolumns = ncolumns;" (assignment_expression "s->ncolumns = ncolumns" (field_expression "s->ncolumns" identifier -> field_identifier) = identifier) ;) (if_statement "if (ncolumns != 1) {\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }" if (parenthesized_expression "(ncolumns != 1)" ( (binary_expression "ncolumns != 1" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = (char *)safemalloc(ncolumns,4);\n      (pcVar1->fileselect).filter = pcVar2;\n      if (ncolumns < 1) {\n        return pcVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);\n      return pcVar1;\n    }" { (expression_statement "pcVar2 = (char *)safemalloc(ncolumns,4);" (assignment_expression "pcVar2 = (char *)safemalloc(ncolumns,4)" identifier = (cast_expression "(char *)safemalloc(ncolumns,4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(ncolumns,4)" identifier (argument_list "(ncolumns,4)" ( identifier , number_literal ))))) ;) (expression_statement "(pcVar1->fileselect).filter = pcVar2;" (assignment_expression "(pcVar1->fileselect).filter = pcVar2" (field_expression "(pcVar1->fileselect).filter" (parenthesized_expression "(pcVar1->fileselect)" ( (field_expression "pcVar1->fileselect" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if (ncolumns < 1) {\n        return pcVar1;\n      }" if (parenthesized_expression "(ncolumns < 1)" ( (binary_expression "ncolumns < 1" identifier < number_literal) )) (compound_statement "{\n        return pcVar1;\n      }" { (return_statement "return pcVar1;" return identifier ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (ncolumns != iVar3);" do (compound_statement "{\n        *(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      }" { (expression_statement "*(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4);" (assignment_expression "*(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4) =\n             *(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (pointer_expression "*(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4)" * (cast_expression "(undefined4 *)((pcVar1->fileselect).filter + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((pcVar1->fileselect).filter + iVar3 * 4)" ( (binary_expression "(pcVar1->fileselect).filter + iVar3 * 4" (field_expression "(pcVar1->fileselect).filter" (parenthesized_expression "(pcVar1->fileselect)" ( (field_expression "pcVar1->fileselect" identifier -> field_identifier) )) . field_identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)(&stack0x0000000c + iVar3 * 4)" * (cast_expression "(undefined4 *)(&stack0x0000000c + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&stack0x0000000c + iVar3 * 4)" ( (binary_expression "&stack0x0000000c + iVar3 * 4" (pointer_expression "&stack0x0000000c" & identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ncolumns != iVar3)" ( (binary_expression "ncolumns != iVar3" identifier != identifier) )) ;) (return_statement "return pcVar1;" return identifier ;) })) }) (else_clause "else {\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }" else (compound_statement "{\n    if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    (pcVar1->columns).ncols = 1;\n    s->ncolumns = 1;\n  }" { (if_statement "if (ncolumns != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" if (parenthesized_expression "(ncolumns != 1)" ( (binary_expression "ncolumns != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" { comment (expression_statement "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");" (call_expression "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" identifier (argument_list "("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" ( (string_literal ""s->ncolumns == 1 || ncolumns == 1"" " string_content ") , (string_literal ""dialog.c"" " string_content ") , number_literal , (string_literal ""ctrl_columns"" " string_content ") ))) ;) })) (expression_statement "(pcVar1->columns).ncols = 1;" (assignment_expression "(pcVar1->columns).ncols = 1" (field_expression "(pcVar1->columns).ncols" (parenthesized_expression "(pcVar1->columns)" ( (field_expression "pcVar1->columns" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "s->ncolumns = 1;" (assignment_expression "s->ncolumns = 1" (field_expression "s->ncolumns" identifier -> field_identifier) = number_literal) ;) }))) (expression_statement "(pcVar1->editbox).percentwidth = 0;" (assignment_expression "(pcVar1->editbox).percentwidth = 0" (field_expression "(pcVar1->editbox).percentwidth" (parenthesized_expression "(pcVar1->editbox)" ( (field_expression "pcVar1->editbox" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined4 * FUN_00028940(int param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}\n\n" (function_definition "undefined4 * FUN_00028940(int param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00028940(int param_1,int param_2)" * (function_declarator "FUN_00028940(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined4 *)FUN_00030000(1,0x3c);" (assignment_expression "puVar1 = (undefined4 *)FUN_00030000(1,0x3c)" identifier = (cast_expression "(undefined4 *)FUN_00030000(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00030000(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" if (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x14))" ( (binary_expression "iVar3 < *(int *)(param_1 + 0x14)" identifier < (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) ))))) )) (compound_statement "{\n    iVar4 = *(int *)(param_1 + 0x18);\n  }" { (expression_statement "iVar4 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" { (expression_statement "*(int *)(param_1 + 0x14) = iVar3 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3 + 0x20" (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) )))) = (binary_expression "iVar3 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" identifier = (call_expression "FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" ( (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) )))) , (binary_expression "iVar3 + 0x20" identifier + number_literal) , number_literal )))) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" identifier = (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar4" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int *)(param_1 + 0x10) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3 + 1" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar4 + iVar3 * 4)" * (cast_expression "(undefined4 **)(iVar4 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar4 + iVar3 * 4)" ( (binary_expression "iVar4 + iVar3 * 4" identifier + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "iVar3 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xc)" identifier = (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = 6;" (assignment_expression "*puVar1 = 6" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = (iVar3 + -1) * 0x10000;" (assignment_expression "puVar1[3] = (iVar3 + -1) * 0x10000" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = (binary_expression "(iVar3 + -1) * 0x10000" (parenthesized_expression "(iVar3 + -1)" ( (binary_expression "iVar3 + -1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }" { (expression_statement "puVar1[7] = param_2;" (assignment_expression "puVar1[7] = param_2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(int *)(param_1 + 0xc) = param_2;" (assignment_expression "*(int *)(param_1 + 0xc) = param_2" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" { (expression_statement "uVar2 = FUN_00030000(param_2,4);" (assignment_expression "uVar2 = FUN_00030000(param_2,4)" identifier = (call_expression "FUN_00030000(param_2,4)" identifier (argument_list "(param_2,4)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[8] = uVar2;" (assignment_expression "puVar1[8] = uVar2" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 < 1) {\n        return puVar1;\n      }" if (parenthesized_expression "(param_2 < 1)" ( (binary_expression "param_2 < 1" identifier < number_literal) )) (compound_statement "{\n        return puVar1;\n      }" { (return_statement "return puVar1;" return identifier ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);" do (compound_statement "{\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      }" { (expression_statement "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);" (assignment_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (pointer_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4)" * (cast_expression "(undefined4 *)(puVar1[8] + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[8] + iVar3 * 4)" ( (binary_expression "puVar1[8] + iVar3 * 4" (subscript_expression "puVar1[8]" identifier [ number_literal ]) + (binary_expression "iVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)(&stack0x0000000c + iVar3 * 4)" * (cast_expression "(undefined4 *)(&stack0x0000000c + iVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(&stack0x0000000c + iVar3 * 4)" ( (binary_expression "&stack0x0000000c + iVar3 * 4" (pointer_expression "&stack0x0000000c" & identifier) + (binary_expression "iVar3 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 != iVar3)" ( (binary_expression "param_2 != iVar3" identifier != identifier) )) ;) (return_statement "return puVar1;" return identifier ;) })) }) (else_clause "else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" else (compound_statement "{\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" { (if_statement "if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" { (expression_statement "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");" (call_expression "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" identifier (argument_list "("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" ( (string_literal ""s->ncolumns == 1 || ncolumns == 1"" " string_content ") , (string_literal ""dialog.c"" " string_content ") , number_literal , (string_literal ""ctrl_columns"" " string_content ") ))) ;) })) (expression_statement "puVar1[7] = 1;" (assignment_expression "puVar1[7] = 1" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (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) )))) = number_literal) ;) }))) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (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) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT + LIT) , 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 (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) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = 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 (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_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 IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (binary_expression IDENT * LIT)) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (return_statement return IDENT ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 * FUN_00028940(int param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_00028940(int param_1,int param_2)" (* "*") (function_declarator "FUN_00028940(int param_1,int param_2)" (identifier "FUN_00028940") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 6;\n  puVar1[2] = 0;\n  puVar1[6] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[4] = 0;\n  puVar1[5] = 0;\n  puVar1[1] = 0;\n  if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }\n  puVar1[8] = 0;\n  return puVar1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "puVar1 = (undefined4 *)FUN_00030000(1,0x3c);" (assignment_expression "puVar1 = (undefined4 *)FUN_00030000(1,0x3c)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_00030000(1,0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00030000(1,0x3c)" (identifier "FUN_00030000") (argument_list "(1,0x3c)" (( "(") (number_literal "1") (, ",") (number_literal "0x3c") () ")"))))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar4 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" (if "if") (parenthesized_expression "(iVar3 < *(int *)(param_1 + 0x14))" (( "(") (binary_expression "iVar3 < *(int *)(param_1 + 0x14)" (identifier "iVar3") (< "<") (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")) () ")"))))) () ")")) (compound_statement "{\n    iVar4 = *(int *)(param_1 + 0x18);\n  }" ({ "{") (expression_statement "iVar4 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar4 = *(int *)(param_1 + 0x18)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" (else "else") (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar4;\n  }" ({ "{") (expression_statement "*(int *)(param_1 + 0x14) = iVar3 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3 + 0x20" (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")) () ")")))) (= "=") (binary_expression "iVar3 + 0x20" (identifier "iVar3") (+ "+") (number_literal "0x20"))) (; ";")) (expression_statement "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" (identifier "iVar4") (= "=") (call_expression "FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" (identifier "FUN_000300c0") (argument_list "(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" (( "(") (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")) () ")")))) (, ",") (binary_expression "iVar3 + 0x20" (identifier "iVar3") (+ "+") (number_literal "0x20")) (, ",") (number_literal "4") () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x10);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x10)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x18) = iVar4;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar4" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (} "}")))) (expression_statement "*(int *)(param_1 + 0x10) = iVar3 + 1;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3 + 1" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar4 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar4 + iVar3 * 4)" (* "*") (cast_expression "(undefined4 **)(iVar4 + iVar3 * 4)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar4 + iVar3 * 4)" (( "(") (binary_expression "iVar4 + iVar3 * 4" (identifier "iVar4") (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0xc);" (assignment_expression "iVar3 = *(int *)(param_1 + 0xc)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "*puVar1 = 6;" (assignment_expression "*puVar1 = 6" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "6")) (; ";")) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[3] = (iVar3 + -1) * 0x10000;" (assignment_expression "puVar1[3] = (iVar3 + -1) * 0x10000" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (binary_expression "(iVar3 + -1) * 0x10000" (parenthesized_expression "(iVar3 + -1)" (( "(") (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1")) () ")")) (* "*") (number_literal "0x10000"))) (; ";")) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar3 == 1) {\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }\n  else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" (if "if") (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    puVar1[7] = param_2;\n    *(int *)(param_1 + 0xc) = param_2;\n    if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }\n  }" ({ "{") (expression_statement "puVar1[7] = param_2;" (assignment_expression "puVar1[7] = param_2" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(int *)(param_1 + 0xc) = param_2;" (assignment_expression "*(int *)(param_1 + 0xc) = param_2" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_2 != 1) {\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      uVar2 = FUN_00030000(param_2,4);\n      puVar1[8] = uVar2;\n      if (param_2 < 1) {\n        return puVar1;\n      }\n      iVar3 = 0;\n      do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);\n      return puVar1;\n    }" ({ "{") (expression_statement "uVar2 = FUN_00030000(param_2,4);" (assignment_expression "uVar2 = FUN_00030000(param_2,4)" (identifier "uVar2") (= "=") (call_expression "FUN_00030000(param_2,4)" (identifier "FUN_00030000") (argument_list "(param_2,4)" (( "(") (identifier "param_2") (, ",") (number_literal "4") () ")")))) (; ";")) (expression_statement "puVar1[8] = uVar2;" (assignment_expression "puVar1[8] = uVar2" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (param_2 < 1) {\n        return puVar1;\n      }" (if "if") (parenthesized_expression "(param_2 < 1)" (( "(") (binary_expression "param_2 < 1" (identifier "param_2") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        return puVar1;\n      }" ({ "{") (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      } while (param_2 != iVar3);" (do "do") (compound_statement "{\n        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);\n        iVar3 = iVar3 + 1;\n      }" ({ "{") (expression_statement "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);" (assignment_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (pointer_expression "*(undefined4 *)(puVar1[8] + iVar3 * 4)" (* "*") (cast_expression "(undefined4 *)(puVar1[8] + iVar3 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[8] + iVar3 * 4)" (( "(") (binary_expression "puVar1[8] + iVar3 * 4" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (* "*") (cast_expression "(undefined4 *)(&stack0x0000000c + iVar3 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(&stack0x0000000c + iVar3 * 4)" (( "(") (binary_expression "&stack0x0000000c + iVar3 * 4" (pointer_expression "&stack0x0000000c" (& "&") (identifier "stack0x0000000c")) (+ "+") (binary_expression "iVar3 * 4" (identifier "iVar3") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 != iVar3)" (( "(") (binary_expression "param_2 != iVar3" (identifier "param_2") (!= "!=") (identifier "iVar3")) () ")")) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" (else "else") (compound_statement "{\n    if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }\n    puVar1[7] = 1;\n    *(undefined4 *)(param_1 + 0xc) = 1;\n  }" ({ "{") (if_statement "if (param_2 != 1) {\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n                    \n      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");\n    }" ({ "{") (expression_statement "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");" (call_expression "__assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" (identifier "__assert_fail") (argument_list "("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns")" (( "(") (string_literal ""s->ncolumns == 1 || ncolumns == 1"" (" """) (string_content "s->ncolumns == 1 || ncolumns == 1") (" """)) (, ",") (string_literal ""dialog.c"" (" """) (string_content "dialog.c") (" """)) (, ",") (number_literal "0xf3") (, ",") (string_literal ""ctrl_columns"" (" """) (string_content "ctrl_columns") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "puVar1[7] = 1;" (assignment_expression "puVar1[7] = 1" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xc) = 1" (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")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}")))) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

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

type_1 * function_1(type_2 *s,int var_4,...)

{
  type_1 *pcVar1;
  char *pcVar2;
  int var_2;
  type_1 **ppcVar4;
  
  pcVar1 = (type_1 *)var_1(1,0x3c);
  var_2 = s->ncontrols;
  if (var_2 < s->ctrlsize) {
    ppcVar4 = s->ctrls;
  }
  else {
    s->ctrlsize = var_2 + 0x20U;
    ppcVar4 = (type_1 **)var_3(s->ctrls,var_2 + 0x20U,4);
    var_2 = s->ncontrols;
    s->ctrls = ppcVar4;
  }
  s->ncontrols = var_2 + 1;
  ppcVar4[var_2] = pcVar1;
  var_2 = s->var_4;
  (pcVar1->generic).type = 6;
  (pcVar1->generic).tabdelay = 0;
  (pcVar1->generic).helpctx.p = (void *)0x0;
  (pcVar1->generic).column = (var_2 + -1) * 0x10000;
  (pcVar1->generic).handler = (type_3)0x0;
  (pcVar1->generic).context.p = (void *)0x0;
  (pcVar1->generic).label = (char *)0x0;
  if (var_2 == 1) {
    (pcVar1->columns).ncols = var_4;
    s->var_4 = var_4;
    if (var_4 != 1) {
      pcVar2 = (char *)var_1(var_4,4);
      (pcVar1->fileselect).filter = pcVar2;
      if (var_4 < 1) {
        return pcVar1;
      }
      var_2 = 0;
      do {
        *(type_4 *)((pcVar1->fileselect).filter + var_2 * 4) =
             *(type_4 *)(&stack0x0000000c + var_2 * 4);
        var_2 = var_2 + 1;
      } while (var_4 != var_2);
      return pcVar1;
    }
  }
  else {
    if (var_4 != 1) {
                    /* WARNING: Subroutine does not return */
      var_5("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");
    }
    (pcVar1->columns).ncols = 1;
    s->var_4 = 1;
  }
  (pcVar1->editbox).percentwidth = 0;
  return pcVar1;
}


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

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

undefined4 * MASKED(int param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  
  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);
  iVar3 = *(int *)(param_1 + 0x10);
  if (iVar3 < *(int *)(param_1 + 0x14)) {
    iVar4 = *(int *)(param_1 + 0x18);
  }
  else {
    *(int *)(param_1 + 0x14) = iVar3 + 0x20;
    iVar4 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);
    iVar3 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x18) = iVar4;
  }
  *(int *)(param_1 + 0x10) = iVar3 + 1;
  *(undefined4 **)(iVar4 + iVar3 * 4) = puVar1;
  iVar3 = *(int *)(param_1 + 0xc);
  *puVar1 = 6;
  puVar1[2] = 0;
  puVar1[6] = 0;
  puVar1[3] = (iVar3 + -1) * 0x10000;
  puVar1[4] = 0;
  puVar1[5] = 0;
  puVar1[1] = 0;
  if (iVar3 == 1) {
    puVar1[7] = param_2;
    *(int *)(param_1 + 0xc) = param_2;
    if (param_2 != 1) {
      uVar2 = FUN_00030000(param_2,4);
      puVar1[8] = uVar2;
      if (param_2 < 1) {
        return puVar1;
      }
      iVar3 = 0;
      do {
        *(undefined4 *)(puVar1[8] + iVar3 * 4) = *(undefined4 *)(&stack0x0000000c + iVar3 * 4);
        iVar3 = iVar3 + 1;
      } while (param_2 != iVar3);
      return puVar1;
    }
  }
  else {
    if (param_2 != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("s->ncolumns == 1 || ncolumns == 1","dialog.c",0xf3,"ctrl_columns");
    }
    puVar1[7] = 1;
    *(undefined4 *)(param_1 + 0xc) = 1;
  }
  puVar1[8] = 0;
  return puVar1;
}

