Twisted 发表于 2011-10-13 17:48:35

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

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, Could not find stored procedure 'CHECK_GAMEBANG_USER'., 108 ***
2011-2-20 20:6, *** 37000, 2812, 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 event004BB118   90             |NOP                                     ;Case 9 of switch 004BB010
004BB119   90             NOP
004BB11A   90             NOP
004BB11B   90             |NOP
004BB11C   90             NOP
004BB11D   90             |NOP
004BB11E   90             NOP
004BB11F   90             NOP
004BB120   90             |NOP
004BB121   90             NOP
004BB122   90             NOP
004BB123   90             NOP
004BB124   90             NOPGive PPCard item004BB162   90             |NOP                                     ;Case D of switch 004BB010
004BB163   90             NOP
004BB164   90             |NOP
004BB165   90             NOP
004BB166   90             NOP
004BB167   90             NOP
004BB168   90             NOPLog 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!)004BB56B   90             NOP
004BB56C   90             NOP
004BB56D   90             NOP
004BB56E   90             NOP
004BB56F   90             NOP
004BB570   90             NOP
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 instruction... so I don't bother, just go by each individual case.)004BB592   90             |NOP                                     ;Case 28 of switch 004BB010
004BB593   90             NOP
004BB594   90             NOP
004BB595   90             |NOP
004BB596   90             NOP
004BB597   90             |NOP
004BB598   90             NOP
004BB599   90             NOP
004BB59A   90             NOP
004BB59B   90             NOP
Check PCBang item
004BB5A1   90             |NOP                                     ;Case 29 of switch 004BB010
004BB5A2   90             NOP
004BB5A3   90             NOP
004BB5A4   90             |NOP
004BB5A5   90             NOP
004BB5A6   90             |NOP
004BB5A7   90             NOP
004BB5A8   90             NOP
004BB5A9   90             |NOP
004BB5AA   90             NOP
004BB5AB   90             NOP
004BB5AC   90             |NOP
004BB5AD   90             NOP
004BB5AE   90             NOP
004BB5AF   90             NOP
004BB5B0   90             NOPGive PCBang item004BB5B6   90             |NOP                                     ;Case 3A of switch 004BB010
004BB5B7   90             NOP
004BB5B8   90             NOP
004BB5B9   90             |NOP
004BB5BA   90             NOP
004BB5BB   90             |NOP
004BB5BC   90             NOP
004BB5BD   90             NOP
004BB5BE   90             NOP
004BB5BF   90             NOPCheck PCBang owner004BB5C5   90             |NOP                                     ;Case 3B of switch 004BB010
004BB5C6   90             NOP
004BB5C7   90             NOP
004BB5C8   90             |NOP
004BB5C9   90             NOP
004BB5CA   90             |NOP
004BB5CB   90             NOP
004BB5CC   90             NOP
004BB5CD   90             |NOP
004BB5CE   90             NOP
004BB5CF   90             NOP
004BB5D0   90             NOP
004BB5D1   90             NOPCheck KJ war account
(Some of you may remember this system... most won't, but it's a disabled system here)
004BB5D7   90             |NOP                                     ;Case 3D of switch 004BB010
004BB5D8   90             NOP
004BB5D9   90             NOP
004BB5DA   90             |NOP
004BB5DB   90             NOP
004BB5DC   90             |NOP
004BB5DD   90             NOP
004BB5DE   90             NOP
004BB5DF   90             |NOP
004BB5E0   90             NOP
004BB5E1   90             NOP
004BB5E2   90             NOP
004BB5E3   90             NOP
Give KJ war item004BB5E9   90             |NOP                                     ;Case 3E of switch 004BB010
004BB5EA   90             NOP
004BB5EB   90             |NOP
004BB5EC   90             NOP
004BB5ED   90             NOP
004BB5EE   90             NOP
004BB5EF   90             NOPCheck log time account004BB5F5   90             |NOP                                     ;Case 3F of switch 004BB010
004BB5F6   90             NOP
004BB5F7   90             NOP
004BB5F8   90             |NOP
004BB5F9   90             NOP
004BB5FA   90             |NOP
004BB5FB   90             NOP
004BB5FC   90             NOP
004BB5FD   90             |NOP
004BB5FE   90             NOP
004BB5FF   90             NOP
004BB600   90             NOP
004BB601   90             NOPGive log time item004BB604   90             |NOP                                     ;Case 40 of switch 004BB010
004BB605   90             NOP
004BB606   90             |NOP
004BB607   90             NOP
004BB608   90             NOP
004BB609   90             NOP
004BB60A   90             NOPCheck olympic account004BB616   90             |NOP                                     ;Case 42 of switch 004BB010
004BB617   90             NOP
004BB618   90             NOP
004BB619   90             |NOP
004BB61A   90             NOP
004BB61B   90             |NOP
004BB61C   90             NOP
004BB61D   90             NOP
004BB61E   90             |NOP
004BB61F   90             NOP
004BB620   90             NOP
004BB621   90             NOP
004BB622   90             NOP
Give olympic item
004BB625   90             |NOP                                     ;Case 43 of switch 004BB010
004BB626   90             NOP
004BB627   90             NOP
004BB628   90             NOP
004BB629   90             |NOP
004BB62A   90             NOP
004BB62B   90             |NOP
004BB62C   90             |NOP
004BB62D   90             NOP
004BB62E   90             NOP
004BB62F   90             |NOP
004BB630   90             NOP
004BB631   90             NOP
004BB632   90             NOP
004BB633   90             NOP

