Advertisement
Xkower8181

088a2600 in the binary

Jan 22nd, 2025
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.36 KB | None | 0 0
  1. int POT_SWDEntry(char *param_1,int param_2,int param_3)
  2.  
  3. {
  4.   int *piVar1;
  5.   int **ppiVar2;
  6.   int iVar3;
  7.  
  8.   if (((*param_1 == 'S') && (param_1[1] == 'W')) && (param_1[2] == 'D')) {
  9.     if (((byte)param_1[0xc] < 7) && (5 < (byte)param_1[0xc])) {
  10.       iVar3 = 0;
  11.       piVar1 = &FL_Pointers;
  12.       do {
  13.         if (*piVar1 == 0) break;
  14.         iVar3 = iVar3 + 1;
  15.         piVar1 = piVar1 + 1;
  16.       } while (iVar3 < 8);
  17.       if (iVar3 == 8) {
  18.         iVar3 = 0;
  19.       }
  20.       else {
  21.         ppiVar2 = (int **)(&FL_Pointers + iVar3);
  22.         piVar1 = POT_FLAllocateMemory(0x24);
  23.         *ppiVar2 = piVar1;
  24.         if (*ppiVar2 == (int *)0x0) {
  25.           iVar3 = 0;
  26.         }
  27.         else {
  28.           memset(*ppiVar2,0,0x24);
  29.           *(undefined *)((int)*ppiVar2 + 2) = 1;
  30.           (*ppiVar2)[2] = (int)param_1;
  31.           (*ppiVar2)[1] = (int)param_1;
  32.           (*ppiVar2)[3] = (int)(param_1 + *(int *)(param_1 + 0x10));
  33.           (*ppiVar2)[4] = (int)(param_1 + *(int *)(param_1 + 0x14));
  34.           *(ushort *)*ppiVar2 = 0xc0;
  35.           if (param_3 == 0) {
  36.             *(ushort *)*ppiVar2 = *(ushort *)*ppiVar2 | 2;
  37.           }
  38.           POT_DEF0ReadingThing(iVar3 + 1);
  39.           piVar1 = POT_FLAllocateMemory(0xa4);
  40.           (*ppiVar2)[7] = (int)piVar1;
  41.           memset((void *)(*ppiVar2)[7],0,0xa4);
  42.           *(undefined2 *)(piVar1 + 3) = 0x8000;
  43.           *(undefined *)(piVar1 + 5) = 0;
  44.           piVar1[10] = (*ppiVar2)[4];
  45.           piVar1[0xb] = (*ppiVar2)[2] + *(int *)((*ppiVar2)[4] + 0xc);
  46.           piVar1[0xc] = (*ppiVar2)[4] + 0x14;
  47.           *(undefined *)((int)piVar1 + 0x12) = 5;
  48.           *(ushort *)((int)piVar1 + 0xe) = *(ushort *)((int)piVar1 + 0xe) | 0xc1;
  49.           piVar1[7] = param_2;
  50.           *piVar1 = 0;
  51.           piVar1[1] = 0;
  52.           FUN_088a6bd8((float *)(piVar1 + 0x1c));
  53.           FUN_088a6d34((ushort *)(piVar1 + 0x22));
  54.           FUN_088a6bd8((float *)(piVar1 + 0x11));
  55.           FUN_088a6d34((ushort *)(piVar1 + 0x17));
  56.           iVar3 = iVar3 + 1;
  57.         }
  58.       }
  59.     }
  60.     else {
  61.       (*FL_FuncPtr.fl_fprint)
  62.                 (FL_Error_%s_Conversion_version_is_different._Please_convert_again.,
  63.                  s_FLEntry_088b3c30);
  64.       iVar3 = 0;
  65.     }
  66.   }
  67.   else {
  68.     (*FL_FuncPtr.fl_fprint)(FL_Error_%s_Header_information_is_incorrect,s_FLEntry_088b3c30);
  69.     iVar3 = 0;
  70.   }
  71.   return iVar3;
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement