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

void serial_flow_handler(control *ctrl,void *dlg,void *data,int event)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  if (event != 0) {
    if (event != 3) {
      return;
    }
    iVar2 = dlg_listbox_index(ctrl,dlg);
    iVar3 = 0;
    if (-1 < iVar2) {
      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);
    }
    conf_set_int((Conf *)data,0x3e,iVar3);
    return;
  }
  uVar1 = (ctrl->generic).context.i;
  iVar2 = conf_get_int((Conf *)data,0x3e);
  dlg_update_start(ctrl,dlg);
  dlg_listbox_clear(ctrl,dlg);
  uVar4 = 0;
  do {
    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {
      dlg_listbox_addwithid
                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,
                 serial_flow_handler::flows[uVar4].val);
    }
    uVar4 = uVar4 + 1;
  } while (uVar4 != 4);
  iVar3 = 0;
  uVar4 = 0;
  do {
    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {
      if (serial_flow_handler::flows[uVar4].val == iVar2) {
        dlg_listbox_select(ctrl,dlg,iVar3);
        event = iVar2;
        goto LAB_000346e6;
      }
      iVar3 = iVar3 + 1;
    }
    uVar4 = uVar4 + 1;
  } while (uVar4 != 4);
  dlg_listbox_select(ctrl,dlg,0);
LAB_000346e6:
  dlg_update_done(ctrl,dlg);
  conf_set_int((Conf *)data,0x3e,event);
  return;
}



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

void FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  uint uVar5;
  
  if (param_4 != 0) {
    if (param_4 != 3) {
      return;
    }
    iVar2 = FUN_00085ba0(param_1,param_2);
    uVar4 = 0;
    if (-1 < iVar2) {
      uVar4 = FUN_00085a70(param_1,param_2,iVar2);
    }
    FUN_00020290(param_3,0x3e,uVar4);
    return;
  }
  uVar1 = *(uint *)(param_1 + 0x14);
  iVar2 = FUN_0001fb70(param_3,0x3e);
  FUN_00086640(param_1,param_2);
  FUN_000856e0(param_1,param_2);
  uVar5 = 0;
  do {
    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {
      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);
    }
    uVar5 = uVar5 + 1;
  } while (uVar5 != 4);
  iVar3 = 0;
  uVar5 = 0;
  do {
    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {
      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {
        FUN_00086070(param_1,param_2,iVar3);
        param_4 = iVar2;
        goto LAB_000346e6;
      }
      iVar3 = iVar3 + 1;
    }
    uVar5 = uVar5 + 1;
  } while (uVar5 != 4);
  FUN_00086070(param_1,param_2,0);
