Created
March 17, 2018 20:02
-
-
Save zeux/3a044a81e1368a6399d13079a1480662 to your computer and use it in GitHub Desktop.
This is how vkCmdDraw looks when you use vulkan-1.dll on Windows (call esi is the only "important" instruction here - it calls the driver). Omitted are also DLL thunks that go before this function, adding two more jmps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, | |
| uint32_t firstVertex, uint32_t firstInstance) { | |
| 0F9EEE00 55 push ebp | |
| 0F9EEE01 8B EC mov ebp,esp | |
| 0F9EEE03 51 push ecx | |
| 0F9EEE04 A1 34 E0 A6 0F mov eax,dword ptr [__security_cookie (0FA6E034h)] | |
| 0F9EEE09 33 C5 xor eax,ebp | |
| 0F9EEE0B 89 45 FC mov dword ptr [ebp-4],eax | |
| const VkLayerDispatchTable *disp; | |
| disp = loader_get_dispatch(commandBuffer); | |
| disp->CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); | |
| 0F9EEE0E 8B 45 08 mov eax,dword ptr [commandBuffer] | |
| 0F9EEE11 56 push esi | |
| 0F9EEE12 FF 75 18 push dword ptr [firstInstance] | |
| 0F9EEE15 FF 75 14 push dword ptr [firstVertex] | |
| 0F9EEE18 8B 30 mov esi,dword ptr [eax] | |
| 0F9EEE1A FF 75 10 push dword ptr [instanceCount] | |
| 0F9EEE1D FF 75 0C push dword ptr [vertexCount] | |
| 0F9EEE20 8B B6 68 01 00 00 mov esi,dword ptr [esi+168h] | |
| 0F9EEE26 8B CE mov ecx,esi | |
| 0F9EEE28 50 push eax | |
| 0F9EEE29 FF 15 00 50 A7 0F call dword ptr [__guard_check_icall_fptr (0FA75000h)] | |
| 0F9EEE2F FF D6 call esi | |
| } | |
| 0F9EEE31 8B 4D FC mov ecx,dword ptr [ebp-4] | |
| 0F9EEE34 33 CD xor ecx,ebp | |
| 0F9EEE36 5E pop esi | |
| 0F9EEE37 E8 F4 A6 FC FF call @__security_check_cookie@4 (0F9B9530h) | |
| 0F9EEE3C 8B E5 mov esp,ebp | |
| 0F9EEE3E 5D pop ebp | |
| 0F9EEE3F C2 14 00 ret 14h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment