Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [RAPass::BuildCFG]
- L0: void Func(i32@ecx %0, f32@[0] %1, f64@[4] %2)
- {#0}
- mov %4, 0
- mov qword [&%3+%4], %0
- add %4, 8
- movq qword [&%3+%4], %1
- add %4, 8
- movq qword [&%3+%4], %2
- add %4, 8
- lea argStruct, [&%3]
- mov %6, 3
- mov dword [esp], argStruct
- mov dword [esp+4], %6@gpd
- call A30366
- mov orig_ptr, 116EF50
- mov orig_ptr, [orig_ptr]
- vmovss dword [esp], %1
- vmovlps qword [esp+4], %2
- call orig_ptr
- sub esp, C
- {#1}
- L1:
- [FuncEnd]
- [RAPass::BuildViews]
- [RAPass::BuildDominators]
- IDom of #1 -> #0
- Done (2 iterations)
- [RAPass::BuildLiveness]
- LiveIn/Out Done (4 visits)
- {#0}
- IN [%0, %1, %2]
- GEN [%4, %0, %1, %2, argStruct, %6, orig_ptr]
- KILL [%4, argStruct, %6, orig_ptr]
- {#1}
- %4 {id:0260 width: 12 freq: 0.5833 priority=0.5933}: [3:15]
- %3 {id:0259 width: 0 freq: 0.0000 priority=0.0100}:
- %0 {id:0256 width: 33 freq: 0.0606 priority=0.0706}: [2:35]
- %1 {id:0257 width: 29 freq: 0.0690 priority=0.0790}: [2:31]
- %2 {id:0258 width: 31 freq: 0.0645 priority=0.0745}: [2:33]
- argStruct {id:0261 width: 4 freq: 0.5000 priority=0.5100}: [17:21]
- %6 {id:0262 width: 4 freq: 0.5000 priority=0.5100}: [19:23]
- orig_ptr {id:0263 width: 8 freq: 0.3750 priority=0.3850}: [27:35]
- [RAPass::BinPack] Available=7 (0x000000EF) Count=6
- 00: [3:15@260], [17:21@261], [27:35@263]
- 01: [2:35@256]
- 02: [19:23@262]
- Completed.
- [RAPass::BinPack] Available=8 (0x000000FF) Count=2
- 00: [2:31@257]
- 01: [2:33@258]
- Completed.
- [RAPass::Rewrite]
- .section .text {#0}
- L0:
- sub esp, 24 ; 83EC24
- movd xmm0, dword [esp+0x28] ; 660F6E442428
- movq xmm1, qword [esp+0x2C] ; F30F7E4C242C
- mov eax, 0 ; B800000000 | <00002> mov %4, 0 | %4{W|Out}
- mov qword [esp+eax+0xC], ecx ; 894C040C | <00004> mov qword [&%3+%4], %0 | %4{R|Use} %0{R|Use}
- add eax, 8 ; 83C008 | <00006> add %4, 8 | %4{X|Use}
- movq qword [esp+eax+0xC], xmm0 ; 660FD644040C | <00008> movq qword [&%3+%4], %1 | %4{R|Use} %1{R|Use}
- add eax, 8 ; 83C008 | <00010> add %4, 8 | %4{X|Use}
- movq qword [esp+eax+0xC], xmm1 ; 660FD64C040C | <00012> movq qword [&%3+%4], %2 | %4{R|Use} %2{R|Use}
- add eax, 8 ; 83C008 | <00014> add %4, 8 | %4{X|Use|Last|Kill}
- lea eax, [esp+0xC] ; 8D44240C | <00016> lea argStruct, [&%3] | argStruct{W|Out}
- mov dl, 3 ; B203 | <00018> mov %6, 3 | %6{W|Out}
- mov dword [esp], eax ; 890424 | <00020> mov dword [esp], argStruct | argStruct{R|Use|Last|Kill}
- mov dword [esp+4], edx ; 89542404 | <00022> mov dword [esp+4], %6@gpd | %6{R|Use|Last|Kill}
- call A30366 ; E800000000 | <00024> call A30366
- mov eax, 116EF50 ; B850EF1601 | <00026> mov orig_ptr, 116EF50 | orig_ptr{W|Out}
- mov eax, [eax] ; 8B00 | <00028> mov orig_ptr, [orig_ptr] | orig_ptr{X|Use|Out}
- vmovss dword [esp], xmm0 ; C5FA110424 | <00030> vmovss dword [esp], %1 | %1{R|Use|Last|Kill}
- vmovlps qword [esp+4], xmm1 ; C5F8134C2404 | <00032> vmovlps qword [esp+4], %2 | %2{R|Use|Last|Kill}
- call eax ; FFD0 | <00034> call orig_ptr | orig_ptr{R|Use|Last|Kill} %0{R|Use=1|Last|Kill}
- sub esp, C ; 83EC0C | <00036> sub esp, C
- L1: ; | L1:
- add esp, 24 ; 83C424
- ret C ; C20C00
- asmjit::x86::Gp orig_ptr = cc.newUIntPtr("orig_ptr");
- cc.mov(orig_ptr, (uintptr_t)getTrampolineHolder());
- cc.mov(orig_ptr, asmjit::x86::ptr(orig_ptr));
- auto orig_call = cc.call(orig_ptr, sig);
- for (uint8_t arg_idx = 0; arg_idx < sig.argCount(); arg_idx++) {
- orig_call->setArg(arg_idx, argRegisters.at(arg_idx));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement