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

control * ctrl_pushbutton(controlset *s,char *label,char shortcut,intorptr helpctx,
                         handler_fn handler,intorptr context)

{
  control *pcVar1;
  control **ppcVar2;
  int iVar3;
  
  pcVar1 = (control *)safemalloc(1,0x3c);
  iVar3 = s->ncontrols;
  if (iVar3 < s->ctrlsize) {
    ppcVar2 = s->ctrls;
  }
  else {
    s->ctrlsize = iVar3 + 0x20U;
    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);
    iVar3 = s->ncontrols;
    s->ctrls = ppcVar2;
  }
  s->ncontrols = iVar3 + 1;
  ppcVar2[iVar3] = pcVar1;
  iVar3 = s->ncolumns;
  (pcVar1->generic).type = 4;
  (pcVar1->generic).tabdelay = 0;
  (pcVar1->generic).label = (char *)0x0;
  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;
  (pcVar1->generic).helpctx = helpctx;
  (pcVar1->generic).handler = handler;
  (pcVar1->generic).context = context;
  if (label != (char *)0x0) {
    label = dupstr(label);
  }
  (pcVar1->generic).label = label;
  (pcVar1->editbox).percentwidth = 0;
  (pcVar1->editbox).shortcut = shortcut;
  (pcVar1->editbox).password = 0;
  return pcVar1;
}



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

undefined4 *
FUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,
            undefined4 param_6)

{
  undefined4 *puVar1;
  int iVar2;
  int iVar3;
  
  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);
  iVar3 = *(int *)(param_1 + 0x10);
  if (iVar3 < *(int *)(param_1 + 0x14)) {
    iVar2 = *(int *)(param_1 + 0x18);
  }
  else {
    *(int *)(param_1 + 0x14) = iVar3 + 0x20;
    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);
    iVar3 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x18) = iVar2;
  }
  *(int *)(param_1 + 0x10) = iVar3 + 1;
  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;
  iVar3 = *(int *)(param_1 + 0xc);
  *puVar1 = 4;
  puVar1[2] = 0;
  puVar1[1] = 0;
  puVar1[3] = (iVar3 + -1) * 0x10000;
  puVar1[6] = param_4;
  puVar1[4] = param_5;
  puVar1[5] = param_6;
  if (param_2 != 0) {
    param_2 = FUN_0002f040(param_2);
  }
  puVar1[1] = param_2;
  puVar1[8] = 0;
  *(undefined1 *)(puVar1 + 7) = param_3;
  puVar1[9] = 0;
  return puVar1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001a360
ADD EBX,0x8c95b
SUB ESP,0x24
MOV EAX,dword ptr [ESP + 0x40]
MOV EDI,dword ptr [ESP + 0x38]
MOV EBP,dword ptr [ESP + 0x3c]
MOV dword ptr [ESP + 0x14],EAX
PUSH 0x3c
PUSH 0x1
CALL 0x00030000
MOV EDX,dword ptr [EDI + 0x10]
ADD ESP,0x10
MOV ESI,EAX
CMP EDX,dword ptr [EDI + 0x14]
JGE 0x00028f30
MOV EAX,dword ptr [EDI + 0x18]
LEA ECX,[EDX + 0x1]
MOV dword ptr [EDI + 0x10],ECX
MOV dword ptr [EAX + EDX*0x4],ESI
MOV EAX,dword ptr [EDI + 0xc]
MOV dword ptr [ESI],0x4
SUB EAX,0x1
MOV dword ptr [ESI + 0x8],0x0
SHL EAX,0x10
MOV dword ptr [ESI + 0x4],0x0
MOV dword ptr [ESI + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x3c]
MOV dword ptr [ESI + 0x18],EAX
MOV EAX,dword ptr [ESP + 0x40]
MOV dword ptr [ESI + 0x10],EAX
MOV EAX,dword ptr [ESP + 0x44]
MOV dword ptr [ESI + 0x14],EAX
TEST EBP,EBP
JZ 0x00028f0b
SUB ESP,0xc
PUSH EBP
CALL 0x0002f040
ADD ESP,0x10
MOV EBP,EAX
MOVZX EAX,byte ptr [ESP + 0xc]
MOV dword ptr [ESI + 0x4],EBP
MOV dword ptr [ESI + 0x20],0x0
MOV byte ptr [ESI + 0x1c],AL
MOV EAX,ESI
MOV dword ptr [ESI + 0x24],0x0
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
ADD EDX,0x20
MOV dword ptr [EDI + 0x14],EDX
PUSH 0x4
PUSH EDX
PUSH dword ptr [EDI + 0x18]
CALL 0x000300c0
MOV EDX,dword ptr [EDI + 0x10]
ADD ESP,0x10
MOV dword ptr [EDI + 0x18],EAX
JMP 0x00028ebb
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 *\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}\n\n" comment (function_definition "undefined4 *\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "*\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" * (function_declarator "FUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" identifier (parameter_list "(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" 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    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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    iVar2 = *(int *)(param_1 + 0x18);\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(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    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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 "iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar2 = 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) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (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 **)(iVar2 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + iVar3 * 4)" * (cast_expression "(undefined4 **)(iVar2 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + iVar3 * 4)" ( (binary_expression "iVar2 + 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 = 4;" (assignment_expression "*puVar1 = 4" (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[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" 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[6] = param_4;" (assignment_expression "puVar1[6] = param_4" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[4] = param_5;" (assignment_expression "puVar1[4] = param_5" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[5] = param_6;" (assignment_expression "puVar1[5] = param_6" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    param_2 = FUN_0002f040(param_2);\n  }" { (expression_statement "param_2 = FUN_0002f040(param_2);" (assignment_expression "param_2 = FUN_0002f040(param_2)" identifier = (call_expression "FUN_0002f040(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "puVar1[1] = param_2;" (assignment_expression "puVar1[1] = param_2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar1 + 7) = param_3;" (assignment_expression "*(undefined1 *)(puVar1 + 7) = param_3" (pointer_expression "*(undefined1 *)(puVar1 + 7)" * (cast_expression "(undefined1 *)(puVar1 + 7)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 7)" ( (binary_expression "puVar1 + 7" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[9] = 0;" (assignment_expression "puVar1[9] = 0" (subscript_expression "puVar1[9]" 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\ncontrol * ctrl_pushbutton(controlset *s,char *label,char shortcut,intorptr helpctx,\n                         handler_fn handler,intorptr context)\n\n{\n  control *pcVar1;\n  control **ppcVar2;\n  int iVar3;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar2 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar2[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 4;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).label = (char *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).helpctx = helpctx;\n  (pcVar1->generic).handler = handler;\n  (pcVar1->generic).context = context;\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).percentwidth = 0;\n  (pcVar1->editbox).shortcut = shortcut;\n  (pcVar1->editbox).password = 0;\n  return pcVar1;\n}\n\n" comment (function_definition "control * ctrl_pushbutton(controlset *s,char *label,char shortcut,intorptr helpctx,\n                         handler_fn handler,intorptr context)\n\n{\n  control *pcVar1;\n  control **ppcVar2;\n  int iVar3;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar2 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar2[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 4;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).label = (char *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).helpctx = helpctx;\n  (pcVar1->generic).handler = handler;\n  (pcVar1->generic).context = context;\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).percentwidth = 0;\n  (pcVar1->editbox).shortcut = shortcut;\n  (pcVar1->editbox).password = 0;\n  return pcVar1;\n}" type_identifier (pointer_declarator "* ctrl_pushbutton(controlset *s,char *label,char shortcut,intorptr helpctx,\n                         handler_fn handler,intorptr context)" * (function_declarator "ctrl_pushbutton(controlset *s,char *label,char shortcut,intorptr helpctx,\n                         handler_fn handler,intorptr context)" identifier (parameter_list "(controlset *s,char *label,char shortcut,intorptr helpctx,\n                         handler_fn handler,intorptr context)" ( (parameter_declaration "controlset *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "char *label" primitive_type (pointer_declarator "*label" * identifier)) , (parameter_declaration "char shortcut" primitive_type identifier) , (parameter_declaration "intorptr helpctx" type_identifier identifier) , (parameter_declaration "handler_fn handler" type_identifier identifier) , (parameter_declaration "intorptr context" type_identifier identifier) )))) (compound_statement "{\n  control *pcVar1;\n  control **ppcVar2;\n  int iVar3;\n  \n  pcVar1 = (control *)safemalloc(1,0x3c);\n  iVar3 = s->ncontrols;\n  if (iVar3 < s->ctrlsize) {\n    ppcVar2 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\n  }\n  s->ncontrols = iVar3 + 1;\n  ppcVar2[iVar3] = pcVar1;\n  iVar3 = s->ncolumns;\n  (pcVar1->generic).type = 4;\n  (pcVar1->generic).tabdelay = 0;\n  (pcVar1->generic).label = (char *)0x0;\n  (pcVar1->generic).column = (iVar3 + -1) * 0x10000;\n  (pcVar1->generic).helpctx = helpctx;\n  (pcVar1->generic).handler = handler;\n  (pcVar1->generic).context = context;\n  if (label != (char *)0x0) {\n    label = dupstr(label);\n  }\n  (pcVar1->generic).label = label;\n  (pcVar1->editbox).percentwidth = 0;\n  (pcVar1->editbox).shortcut = shortcut;\n  (pcVar1->editbox).password = 0;\n  return pcVar1;\n}" { (declaration "control *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (declaration "control **ppcVar2;" type_identifier (pointer_declarator "**ppcVar2" * (pointer_declarator "*ppcVar2" * identifier)) ;) (declaration "int iVar3;" primitive_type 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    ppcVar2 = s->ctrls;\n  }\n  else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\n  }" if (parenthesized_expression "(iVar3 < s->ctrlsize)" ( (binary_expression "iVar3 < s->ctrlsize" identifier < (field_expression "s->ctrlsize" identifier -> field_identifier)) )) (compound_statement "{\n    ppcVar2 = s->ctrls;\n  }" { (expression_statement "ppcVar2 = s->ctrls;" (assignment_expression "ppcVar2 = s->ctrls" identifier = (field_expression "s->ctrls" identifier -> field_identifier)) ;) }) (else_clause "else {\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\n  }" else (compound_statement "{\n    s->ctrlsize = iVar3 + 0x20U;\n    ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);\n    iVar3 = s->ncontrols;\n    s->ctrls = ppcVar2;\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 "ppcVar2 = (control **)saferealloc(s->ctrls,iVar3 + 0x20U,4);" (assignment_expression "ppcVar2 = (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 = ppcVar2;" (assignment_expression "s->ctrls = ppcVar2" (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 "ppcVar2[iVar3] = pcVar1;" (assignment_expression "ppcVar2[iVar3] = pcVar1" (subscript_expression "ppcVar2[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 = 4;" (assignment_expression "(pcVar1->generic).type = 4" (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).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)) ;) (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).helpctx = helpctx;" (assignment_expression "(pcVar1->generic).helpctx = helpctx" (field_expression "(pcVar1->generic).helpctx" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(pcVar1->generic).handler = handler;" (assignment_expression "(pcVar1->generic).handler = handler" (field_expression "(pcVar1->generic).handler" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(pcVar1->generic).context = context;" (assignment_expression "(pcVar1->generic).context = context" (field_expression "(pcVar1->generic).context" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if (label != (char *)0x0) {\n    label = dupstr(label);\n  }" if (parenthesized_expression "(label != (char *)0x0)" ( (binary_expression "label != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    label = dupstr(label);\n  }" { (expression_statement "label = dupstr(label);" (assignment_expression "label = dupstr(label)" identifier = (call_expression "dupstr(label)" identifier (argument_list "(label)" ( identifier )))) ;) })) (expression_statement "(pcVar1->generic).label = label;" (assignment_expression "(pcVar1->generic).label = label" (field_expression "(pcVar1->generic).label" (parenthesized_expression "(pcVar1->generic)" ( (field_expression "pcVar1->generic" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (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) ;) (expression_statement "(pcVar1->editbox).shortcut = shortcut;" (assignment_expression "(pcVar1->editbox).shortcut = shortcut" (field_expression "(pcVar1->editbox).shortcut" (parenthesized_expression "(pcVar1->editbox)" ( (field_expression "pcVar1->editbox" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "(pcVar1->editbox).password = 0;" (assignment_expression "(pcVar1->editbox).password = 0" (field_expression "(pcVar1->editbox).password" (parenthesized_expression "(pcVar1->editbox)" ( (field_expression "pcVar1->editbox" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined4 *\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}\n\n" (function_definition "undefined4 *\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" type_identifier (pointer_declarator "*\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" * (function_declarator "FUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" identifier (parameter_list "(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined1 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" 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    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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    iVar2 = *(int *)(param_1 + 0x18);\n  }" { (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(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    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }" else (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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 "iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar2 = 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) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (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 **)(iVar2 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + iVar3 * 4)" * (cast_expression "(undefined4 **)(iVar2 + iVar3 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + iVar3 * 4)" ( (binary_expression "iVar2 + 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 = 4;" (assignment_expression "*puVar1 = 4" (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[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" 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[6] = param_4;" (assignment_expression "puVar1[6] = param_4" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[4] = param_5;" (assignment_expression "puVar1[4] = param_5" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[5] = param_6;" (assignment_expression "puVar1[5] = param_6" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    param_2 = FUN_0002f040(param_2);\n  }" { (expression_statement "param_2 = FUN_0002f040(param_2);" (assignment_expression "param_2 = FUN_0002f040(param_2)" identifier = (call_expression "FUN_0002f040(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) })) (expression_statement "puVar1[1] = param_2;" (assignment_expression "puVar1[1] = param_2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*(undefined1 *)(puVar1 + 7) = param_3;" (assignment_expression "*(undefined1 *)(puVar1 + 7) = param_3" (pointer_expression "*(undefined1 *)(puVar1 + 7)" * (cast_expression "(undefined1 *)(puVar1 + 7)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 7)" ( (binary_expression "puVar1 + 7" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[9] = 0;" (assignment_expression "puVar1[9] = 0" (subscript_expression "puVar1[9]" 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) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_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 )))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (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) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 *\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" (type_identifier "undefined4") (pointer_declarator "*\nFUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" (* "*") (function_declarator "FUN_00028e80(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" (identifier "FUN_00028e80") (parameter_list "(int param_1,int param_2,undefined1 param_3,undefined4 param_4,undefined4 param_5,\n            undefined4 param_6)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined1 param_3" (type_identifier "undefined1") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) () ")")))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int iVar3;\n  \n  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);\n  iVar3 = *(int *)(param_1 + 0x10);\n  if (iVar3 < *(int *)(param_1 + 0x14)) {\n    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }\n  *(int *)(param_1 + 0x10) = iVar3 + 1;\n  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;\n  iVar3 = *(int *)(param_1 + 0xc);\n  *puVar1 = 4;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  puVar1[3] = (iVar3 + -1) * 0x10000;\n  puVar1[6] = param_4;\n  puVar1[4] = param_5;\n  puVar1[5] = param_6;\n  if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }\n  puVar1[1] = param_2;\n  puVar1[8] = 0;\n  *(undefined1 *)(puVar1 + 7) = param_3;\n  puVar1[9] = 0;\n  return puVar1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (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    iVar2 = *(int *)(param_1 + 0x18);\n  }\n  else {\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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    iVar2 = *(int *)(param_1 + 0x18);\n  }" ({ "{") (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x18)" (identifier "iVar2") (= "=") (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    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\n  }" (else "else") (compound_statement "{\n    *(int *)(param_1 + 0x14) = iVar3 + 0x20;\n    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);\n    iVar3 = *(int *)(param_1 + 0x10);\n    *(int *)(param_1 + 0x18) = iVar2;\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 "iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);" (assignment_expression "iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4)" (identifier "iVar2") (= "=") (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) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (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 "iVar2")) (; ";")) (} "}")))) (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 **)(iVar2 + iVar3 * 4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + iVar3 * 4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + iVar3 * 4)" (* "*") (cast_expression "(undefined4 **)(iVar2 + iVar3 * 4)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + iVar3 * 4)" (( "(") (binary_expression "iVar2 + iVar3 * 4" (identifier "iVar2") (+ "+") (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 = 4;" (assignment_expression "*puVar1 = 4" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "4")) (; ";")) (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[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (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[6] = param_4;" (assignment_expression "puVar1[6] = param_4" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "puVar1[4] = param_5;" (assignment_expression "puVar1[4] = param_5" (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "param_5")) (; ";")) (expression_statement "puVar1[5] = param_6;" (assignment_expression "puVar1[5] = param_6" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "param_6")) (; ";")) (if_statement "if (param_2 != 0) {\n    param_2 = FUN_0002f040(param_2);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    param_2 = FUN_0002f040(param_2);\n  }" ({ "{") (expression_statement "param_2 = FUN_0002f040(param_2);" (assignment_expression "param_2 = FUN_0002f040(param_2)" (identifier "param_2") (= "=") (call_expression "FUN_0002f040(param_2)" (identifier "FUN_0002f040") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (} "}"))) (expression_statement "puVar1[1] = param_2;" (assignment_expression "puVar1[1] = param_2" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "puVar1[8] = 0;" (assignment_expression "puVar1[8] = 0" (subscript_expression "puVar1[8]" (identifier "puVar1") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(puVar1 + 7) = param_3;" (assignment_expression "*(undefined1 *)(puVar1 + 7) = param_3" (pointer_expression "*(undefined1 *)(puVar1 + 7)" (* "*") (cast_expression "(undefined1 *)(puVar1 + 7)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 7)" (( "(") (binary_expression "puVar1 + 7" (identifier "puVar1") (+ "+") (number_literal "7")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar1[9] = 0;" (assignment_expression "puVar1[9] = 0" (subscript_expression "puVar1[9]" (identifier "puVar1") ([ "[") (number_literal "9") (] "]")) (= "=") (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 */

type_1 * function_1(type_2 *s,char *var_4,char shortcut,type_3 helpctx,
                         type_4 handler,type_3 context)

{
  type_1 *pcVar1;
  type_1 **ppcVar2;
  int var_2;
  
  pcVar1 = (type_1 *)var_1(1,0x3c);
  var_2 = s->ncontrols;
  if (var_2 < s->ctrlsize) {
    ppcVar2 = s->ctrls;
  }
  else {
    s->ctrlsize = var_2 + 0x20U;
    ppcVar2 = (type_1 **)var_3(s->ctrls,var_2 + 0x20U,4);
    var_2 = s->ncontrols;
    s->ctrls = ppcVar2;
  }
  s->ncontrols = var_2 + 1;
  ppcVar2[var_2] = pcVar1;
  var_2 = s->ncolumns;
  (pcVar1->generic).type = 4;
  (pcVar1->generic).tabdelay = 0;
  (pcVar1->generic).var_4 = (char *)0x0;
  (pcVar1->generic).column = (var_2 + -1) * 0x10000;
  (pcVar1->generic).helpctx = helpctx;
  (pcVar1->generic).handler = handler;
  (pcVar1->generic).context = context;
  if (var_4 != (char *)0x0) {
    var_4 = var_5(var_4);
  }
  (pcVar1->generic).var_4 = var_4;
  (pcVar1->editbox).percentwidth = 0;
  (pcVar1->editbox).shortcut = shortcut;
  (pcVar1->editbox).password = 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)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator 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: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (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 (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (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: (identifier))) (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,undefined1 param_3,undefined4 param_4,undefined4 param_5,
            undefined4 param_6)

{
  undefined4 *puVar1;
  int iVar2;
  int iVar3;
  
  puVar1 = (undefined4 *)FUN_00030000(1,0x3c);
  iVar3 = *(int *)(param_1 + 0x10);
  if (iVar3 < *(int *)(param_1 + 0x14)) {
    iVar2 = *(int *)(param_1 + 0x18);
  }
  else {
    *(int *)(param_1 + 0x14) = iVar3 + 0x20;
    iVar2 = FUN_000300c0(*(undefined4 *)(param_1 + 0x18),iVar3 + 0x20,4);
    iVar3 = *(int *)(param_1 + 0x10);
    *(int *)(param_1 + 0x18) = iVar2;
  }
  *(int *)(param_1 + 0x10) = iVar3 + 1;
  *(undefined4 **)(iVar2 + iVar3 * 4) = puVar1;
  iVar3 = *(int *)(param_1 + 0xc);
  *puVar1 = 4;
  puVar1[2] = 0;
  puVar1[1] = 0;
  puVar1[3] = (iVar3 + -1) * 0x10000;
  puVar1[6] = param_4;
  puVar1[4] = param_5;
  puVar1[5] = param_6;
  if (param_2 != 0) {
    param_2 = FUN_0002f040(param_2);
  }
  puVar1[1] = param_2;
  puVar1[8] = 0;
  *(undefined1 *)(puVar1 + 7) = param_3;
  puVar1[9] = 0;
  return puVar1;
}