LAB_000346e6:
  FUN_00086650(param_1,param_2);
  FUN_00020290(param_3,0x3e,param_4);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xdc117
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x3c]
MOV ESI,dword ptr [ESP + 0x30]
TEST EAX,EAX
JZ 0x00034668
CMP dword ptr [ESP + 0x3c],0x3
JZ 0x00034740
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
MOV EDI,dword ptr [ESI + 0x14]
PUSH 0x3e
PUSH dword ptr [ESP + 0x44]
CALL 0x0001fb70
MOV EBP,EAX
POP EAX
POP EDX
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00086640
POP ECX
POP EAX
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x000856e0
ADD ESP,0x10
XOR EAX,EAX
MOV dword ptr [ESP + 0xc],EBP
MOV EBP,ESI
MOV ESI,EAX
BT EDI,ESI
JC 0x00034710
ADD ESI,0x1
CMP ESI,0x4
JNZ 0x000346a0
MOV ESI,EBP
MOV EBP,dword ptr [ESP + 0xc]
XOR ECX,ECX
XOR EAX,EAX
BT EDI,EAX
JNC 0x000346cc
CMP dword ptr [EBX + EAX*0x8 + 0xffffe094],EBP
JZ 0x00034788
ADD ECX,0x1
ADD EAX,0x1
CMP EAX,0x4
JNZ 0x000346b7
SUB ESP,0x4
PUSH 0x0
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00086070
ADD ESP,0x10
SUB ESP,0x8
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00086650
ADD ESP,0xc
PUSH dword ptr [ESP + 0x40]
PUSH 0x3e
PUSH dword ptr [ESP + 0x44]
CALL 0x00020290
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
LEA EAX,[ESI*0x8 + 0x0]
PUSH dword ptr [EAX + EBX*0x1 + 0xffffe094]
PUSH dword ptr [EAX + EBX*0x1 + 0xffffe090]
PUSH dword ptr [ESP + 0x3c]
PUSH EBP
CALL 0x00085880
ADD ESP,0x10
JMP 0x000346a5
SUB ESP,0x8
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00085ba0
ADD ESP,0x10
XOR EDX,EDX
TEST EAX,EAX
JS 0x00034769
SUB ESP,0x4
PUSH EAX
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00085a70
ADD ESP,0x10
MOV EDX,EAX
SUB ESP,0x4
PUSH EDX
PUSH 0x3e
PUSH dword ptr [ESP + 0x44]
CALL 0x00020290
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH ECX
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00086070
ADD ESP,0x10
MOV dword ptr [ESP + 0x3c],EBP
JMP 0x000346e6
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}\n\n" comment (function_definition "void FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" primitive_type (function_declarator "FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (if_statement "if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" { (if_statement "if (param_4 != 3) {\n      return;\n    }" if (parenthesized_expression "(param_4 != 3)" ( (binary_expression "param_4 != 3" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar2 = FUN_00085ba0(param_1,param_2);" (assignment_expression "iVar2 = FUN_00085ba0(param_1,param_2)" identifier = (call_expression "FUN_00085ba0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" { (expression_statement "uVar4 = FUN_00085a70(param_1,param_2,iVar2);" (assignment_expression "uVar4 = FUN_00085a70(param_1,param_2,iVar2)" identifier = (call_expression "FUN_00085a70(param_1,param_2,iVar2)" identifier (argument_list "(param_1,param_2,iVar2)" ( identifier , identifier , identifier )))) ;) })) (expression_statement "FUN_00020290(param_3,0x3e,uVar4);" (call_expression "FUN_00020290(param_3,0x3e,uVar4)" identifier (argument_list "(param_3,0x3e,uVar4)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x14)" identifier = (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = FUN_0001fb70(param_3,0x3e);" (assignment_expression "iVar2 = FUN_0001fb70(param_3,0x3e)" identifier = (call_expression "FUN_0001fb70(param_3,0x3e)" identifier (argument_list "(param_3,0x3e)" ( identifier , number_literal )))) ;) (expression_statement "FUN_00086640(param_1,param_2);" (call_expression "FUN_00086640(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "FUN_000856e0(param_1,param_2);" (call_expression "FUN_000856e0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" if (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" identifier >> (parenthesized_expression "(uVar5 & 0x1f)" ( (binary_expression "uVar5 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" { (expression_statement "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);" (call_expression "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" identifier (argument_list "(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" ( identifier , identifier , (subscript_expression "(&PTR_s_None_0010e7e0)[uVar5 * 2]" (parenthesized_expression "(&PTR_s_None_0010e7e0)" ( (pointer_expression "&PTR_s_None_0010e7e0" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) , (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" ( (pointer_expression "&DAT_0010e7e4" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) ))) ;) })) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != 4)" ( (binary_expression "uVar5 != 4" identifier != number_literal) )) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" if (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" identifier >> (parenthesized_expression "(uVar5 & 0x1f)" ( (binary_expression "uVar5 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" { (if_statement "if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" if (parenthesized_expression "((&DAT_0010e7e4)[uVar5 * 2] == iVar2)" ( (binary_expression "(&DAT_0010e7e4)[uVar5 * 2] == iVar2" (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" ( (pointer_expression "&DAT_0010e7e4" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) == identifier) )) (compound_statement "{\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" { (expression_statement "FUN_00086070(param_1,param_2,iVar3);" (call_expression "FUN_00086070(param_1,param_2,iVar3)" identifier (argument_list "(param_1,param_2,iVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_4 = iVar2;" (assignment_expression "param_4 = iVar2" identifier = identifier) ;) (goto_statement "goto LAB_000346e6;" goto statement_identifier ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != 4)" ( (binary_expression "uVar5 != 4" identifier != number_literal) )) ;) (expression_statement "FUN_00086070(param_1,param_2,0);" (call_expression "FUN_00086070(param_1,param_2,0)" identifier (argument_list "(param_1,param_2,0)" ( identifier , identifier , number_literal ))) ;) (labeled_statement "LAB_000346e6:\n  FUN_00086650(param_1,param_2);" statement_identifier : (expression_statement "FUN_00086650(param_1,param_2);" (call_expression "FUN_00086650(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;)) (expression_statement "FUN_00020290(param_3,0x3e,param_4);" (call_expression "FUN_00020290(param_3,0x3e,param_4)" identifier (argument_list "(param_3,0x3e,param_4)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid serial_flow_handler(control *ctrl,void *dlg,void *data,int event)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  if (event != 0) {\n    if (event != 3) {\n      return;\n    }\n    iVar2 = dlg_listbox_index(ctrl,dlg);\n    iVar3 = 0;\n    if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }\n    conf_set_int((Conf *)data,0x3e,iVar3);\n    return;\n  }\n  uVar1 = (ctrl->generic).context.i;\n  iVar2 = conf_get_int((Conf *)data,0x3e);\n  dlg_update_start(ctrl,dlg);\n  dlg_listbox_clear(ctrl,dlg);\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  iVar3 = 0;\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  dlg_listbox_select(ctrl,dlg,0);\nLAB_000346e6:\n  dlg_update_done(ctrl,dlg);\n  conf_set_int((Conf *)data,0x3e,event);\n  return;\n}\n\n" comment (function_definition "void serial_flow_handler(control *ctrl,void *dlg,void *data,int event)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  if (event != 0) {\n    if (event != 3) {\n      return;\n    }\n    iVar2 = dlg_listbox_index(ctrl,dlg);\n    iVar3 = 0;\n    if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }\n    conf_set_int((Conf *)data,0x3e,iVar3);\n    return;\n  }\n  uVar1 = (ctrl->generic).context.i;\n  iVar2 = conf_get_int((Conf *)data,0x3e);\n  dlg_update_start(ctrl,dlg);\n  dlg_listbox_clear(ctrl,dlg);\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  iVar3 = 0;\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  dlg_listbox_select(ctrl,dlg,0);\nLAB_000346e6:\n  dlg_update_done(ctrl,dlg);\n  conf_set_int((Conf *)data,0x3e,event);\n  return;\n}" primitive_type (function_declarator "serial_flow_handler(control *ctrl,void *dlg,void *data,int event)" identifier (parameter_list "(control *ctrl,void *dlg,void *data,int event)" ( (parameter_declaration "control *ctrl" type_identifier (pointer_declarator "*ctrl" * identifier)) , (parameter_declaration "void *dlg" primitive_type (pointer_declarator "*dlg" * identifier)) , (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int event" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  if (event != 0) {\n    if (event != 3) {\n      return;\n    }\n    iVar2 = dlg_listbox_index(ctrl,dlg);\n    iVar3 = 0;\n    if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }\n    conf_set_int((Conf *)data,0x3e,iVar3);\n    return;\n  }\n  uVar1 = (ctrl->generic).context.i;\n  iVar2 = conf_get_int((Conf *)data,0x3e);\n  dlg_update_start(ctrl,dlg);\n  dlg_listbox_clear(ctrl,dlg);\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  iVar3 = 0;\n  uVar4 = 0;\n  do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);\n  dlg_listbox_select(ctrl,dlg,0);\nLAB_000346e6:\n  dlg_update_done(ctrl,dlg);\n  conf_set_int((Conf *)data,0x3e,event);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (event != 0) {\n    if (event != 3) {\n      return;\n    }\n    iVar2 = dlg_listbox_index(ctrl,dlg);\n    iVar3 = 0;\n    if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }\n    conf_set_int((Conf *)data,0x3e,iVar3);\n    return;\n  }" if (parenthesized_expression "(event != 0)" ( (binary_expression "event != 0" identifier != number_literal) )) (compound_statement "{\n    if (event != 3) {\n      return;\n    }\n    iVar2 = dlg_listbox_index(ctrl,dlg);\n    iVar3 = 0;\n    if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }\n    conf_set_int((Conf *)data,0x3e,iVar3);\n    return;\n  }" { (if_statement "if (event != 3) {\n      return;\n    }" if (parenthesized_expression "(event != 3)" ( (binary_expression "event != 3" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar2 = dlg_listbox_index(ctrl,dlg);" (assignment_expression "iVar2 = dlg_listbox_index(ctrl,dlg)" identifier = (call_expression "dlg_listbox_index(ctrl,dlg)" identifier (argument_list "(ctrl,dlg)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar2) {\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);\n    }" { (expression_statement "iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2);" (assignment_expression "iVar3 = dlg_listbox_getid(ctrl,dlg,iVar2)" identifier = (call_expression "dlg_listbox_getid(ctrl,dlg,iVar2)" identifier (argument_list "(ctrl,dlg,iVar2)" ( identifier , identifier , identifier )))) ;) })) (expression_statement "conf_set_int((Conf *)data,0x3e,iVar3);" (call_expression "conf_set_int((Conf *)data,0x3e,iVar3)" identifier (argument_list "((Conf *)data,0x3e,iVar3)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = (ctrl->generic).context.i;" (assignment_expression "uVar1 = (ctrl->generic).context.i" identifier = (field_expression "(ctrl->generic).context.i" (field_expression "(ctrl->generic).context" (parenthesized_expression "(ctrl->generic)" ( (field_expression "ctrl->generic" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "iVar2 = conf_get_int((Conf *)data,0x3e);" (assignment_expression "iVar2 = conf_get_int((Conf *)data,0x3e)" identifier = (call_expression "conf_get_int((Conf *)data,0x3e)" identifier (argument_list "((Conf *)data,0x3e)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal )))) ;) (expression_statement "dlg_update_start(ctrl,dlg);" (call_expression "dlg_update_start(ctrl,dlg)" identifier (argument_list "(ctrl,dlg)" ( identifier , identifier ))) ;) (expression_statement "dlg_listbox_clear(ctrl,dlg);" (call_expression "dlg_listbox_clear(ctrl,dlg)" identifier (argument_list "(ctrl,dlg)" ( identifier , identifier ))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }\n    uVar4 = uVar4 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }" if (parenthesized_expression "((uVar1 >> (uVar4 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar4 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar4 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar4 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar4 & 0x1f)" identifier >> (parenthesized_expression "(uVar4 & 0x1f)" ( (binary_expression "uVar4 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);\n    }" { (expression_statement "dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val);" (call_expression "dlg_listbox_addwithid\n                (ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val)" identifier (argument_list "(ctrl,dlg,serial_flow_handler::flows[uVar4].name,\n                 serial_flow_handler::flows[uVar4].val)" ( identifier , identifier , (field_expression "serial_flow_handler::flows[uVar4].name" (subscript_expression "serial_flow_handler::flows[uVar4]" identifier (ERROR "::flows" : : identifier) [ identifier ]) . field_identifier) , (field_expression "serial_flow_handler::flows[uVar4].val" (subscript_expression "serial_flow_handler::flows[uVar4]" identifier (ERROR "::flows" : : identifier) [ identifier ]) . field_identifier) ))) ;) })) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 4)" ( (binary_expression "uVar4 != 4" identifier != number_literal) )) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar4 = uVar4 + 1;\n  } while (uVar4 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar4 = uVar4 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar4 & 0x1f) & 1) != 0) {\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" if (parenthesized_expression "((uVar1 >> (uVar4 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar4 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar4 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar4 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar4 & 0x1f)" identifier >> (parenthesized_expression "(uVar4 & 0x1f)" ( (binary_expression "uVar4 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" { (if_statement "if (serial_flow_handler::flows[uVar4].val == iVar2) {\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }" if (parenthesized_expression "(serial_flow_handler::flows[uVar4].val == iVar2)" ( (binary_expression "serial_flow_handler::flows[uVar4].val == iVar2" (field_expression "serial_flow_handler::flows[uVar4].val" (subscript_expression "serial_flow_handler::flows[uVar4]" identifier (ERROR "::flows" : : identifier) [ identifier ]) . field_identifier) == identifier) )) (compound_statement "{\n        dlg_listbox_select(ctrl,dlg,iVar3);\n        event = iVar2;\n        goto LAB_000346e6;\n      }" { (expression_statement "dlg_listbox_select(ctrl,dlg,iVar3);" (call_expression "dlg_listbox_select(ctrl,dlg,iVar3)" identifier (argument_list "(ctrl,dlg,iVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "event = iVar2;" (assignment_expression "event = iVar2" identifier = identifier) ;) (goto_statement "goto LAB_000346e6;" goto statement_identifier ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "uVar4 = uVar4 + 1;" (assignment_expression "uVar4 = uVar4 + 1" identifier = (binary_expression "uVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 4)" ( (binary_expression "uVar4 != 4" identifier != number_literal) )) ;) (expression_statement "dlg_listbox_select(ctrl,dlg,0);" (call_expression "dlg_listbox_select(ctrl,dlg,0)" identifier (argument_list "(ctrl,dlg,0)" ( identifier , identifier , number_literal ))) ;) (labeled_statement "LAB_000346e6:\n  dlg_update_done(ctrl,dlg);" statement_identifier : (expression_statement "dlg_update_done(ctrl,dlg);" (call_expression "dlg_update_done(ctrl,dlg)" identifier (argument_list "(ctrl,dlg)" ( identifier , identifier ))) ;)) (expression_statement "conf_set_int((Conf *)data,0x3e,event);" (call_expression "conf_set_int((Conf *)data,0x3e,event)" identifier (argument_list "((Conf *)data,0x3e,event)" ( (cast_expression "(Conf *)data" ( (type_descriptor "Conf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}\n\n" (function_definition "void FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" primitive_type (function_declarator "FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (if_statement "if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" { (if_statement "if (param_4 != 3) {\n      return;\n    }" if (parenthesized_expression "(param_4 != 3)" ( (binary_expression "param_4 != 3" identifier != number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "iVar2 = FUN_00085ba0(param_1,param_2);" (assignment_expression "iVar2 = FUN_00085ba0(param_1,param_2)" identifier = (call_expression "FUN_00085ba0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" { (expression_statement "uVar4 = FUN_00085a70(param_1,param_2,iVar2);" (assignment_expression "uVar4 = FUN_00085a70(param_1,param_2,iVar2)" identifier = (call_expression "FUN_00085a70(param_1,param_2,iVar2)" identifier (argument_list "(param_1,param_2,iVar2)" ( identifier , identifier , identifier )))) ;) })) (expression_statement "FUN_00020290(param_3,0x3e,uVar4);" (call_expression "FUN_00020290(param_3,0x3e,uVar4)" identifier (argument_list "(param_3,0x3e,uVar4)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x14)" identifier = (pointer_expression "*(uint *)(param_1 + 0x14)" * (cast_expression "(uint *)(param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = FUN_0001fb70(param_3,0x3e);" (assignment_expression "iVar2 = FUN_0001fb70(param_3,0x3e)" identifier = (call_expression "FUN_0001fb70(param_3,0x3e)" identifier (argument_list "(param_3,0x3e)" ( identifier , number_literal )))) ;) (expression_statement "FUN_00086640(param_1,param_2);" (call_expression "FUN_00086640(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "FUN_000856e0(param_1,param_2);" (call_expression "FUN_000856e0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" if (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" identifier >> (parenthesized_expression "(uVar5 & 0x1f)" ( (binary_expression "uVar5 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" { (expression_statement "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);" (call_expression "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" identifier (argument_list "(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" ( identifier , identifier , (subscript_expression "(&PTR_s_None_0010e7e0)[uVar5 * 2]" (parenthesized_expression "(&PTR_s_None_0010e7e0)" ( (pointer_expression "&PTR_s_None_0010e7e0" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) , (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" ( (pointer_expression "&DAT_0010e7e4" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) ))) ;) })) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != 4)" ( (binary_expression "uVar5 != 4" identifier != number_literal) )) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" do (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  }" { (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" if (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" ( (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" ( (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" identifier >> (parenthesized_expression "(uVar5 & 0x1f)" ( (binary_expression "uVar5 & 0x1f" identifier & number_literal) ))) & number_literal) )) != number_literal) )) (compound_statement "{\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" { (if_statement "if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" if (parenthesized_expression "((&DAT_0010e7e4)[uVar5 * 2] == iVar2)" ( (binary_expression "(&DAT_0010e7e4)[uVar5 * 2] == iVar2" (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" ( (pointer_expression "&DAT_0010e7e4" & identifier) )) [ (binary_expression "uVar5 * 2" identifier * number_literal) ]) == identifier) )) (compound_statement "{\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" { (expression_statement "FUN_00086070(param_1,param_2,iVar3);" (call_expression "FUN_00086070(param_1,param_2,iVar3)" identifier (argument_list "(param_1,param_2,iVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "param_4 = iVar2;" (assignment_expression "param_4 = iVar2" identifier = identifier) ;) (goto_statement "goto LAB_000346e6;" goto statement_identifier ;) })) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" identifier = (binary_expression "uVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 != 4)" ( (binary_expression "uVar5 != 4" identifier != number_literal) )) ;) (expression_statement "FUN_00086070(param_1,param_2,0);" (call_expression "FUN_00086070(param_1,param_2,0)" identifier (argument_list "(param_1,param_2,0)" ( identifier , identifier , number_literal ))) ;) (labeled_statement "LAB_000346e6:\n  FUN_00086650(param_1,param_2);" statement_identifier : (expression_statement "FUN_00086650(param_1,param_2);" (call_expression "FUN_00086650(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;)) (expression_statement "FUN_00020290(param_3,0x3e,param_4);" (call_expression "FUN_00020290(param_3,0x3e,param_4)" identifier (argument_list "(param_3,0x3e,param_4)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) , (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) & LIT) )) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression IDENT * LIT) ]) == IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00034630(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (identifier "FUN_00034630") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  \n  if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }\n  uVar1 = *(uint *)(param_1 + 0x14);\n  iVar2 = FUN_0001fb70(param_3,0x3e);\n  FUN_00086640(param_1,param_2);\n  FUN_000856e0(param_1,param_2);\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  iVar3 = 0;\n  uVar5 = 0;\n  do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);\n  FUN_00086070(param_1,param_2,0);\nLAB_000346e6:\n  FUN_00086650(param_1,param_2);\n  FUN_00020290(param_3,0x3e,param_4);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (if_statement "if (param_4 != 0) {\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_4 != 3) {\n      return;\n    }\n    iVar2 = FUN_00085ba0(param_1,param_2);\n    uVar4 = 0;\n    if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }\n    FUN_00020290(param_3,0x3e,uVar4);\n    return;\n  }" ({ "{") (if_statement "if (param_4 != 3) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_4 != 3)" (( "(") (binary_expression "param_4 != 3" (identifier "param_4") (!= "!=") (number_literal "3")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_00085ba0(param_1,param_2);" (assignment_expression "iVar2 = FUN_00085ba0(param_1,param_2)" (identifier "iVar2") (= "=") (call_expression "FUN_00085ba0(param_1,param_2)" (identifier "FUN_00085ba0") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if (-1 < iVar2) {\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n      uVar4 = FUN_00085a70(param_1,param_2,iVar2);\n    }" ({ "{") (expression_statement "uVar4 = FUN_00085a70(param_1,param_2,iVar2);" (assignment_expression "uVar4 = FUN_00085a70(param_1,param_2,iVar2)" (identifier "uVar4") (= "=") (call_expression "FUN_00085a70(param_1,param_2,iVar2)" (identifier "FUN_00085a70") (argument_list "(param_1,param_2,iVar2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar2") () ")")))) (; ";")) (} "}"))) (expression_statement "FUN_00020290(param_3,0x3e,uVar4);" (call_expression "FUN_00020290(param_3,0x3e,uVar4)" (identifier "FUN_00020290") (argument_list "(param_3,0x3e,uVar4)" (( "(") (identifier "param_3") (, ",") (number_literal "0x3e") (, ",") (identifier "uVar4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar1 = *(uint *)(param_1 + 0x14);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x14)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0x14)" (* "*") (cast_expression "(uint *)(param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar2 = FUN_0001fb70(param_3,0x3e);" (assignment_expression "iVar2 = FUN_0001fb70(param_3,0x3e)" (identifier "iVar2") (= "=") (call_expression "FUN_0001fb70(param_3,0x3e)" (identifier "FUN_0001fb70") (argument_list "(param_3,0x3e)" (( "(") (identifier "param_3") (, ",") (number_literal "0x3e") () ")")))) (; ";")) (expression_statement "FUN_00086640(param_1,param_2);" (call_expression "FUN_00086640(param_1,param_2)" (identifier "FUN_00086640") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "FUN_000856e0(param_1,param_2);" (call_expression "FUN_000856e0(param_1,param_2)" (identifier "FUN_000856e0") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" (do "do") (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }\n    uVar5 = uVar5 + 1;\n  }" ({ "{") (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" (if "if") (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" (( "(") (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" (( "(") (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" (identifier "uVar1") (>> ">>") (parenthesized_expression "(uVar5 & 0x1f)" (( "(") (binary_expression "uVar5 & 0x1f" (identifier "uVar5") (& "&") (number_literal "0x1f")) () ")"))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);\n    }" ({ "{") (expression_statement "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);" (call_expression "FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" (identifier "FUN_00085880") (argument_list "(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2])" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (subscript_expression "(&PTR_s_None_0010e7e0)[uVar5 * 2]" (parenthesized_expression "(&PTR_s_None_0010e7e0)" (( "(") (pointer_expression "&PTR_s_None_0010e7e0" (& "&") (identifier "PTR_s_None_0010e7e0")) () ")")) ([ "[") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2")) (] "]")) (, ",") (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" (( "(") (pointer_expression "&DAT_0010e7e4" (& "&") (identifier "DAT_0010e7e4")) () ")")) ([ "[") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2")) (] "]")) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 != 4)" (( "(") (binary_expression "uVar5 != 4" (identifier "uVar5") (!= "!=") (number_literal "4")) () ")")) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  } while (uVar5 != 4);" (do "do") (compound_statement "{\n    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }\n    uVar5 = uVar5 + 1;\n  }" ({ "{") (if_statement "if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" (if "if") (parenthesized_expression "((uVar1 >> (uVar5 & 0x1f) & 1) != 0)" (( "(") (binary_expression "(uVar1 >> (uVar5 & 0x1f) & 1) != 0" (parenthesized_expression "(uVar1 >> (uVar5 & 0x1f) & 1)" (( "(") (binary_expression "uVar1 >> (uVar5 & 0x1f) & 1" (binary_expression "uVar1 >> (uVar5 & 0x1f)" (identifier "uVar1") (>> ">>") (parenthesized_expression "(uVar5 & 0x1f)" (( "(") (binary_expression "uVar5 & 0x1f" (identifier "uVar5") (& "&") (number_literal "0x1f")) () ")"))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }\n      iVar3 = iVar3 + 1;\n    }" ({ "{") (if_statement "if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" (if "if") (parenthesized_expression "((&DAT_0010e7e4)[uVar5 * 2] == iVar2)" (( "(") (binary_expression "(&DAT_0010e7e4)[uVar5 * 2] == iVar2" (subscript_expression "(&DAT_0010e7e4)[uVar5 * 2]" (parenthesized_expression "(&DAT_0010e7e4)" (( "(") (pointer_expression "&DAT_0010e7e4" (& "&") (identifier "DAT_0010e7e4")) () ")")) ([ "[") (binary_expression "uVar5 * 2" (identifier "uVar5") (* "*") (number_literal "2")) (] "]")) (== "==") (identifier "iVar2")) () ")")) (compound_statement "{\n        FUN_00086070(param_1,param_2,iVar3);\n        param_4 = iVar2;\n        goto LAB_000346e6;\n      }" ({ "{") (expression_statement "FUN_00086070(param_1,param_2,iVar3);" (call_expression "FUN_00086070(param_1,param_2,iVar3)" (identifier "FUN_00086070") (argument_list "(param_1,param_2,iVar3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "param_4 = iVar2;" (assignment_expression "param_4 = iVar2" (identifier "param_4") (= "=") (identifier "iVar2")) (; ";")) (goto_statement "goto LAB_000346e6;" (goto "goto") (statement_identifier "LAB_000346e6") (; ";")) (} "}"))) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "uVar5 = uVar5 + 1;" (assignment_expression "uVar5 = uVar5 + 1" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 1" (identifier "uVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 != 4)" (( "(") (binary_expression "uVar5 != 4" (identifier "uVar5") (!= "!=") (number_literal "4")) () ")")) (; ";")) (expression_statement "FUN_00086070(param_1,param_2,0);" (call_expression "FUN_00086070(param_1,param_2,0)" (identifier "FUN_00086070") (argument_list "(param_1,param_2,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "0") () ")"))) (; ";")) (labeled_statement "LAB_000346e6:\n  FUN_00086650(param_1,param_2);" (statement_identifier "LAB_000346e6") (: ":") (expression_statement "FUN_00086650(param_1,param_2);" (call_expression "FUN_00086650(param_1,param_2)" (identifier "FUN_00086650") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";"))) (expression_statement "FUN_00020290(param_3,0x3e,param_4);" (call_expression "FUN_00020290(param_3,0x3e,param_4)" (identifier "FUN_00020290") (argument_list "(param_3,0x3e,param_4)" (( "(") (identifier "param_3") (, ",") (number_literal "0x3e") (, ",") (identifier "param_4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *ctrl,void *dlg,void *data,int var_1)

{
  type_2 var_9;
  int var_3;
  int var_13;
  type_2 var_10;
  
  if (var_1 != 0) {
    if (var_1 != 3) {
      return;
    }
    var_3 = var_2(ctrl,dlg);
    var_13 = 0;
    if (-1 < var_3) {
      var_13 = var_4(ctrl,dlg,var_3);
    }
    var_5((type_3 *)data,0x3e,var_13);
    return;
  }
  var_9 = (ctrl->generic).context.i;
  var_3 = var_6((type_3 *)data,0x3e);
  var_7(ctrl,dlg);
  var_8(ctrl,dlg);
  var_10 = 0;
  do {
    if ((var_9 >> (var_10 & 0x1f) & 1) != 0) {
      var_11
                (ctrl,dlg,function_1::flows[var_10].name,
                 function_1::flows[var_10].val);
    }
    var_10 = var_10 + 1;
  } while (var_10 != 4);
  var_13 = 0;
  var_10 = 0;
  do {
    if ((var_9 >> (var_10 & 0x1f) & 1) != 0) {
      if (function_1::flows[var_10].val == var_3) {
        var_12(ctrl,dlg,var_13);
        var_1 = var_3;
        goto LAB_000346e6;
      }
      var_13 = var_13 + 1;
    }
    var_10 = var_10 + 1;
  } while (var_10 != 4);
  var_12(ctrl,dlg,0);
LAB_000346e6:
  var_14(ctrl,dlg);
  var_5((type_3 *)data,0x3e,var_1);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (identifier) right: (number_literal))) (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (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: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (identifier) right: (number_literal))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (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: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))) (return_statement))))

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

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

{
  uint uVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  uint uVar5;
  
  if (param_4 != 0) {
    if (param_4 != 3) {
      return;
    }
    iVar2 = FUN_00085ba0(param_1,param_2);
    uVar4 = 0;
    if (-1 < iVar2) {
      uVar4 = FUN_00085a70(param_1,param_2,iVar2);
    }
    FUN_00020290(param_3,0x3e,uVar4);
    return;
  }
  uVar1 = *(uint *)(param_1 + 0x14);
  iVar2 = FUN_0001fb70(param_3,0x3e);
  FUN_00086640(param_1,param_2);
  FUN_000856e0(param_1,param_2);
  uVar5 = 0;
  do {
    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {
      FUN_00085880(param_1,param_2,(&PTR_s_None_0010e7e0)[uVar5 * 2],(&DAT_0010e7e4)[uVar5 * 2]);
    }
    uVar5 = uVar5 + 1;
  } while (uVar5 != 4);
  iVar3 = 0;
  uVar5 = 0;
  do {
    if ((uVar1 >> (uVar5 & 0x1f) & 1) != 0) {
      if ((&DAT_0010e7e4)[uVar5 * 2] == iVar2) {
        FUN_00086070(param_1,param_2,iVar3);
        param_4 = iVar2;
        goto LAB_000346e6;
      }
      iVar3 = iVar3 + 1;
    }
    uVar5 = uVar5 + 1;
  } while (uVar5 != 4);
  FUN_00086070(param_1,param_2,0);
LAB_000346e6:
  FUN_00086650(param_1,param_2);
  FUN_00020290(param_3,0x3e,param_4);
  return;
}

