{"action":"opened","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/165","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/165/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/165/events","html_url":"https://github.com/chrsmith/bwapi/issues/165","id":58670710,"number":165,"title":"Speed hack: Skip countdown timer when starting LAN or BNET game (Has patch)","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-23T23:57:21Z","updated_at":"2015-02-23T23:57:21Z","closed_at":"2015-02-23T23:57:21Z","body":"```\nWell ok, not a patch.\n\nOffset is 0x004720C5 on 1.16.1, it's in the middle of an instruction. WHen\nlooking at the following ASM, the first MOV sets an interface var (I\nassume), and the second MOV sets a default value for the start game\ncountdown timer, in number of frames. If you set this to 0, the wait is\ninfinite. You should change it from 18 to 1. \n\n004720B1  |.  8D4400 04     LEA EAX,[EAX+EAX+4]\n004720B5      83F8 18       CMP EAX,18\n004720B8  |.  C605 FAFB6600 MOV BYTE PTR DS:[66FBFA],5\n004720BF      C705 FCFB6600 MOV DWORD PTR DS:[66FBFC],18\n004720C9      72 05         JB SHORT 004720D0\n004720CB      A3 FCFB6600   MOV DWORD PTR DS:[66FBFC],EAX\n004720D0      E8 2B0D0000   CALL 00472E00\n\n\nvoid PatchCountdown() {\n\tint* countdownbyte = (int*)0x004720C5;\n\n\tif (*countdownbyte == 0x18) {\n\t\tDWORD old_prot = 0;\n\t\tDWORD dummy;\n\t\tint stat = VirtualProtect(countdownbyte, 1, PAGE_EXECUTE_READWRITE,\n&old_prot);\n\t\tif (stat) {\n\t\t\t*countdownbyte = 1;\n\t\t\tint stat = VirtualProtect(countdownbyte, 1, old_prot, &dummy);\n\t\t}\n\t}\n}\n```\n\n-----\nOriginal issue reported on code.google.com by `cbwhiz@gmail.com` on 11 Dec 2009 at 9:20"}}