1.310/1.351

Log coupon event0049AA21   90             |NOP                                     ; /Arg2; Case 9 of switch 0049A917
0049AA22   90             NOP
0049AA23   90             NOP
0049AA24   90             |NOP                                     ; |
0049AA25   90             NOP
0049AA26   90             |NOP                                     ; |Arg1
0049AA27   90             NOP
0049AA28   90             NOP
0049AA29   90             |NOP                                     ; \?LogCoupon@CUser@@QAEXHH@Z
0049AA2A   90             NOP
0049AA2B   90             NOP
0049AA2C   90             NOP
0049AA2D   90             NOP
Give PPCard item
0049AA6B   90             |NOP                                     ;Case D of switch 0049A917
0049AA6C   90             NOP
0049AA6D   90             |NOP
0049AA6E   90             NOP
0049AA6F   90             NOP
0049AA70   90             NOP
0049AA71   90             NOPLog 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!)0049AE74   90             |NOP                                     ;Case 26 of switch 0049A917
0049AE75   90             NOP
0049AE76   90             |NOP
0049AE77   90             NOP
0049AE78   90             NOP
0049AE79   90             NOP
0049AE7A   90             NOPShow 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 instruction... so I don't bother, just go by each individual case.)0049AE9B   90             |NOP                                     ; /Arg1; Case 28 of switch 0049A917
0049AE9C   90             NOP
0049AE9D   90             NOP
0049AE9E   90             |NOP                                     ; |
0049AE9F   90             NOP
0049AEA0   90             |NOP                                     ; \?ShowPCBangItem@CUser@@QAEXH@Z
0049AEA1   90             NOP
0049AEA2   90             NOP
0049AEA3   90             NOP
0049AEA4   90             NOPCheck PCBang item
0049AEAA   90             |NOP                                     ; /Arg3; Case 29 of switch 0049A917
0049AEAB   90             NOP
0049AEAC   90             NOP
0049AEAD   90             |NOP                                     ; |
0049AEAE   90             NOP
0049AEAF   90             |NOP                                     ; |Arg2
0049AEB0   90             NOP
0049AEB1   90             NOP
0049AEB2   90             |NOP                                     ; |Arg1
0049AEB3   90             NOP
0049AEB4   90             NOP
0049AEB5   90             |NOP                                     ; \?CheckPCBangItem@CUser@@QAEXHHH@Z
0049AEB6   90             NOP
0049AEB7   90             NOP
0049AEB8   90             NOP
0049AEB9   90             NOP



Give PCBang item0049AEBF   90             |NOP                                     ; /Arg1; Case 3A of switch 0049A917
0049AEC0   90             NOP
0049AEC1   90             NOP
0049AEC2   90             |NOP                                     ; |
0049AEC3   90             NOP
0049AEC4   90             |NOP                                     ; \?GivePCBangItem@CUser@@QAEXH@Z
0049AEC5   90             NOP
0049AEC6   90             NOP
0049AEC7   90             NOP
0049AEC8   90             NOPCheck PCBang owner0049AECE   90             |NOP                                     ; /Arg2; Case 3B of switch 0049A917
0049AECF   90             NOP
0049AED0   90             NOP
0049AED1   90             |NOP                                     ; |
0049AED2   90             NOP
0049AED3   90             |NOP                                     ; |Arg1
0049AED4   90             NOP
0049AED5   90             NOP
0049AED6   90             |NOP                                     ; \?CheckPCBangOwner@CUser@@QAEXHH@Z
0049AED7   90             NOP
0049AED8   90             NOP
0049AED9   90             NOP
0049AEDA   90             NOPCheck KJ war account
(Some of you may remember this system... most won't, but it's a disabled system here)
0049AEE0   90             |NOP                                     ; /Arg2; Case 3D of switch 0049A917
0049AEE1   90             NOP
0049AEE2   90             NOP
0049AEE3   90             |NOP                                     ; |
0049AEE4   90             NOP
0049AEE5   90             |NOP                                     ; |Arg1
0049AEE6   90             NOP
0049AEE7   90             NOP
0049AEE8   90             |NOP                                     ; \?CheckKJWarAccount@CUser@@QAEXHH@Z
0049AEE9   90             NOP
0049AEEA   90             NOP
0049AEEB   90             NOP
0049AEEC   90             NOPGive KJ war item0049AEF2   90             |NOP                                     ;Case 3E of switch 0049A917
0049AEF3   90             NOP
0049AEF4   90             |NOP
0049AEF5   90             NOP
0049AEF6   90             NOP
0049AEF7   90             NOP
0049AEF8   90             NOPCheck log time account0049AEFE   90             |NOP                                     ; /Arg2; Case 3F of switch 0049A917
0049AEFF   90             NOP
0049AF00   90             NOP
0049AF01   90             |NOP                                     ; |
0049AF02   90             NOP
0049AF03   90             |NOP                                     ; |Arg1
0049AF04   90             NOP
0049AF05   90             NOP
0049AF06   90             |NOP                                     ; \?CheckLogTimeAccount@CUser@@QAEXHH@Z
0049AF07   90             NOP
0049AF08   90             NOP
0049AF09   90             NOP
0049AF0A   90             NOPGive log time item0049AF0D   90             |NOP                                     ;Case 40 of switch 0049A917
0049AF0E   90             NOP
0049AF0F   90             |NOP
0049AF10   90             NOP
0049AF11   90             NOP
0049AF12   90             NOP
0049AF13   90             NOPCheck olympic account0049AF1F   90             |NOP                                     ; /Arg2; Case 42 of switch 0049A917
0049AF20   90             NOP
0049AF21   90             NOP
0049AF22   90             |NOP                                     ; |
0049AF23   90             NOP
0049AF24   90             |NOP                                     ; |Arg1
0049AF25   90             NOP
0049AF26   90             NOP
0049AF27   90             |NOP                                     ; \?CheckOlympicAccount@CUser@@QAEXHH@Z
0049AF28   90             NOP
0049AF29   90             NOP
0049AF2A   90             NOP
0049AF2B   90             NOPGive olympic item0049AF2E   90             |NOP                                     ;Case 43 of switch 0049A917
0049AF2F   90             NOP
0049AF30   90             NOP
0049AF31   90             NOP
0049AF32   90             |NOP
0049AF33   90             NOP
0049AF34   90             |NOP                                     ; /Arg2
0049AF35   90             |NOP                                     ; |Arg1
0049AF36   90             NOP
0049AF37   90             NOP
0049AF38   90             |NOP                                     ; \?GiveOlympicItem@CUser@@QAEXHF@Z
0049AF39   90             NOP
0049AF3A   90             NOP
0049AF3B   90             NOP
0049AF3C   90             NOPAnd 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. :/
页: [1]
查看完整版本: [1.298, 1.310/1.351/2.0] Patch out unused procedures