搜索
 找回密码
 加入

[1.298, 1.310/1.351/2.0] Patch out unused procedures

Twisted 2011-10-13 17:48:35 1802
So, to steal someone's error logs, this thread will show you how (and where) to patch out commonly unused procedures such as in the following:


2011-2-20 20:6, *** 37000, 2812, [Microsoft][SQL Server Native Client 10.0][SQL Server]Could not find stored procedure 'CHECK_GAMEBANG_USER'., 108 ***
2011-2-20 20:6, *** 37000, 2812, [Microsoft][SQL Server Native Client 10.0][SQL Server]Could not find stored procedure 'GET_GAMEBANG_DATA'., 106 ***



What we'll do, is patch out the triggers in Ebenezer so Ebenezer doesn't have to waste the time & resources on telling Aujard to deal with the procedures.

(Will only describe them by what I've typed up, I don't recall the exact procedure names for the majority of them!)

1.298

Log coupon event
  1. 004BB118     90             |NOP                                     ;  Case 9 of switch 004BB010
  2. 004BB119     90             NOP
  3. 004BB11A     90             NOP
  4. 004BB11B     90             |NOP
  5. 004BB11C     90             NOP
  6. 004BB11D     90             |NOP
  7. 004BB11E     90             NOP
  8. 004BB11F     90             NOP
  9. 004BB120     90             |NOP
  10. 004BB121     90             NOP
  11. 004BB122     90             NOP
  12. 004BB123     90             NOP
  13. 004BB124     90             NOP
复制代码
Give PPCard item
  1. 004BB162     90             |NOP                                     ;  Case D of switch 004BB010
  2. 004BB163     90             NOP
  3. 004BB164     90             |NOP
  4. 004BB165     90             NOP
  5. 004BB166     90             NOP
  6. 004BB167     90             NOP
  7. 004BB168     90             NOP
复制代码
Log emigration event (I know at least one server used to use the emigration system, I don't know how many of you do but as far as I know... most don't - if you do, DON'T remove this!)
  1. 004BB56B     90             NOP
  2. 004BB56C     90             NOP
  3. 004BB56D     90             NOP
  4. 004BB56E     90             NOP
  5. 004BB56F     90             NOP
  6. 004BB570     90             NOP
  7. 004BB571     90             NOP
复制代码
Show PCBang item
(Starting here, we CAN just NOP out all of the subsequent - return jumps and all, but it is slightly slower given that the CPU has to process each no-operation [NOP] instruction... so I don't bother, just go by each individual case.)
  1. 004BB592     90             |NOP                                     ;  Case 28 of switch 004BB010
  2. 004BB593     90             NOP
  3. 004BB594     90             NOP
  4. 004BB595     90             |NOP
  5. 004BB596     90             NOP
  6. 004BB597     90             |NOP
  7. 004BB598     90             NOP
  8. 004BB599     90             NOP
  9. 004BB59A     90             NOP
  10. 004BB59B     90             NOP
复制代码
Check PCBang item

  1. 004BB5A1     90             |NOP                                     ;  Case 29 of switch 004BB010
  2. 004BB5A2     90             NOP
  3. 004BB5A3     90             NOP
  4. 004BB5A4     90             |NOP
  5. 004BB5A5     90             NOP
  6. 004BB5A6     90             |NOP
  7. 004BB5A7     90             NOP
  8. 004BB5A8     90             NOP
  9. 004BB5A9     90             |NOP
  10. 004BB5AA     90             NOP
  11. 004BB5AB     90             NOP
  12. 004BB5AC     90             |NOP
  13. 004BB5AD     90             NOP
  14. 004BB5AE     90             NOP
  15. 004BB5AF     90             NOP
  16. 004BB5B0     90             NOP
复制代码
Give PCBang item
  1. 004BB5B6     90             |NOP                                     ;  Case 3A of switch 004BB010
  2. 004BB5B7     90             NOP
  3. 004BB5B8     90             NOP
  4. 004BB5B9     90             |NOP
  5. 004BB5BA     90             NOP
  6. 004BB5BB     90             |NOP
  7. 004BB5BC     90             NOP
  8. 004BB5BD     90             NOP
  9. 004BB5BE     90             NOP
  10. 004BB5BF     90             NOP
复制代码
Check PCBang owner
  1. 004BB5C5     90             |NOP                                     ;  Case 3B of switch 004BB010
  2. 004BB5C6     90             NOP
  3. 004BB5C7     90             NOP
  4. 004BB5C8     90             |NOP
  5. 004BB5C9     90             NOP
  6. 004BB5CA     90             |NOP
  7. 004BB5CB     90             NOP
  8. 004BB5CC     90             NOP
  9. 004BB5CD     90             |NOP
  10. 004BB5CE     90             NOP
  11. 004BB5CF     90             NOP
  12. 004BB5D0     90             NOP
  13. 004BB5D1     90             NOP
复制代码
Check KJ war account
(Some of you may remember this system... most won't, but it's a disabled system here)

  1. 004BB5D7     90             |NOP                                     ;  Case 3D of switch 004BB010
  2. 004BB5D8     90             NOP
  3. 004BB5D9     90             NOP
  4. 004BB5DA     90             |NOP
  5. 004BB5DB     90             NOP
  6. 004BB5DC     90             |NOP
  7. 004BB5DD     90             NOP
  8. 004BB5DE     90             NOP
  9. 004BB5DF     90             |NOP
  10. 004BB5E0     90             NOP
  11. 004BB5E1     90             NOP
  12. 004BB5E2     90             NOP
  13. 004BB5E3     90             NOP
复制代码
Give KJ war item
  1. 004BB5E9     90             |NOP                                     ;  Case 3E of switch 004BB010
  2. 004BB5EA     90             NOP
  3. 004BB5EB     90             |NOP
  4. 004BB5EC     90             NOP
  5. 004BB5ED     90             NOP
  6. 004BB5EE     90             NOP
  7. 004BB5EF     90             NOP
复制代码
Check log time account
  1. 004BB5F5     90             |NOP                                     ;  Case 3F of switch 004BB010
  2. 004BB5F6     90             NOP
  3. 004BB5F7     90             NOP
  4. 004BB5F8     90             |NOP
  5. 004BB5F9     90             NOP
  6. 004BB5FA     90             |NOP
  7. 004BB5FB     90             NOP
  8. 004BB5FC     90             NOP
  9. 004BB5FD     90             |NOP
  10. 004BB5FE     90             NOP
  11. 004BB5FF     90             NOP
  12. 004BB600     90             NOP
  13. 004BB601     90             NOP
复制代码
Give log time item
  1. 004BB604     90             |NOP                                     ;  Case 40 of switch 004BB010
  2. 004BB605     90             NOP
  3. 004BB606     90             |NOP
  4. 004BB607     90             NOP
  5. 004BB608     90             NOP
  6. 004BB609     90             NOP
  7. 004BB60A     90             NOP
复制代码
Check olympic account
  1. 004BB616     90             |NOP                                     ;  Case 42 of switch 004BB010
  2. 004BB617     90             NOP
  3. 004BB618     90             NOP
  4. 004BB619     90             |NOP
  5. 004BB61A     90             NOP
  6. 004BB61B     90             |NOP
  7. 004BB61C     90             NOP
  8. 004BB61D     90             NOP
  9. 004BB61E     90             |NOP
  10. 004BB61F     90             NOP
  11. 004BB620     90             NOP
  12. 004BB621     90             NOP
  13. 004BB622     90             NOP
复制代码
Give olympic item

  1. 004BB625     90             |NOP                                     ;  Case 43 of switch 004BB010
  2. 004BB626     90             NOP
  3. 004BB627     90             NOP
  4. 004BB628     90             NOP
  5. 004BB629     90             |NOP
  6. 004BB62A     90             NOP
  7. 004BB62B     90             |NOP
  8. 004BB62C     90             |NOP
  9. 004BB62D     90             NOP
  10. 004BB62E     90             NOP
  11. 004BB62F     90             |NOP
  12. 004BB630     90             NOP
  13. 004BB631     90             NOP
  14. 004BB632     90             NOP
  15. 004BB633     90             NOP
复制代码

1.310/1.351


Log coupon event
  1. 0049AA21     90             |NOP                                     ; /Arg2; Case 9 of switch 0049A917
  2. 0049AA22     90             NOP
  3. 0049AA23     90             NOP
  4. 0049AA24     90             |NOP                                     ; |
  5. 0049AA25     90             NOP
  6. 0049AA26     90             |NOP                                     ; |Arg1
  7. 0049AA27     90             NOP
  8. 0049AA28     90             NOP
  9. 0049AA29     90             |NOP                                     ; \?LogCoupon@CUser@@QAEXHH@Z
  10. 0049AA2A     90             NOP
  11. 0049AA2B     90             NOP
  12. 0049AA2C     90             NOP
  13. 0049AA2D     90             NOP
复制代码
Give PPCard item

  1. 0049AA6B     90             |NOP                                     ;  Case D of switch 0049A917
  2. 0049AA6C     90             NOP
  3. 0049AA6D     90             |NOP
  4. 0049AA6E     90             NOP
  5. 0049AA6F     90             NOP
  6. 0049AA70     90             NOP
  7. 0049AA71     90             NOP
复制代码
Log emigration event (I know at least one server used to use the emigration system, I don't know how many of you do but as far as I know... most don't - if you do, DON'T remove this!)
  1. 0049AE74     90             |NOP                                     ;  Case 26 of switch 0049A917
  2. 0049AE75     90             NOP
  3. 0049AE76     90             |NOP
  4. 0049AE77     90             NOP
  5. 0049AE78     90             NOP
  6. 0049AE79     90             NOP
  7. 0049AE7A     90             NOP
复制代码
Show PCBang item
(Starting here, we CAN just NOP out all of the subsequent - return jumps and all, but it is slightly slower given that the CPU has to process each no-operation [NOP] instruction... so I don't bother, just go by each individual case.)
  1. 0049AE9B     90             |NOP                                     ; /Arg1; Case 28 of switch 0049A917
  2. 0049AE9C     90             NOP
  3. 0049AE9D     90             NOP
  4. 0049AE9E     90             |NOP                                     ; |
  5. 0049AE9F     90             NOP
  6. 0049AEA0     90             |NOP                                     ; \?ShowPCBangItem@CUser@@QAEXH@Z
  7. 0049AEA1     90             NOP
  8. 0049AEA2     90             NOP
  9. 0049AEA3     90             NOP
  10. 0049AEA4     90             NOP
复制代码
Check PCBang item
  1. [code]
  2. 0049AEAA     90             |NOP                                     ; /Arg3; Case 29 of switch 0049A917
  3. 0049AEAB     90             NOP
  4. 0049AEAC     90             NOP
  5. 0049AEAD     90             |NOP                                     ; |
  6. 0049AEAE     90             NOP
  7. 0049AEAF     90             |NOP                                     ; |Arg2
  8. 0049AEB0     90             NOP
  9. 0049AEB1     90             NOP
  10. 0049AEB2     90             |NOP                                     ; |Arg1
  11. 0049AEB3     90             NOP
  12. 0049AEB4     90             NOP
  13. 0049AEB5     90             |NOP                                     ; \?CheckPCBangItem@CUser@@QAEXHHH@Z
  14. 0049AEB6     90             NOP
  15. 0049AEB7     90             NOP
  16. 0049AEB8     90             NOP
  17. 0049AEB9     90             NOP
复制代码
[/code]



Give PCBang item
  1. 0049AEBF     90             |NOP                                     ; /Arg1; Case 3A of switch 0049A917
  2. 0049AEC0     90             NOP
  3. 0049AEC1     90             NOP
  4. 0049AEC2     90             |NOP                                     ; |
  5. 0049AEC3     90             NOP
  6. 0049AEC4     90             |NOP                                     ; \?GivePCBangItem@CUser@@QAEXH@Z
  7. 0049AEC5     90             NOP
  8. 0049AEC6     90             NOP
  9. 0049AEC7     90             NOP
  10. 0049AEC8     90             NOP
复制代码
Check PCBang owner
  1. 0049AECE     90             |NOP                                     ; /Arg2; Case 3B of switch 0049A917
  2. 0049AECF     90             NOP
  3. 0049AED0     90             NOP
  4. 0049AED1     90             |NOP                                     ; |
  5. 0049AED2     90             NOP
  6. 0049AED3     90             |NOP                                     ; |Arg1
  7. 0049AED4     90             NOP
  8. 0049AED5     90             NOP
  9. 0049AED6     90             |NOP                                     ; \?CheckPCBangOwner@CUser@@QAEXHH@Z
  10. 0049AED7     90             NOP
  11. 0049AED8     90             NOP
  12. 0049AED9     90             NOP
  13. 0049AEDA     90             NOP
复制代码
Check KJ war account
(Some of you may remember this system... most won't, but it's a disabled system here)

  1. 0049AEE0     90             |NOP                                     ; /Arg2; Case 3D of switch 0049A917
  2. 0049AEE1     90             NOP
  3. 0049AEE2     90             NOP
  4. 0049AEE3     90             |NOP                                     ; |
  5. 0049AEE4     90             NOP
  6. 0049AEE5     90             |NOP                                     ; |Arg1
  7. 0049AEE6     90             NOP
  8. 0049AEE7     90             NOP
  9. 0049AEE8     90             |NOP                                     ; \?CheckKJWarAccount@CUser@@QAEXHH@Z
  10. 0049AEE9     90             NOP
  11. 0049AEEA     90             NOP
  12. 0049AEEB     90             NOP
  13. 0049AEEC     90             NOP
复制代码
Give KJ war item
  1. 0049AEF2     90             |NOP                                     ;  Case 3E of switch 0049A917
  2. 0049AEF3     90             NOP
  3. 0049AEF4     90             |NOP
  4. 0049AEF5     90             NOP
  5. 0049AEF6     90             NOP
  6. 0049AEF7     90             NOP
  7. 0049AEF8     90             NOP
复制代码
Check log time account
  1. 0049AEFE     90             |NOP                                     ; /Arg2; Case 3F of switch 0049A917
  2. 0049AEFF     90             NOP
  3. 0049AF00     90             NOP
  4. 0049AF01     90             |NOP                                     ; |
  5. 0049AF02     90             NOP
  6. 0049AF03     90             |NOP                                     ; |Arg1
  7. 0049AF04     90             NOP
  8. 0049AF05     90             NOP
  9. 0049AF06     90             |NOP                                     ; \?CheckLogTimeAccount@CUser@@QAEXHH@Z
  10. 0049AF07     90             NOP
  11. 0049AF08     90             NOP
  12. 0049AF09     90             NOP
  13. 0049AF0A     90             NOP
复制代码
Give log time item
  1. 0049AF0D     90             |NOP                                     ;  Case 40 of switch 0049A917
  2. 0049AF0E     90             NOP
  3. 0049AF0F     90             |NOP
  4. 0049AF10     90             NOP
  5. 0049AF11     90             NOP
  6. 0049AF12     90             NOP
  7. 0049AF13     90             NOP
复制代码
Check olympic account
  1. 0049AF1F     90             |NOP                                     ; /Arg2; Case 42 of switch 0049A917
  2. 0049AF20     90             NOP
  3. 0049AF21     90             NOP
  4. 0049AF22     90             |NOP                                     ; |
  5. 0049AF23     90             NOP
  6. 0049AF24     90             |NOP                                     ; |Arg1
  7. 0049AF25     90             NOP
  8. 0049AF26     90             NOP
  9. 0049AF27     90             |NOP                                     ; \?CheckOlympicAccount@CUser@@QAEXHH@Z
  10. 0049AF28     90             NOP
  11. 0049AF29     90             NOP
  12. 0049AF2A     90             NOP
  13. 0049AF2B     90             NOP
复制代码
Give olympic item
  1. 0049AF2E     90             |NOP                                     ;  Case 43 of switch 0049A917
  2. 0049AF2F     90             NOP
  3. 0049AF30     90             NOP
  4. 0049AF31     90             NOP
  5. 0049AF32     90             |NOP
  6. 0049AF33     90             NOP
  7. 0049AF34     90             |NOP                                     ; /Arg2
  8. 0049AF35     90             |NOP                                     ; |Arg1
  9. 0049AF36     90             NOP
  10. 0049AF37     90             NOP
  11. 0049AF38     90             |NOP                                     ; \?GiveOlympicItem@CUser@@QAEXHF@Z
  12. 0049AF39     90             NOP
  13. 0049AF3A     90             NOP
  14. 0049AF3B     90             NOP
  15. 0049AF3C     90             NOP
复制代码
And voila, you're done. No more stupid crashes (if 'exploited' enough) or 'random' SQL error logs regarding missing procedures.

Not sure why I didn't release this sooner. :/

0 回复

高级模式
游客