Изменить в коде проверку на версию - Assembler
Формулировка задачи:
Всем привет ребят имеется код который проверяет старую версию "GetVer" и новую "Init"
Собственно что нужно изменить в коде чтобы это проверку избежать
Сам код:
mov [rsp+148h+var_8], r15 cmovnz rcx, [rsp+148h+lpLibFileName] ; lpLibFileName call cs:LoadLibraryW mov cs:qword_142FBB358, rax test rax, rax jz loc_141286096 lea rdx, aGetver ; "GetVer" mov rcx, rax ; hModule call cs:GetProcAddress test rax, rax jz loc_141286089 call rax mov rcx, cs:qword_142FBB358 ; hModule test rcx, rcx jz loc_141286096 lea rdx, aInit_6 ; "Init" call cs:GetProcAddress mov r15, rax test rax, rax jz loc_141286089 mov ecx, cs:dword_1430456C0
Решение задачи: «Изменить в коде проверку на версию»
textual
Листинг программы
sub_1412881C0 proc near ; CODE XREF: sub_141467FE0+11F5p push rbp push rbx lea rbp, [rsp-48h] sub rsp, 148h mov rax, cs:__security_cookie xor rax, rsp mov [rbp+30h], rax mov rbx, rcx test rcx, rcx jz loc_141288579 cmp dword ptr [rcx+140h], 1 jz loc_141288579 mov edx, [rcx+0Ch] mov [rsp+170h], rdi mov cs:dword_142F68BE8, edx call sub_140C4D3A0 mov rcx, rbx mov cs:dword_142F68BEC, eax mov rax, [rbx] call qword ptr [rax+278h] mov ecx, eax mov edx, eax and ecx, 0FF00h shl edx, 10h add edx, ecx mov ecx, eax shr eax, 18h shr ecx, 8 shl edx, 8 and ecx, 0FF00h add edx, ecx mov rcx, rbx add eax, edx cdqe mov cs:qword_142FBE330, rax mov rax, [rbx] call qword ptr [rax+280h] movzx ecx, ax shl ax, 8 movzx eax, ax shr rcx, 8 xor rcx, rax mov rax, [rbx+2000h] mov cs:qword_142FBE328, rcx test rax, rax jz short loc_141288285 cmp dword ptr [rax+50h], 6 jnz short loc_141288285 mov byte ptr [rax+78h], 1 loc_141288285: ; CODE XREF: sub_1412881C0+B9j ; sub_1412881C0+BFj lea rcx, [rsp+78h] call sub_140B64A60 cmp dword ptr [rax+8], 0 jz short loc_14128829A mov rcx, [rax] jmp short loc_1412882A1 ; --------------------------------------------------------------------------- loc_14128829A: ; CODE XREF: sub_1412881C0+D3j lea rcx, unk_142BE3168 loc_1412882A1: ; CODE XREF: sub_1412881C0+D8j xor edi, edi mov [rsp+30h], rcx lea rax, aBinariesWin64B ; "BE.dl"... lea rdx, [rsp+30h] lea rcx, [rsp+40h] lea r8d, [rdi+2] mov [rsp+38h], rax mov [rsp+40h], rdi mov [rsp+48h], rdi call sub_140B6B0C0 lea rdx, [rsp+40h] lea rcx, [rsp+30h] call sub_140B6A330 mov rbx, [rsp+40h] test rbx, rbx jz short loc_14128830B mov rcx, cs:qword_142FAE3D8 test rcx, rcx jnz short loc_141288302 call sub_140AEDD60 mov rcx, cs:qword_142FAE3D8 loc_141288302: ; CODE XREF: sub_1412881C0+134j mov rax, [rcx] mov rdx, rbx call qword ptr [rax+28h] loc_14128830B: ; CODE XREF: sub_1412881C0+128j mov rbx, [rsp+78h] test rbx, rbx jz short loc_141288336 mov rcx, cs:qword_142FAE3D8 test rcx, rcx jnz short loc_14128832D call sub_140AEDD60 mov rcx, cs:qword_142FAE3D8 loc_14128832D: ; CODE XREF: sub_1412881C0+15Fj mov rax, [rcx] mov rdx, rbx call qword ptr [rax+28h] loc_141288336: ; CODE XREF: sub_1412881C0+153j cmp [rsp+38h], edi lea rcx, unk_142BE3168 mov [rsp+140h], r15 cmovnz rcx, [rsp+30h] call cs:LoadLibraryW mov cs:qword_142FBE358, rax test rax, rax jz loc_141288536 lea rdx, aGetver ; "GetVer" mov rcx, rax call cs:GetProcAddress test rax, rax jz loc_141288529 call rax mov rcx, cs:qword_142FBE358 test rcx, rcx jz loc_141288536 lea rdx, aInit_6 ; "Init" call cs:GetProcAddress mov r15, rax test rax, rax jz loc_141288529 mov ecx, cs:dword_1430486D0 mov [rsp+168h], rsi test cl, 1 jnz short loc_141288404 or ecx, 1 lea rdx, aArkD_D ; "ARK %d.%d" mov r9d, 3B0h mov cs:dword_1430486D0, ecx lea rcx, qword_1430486D8 mov r8d, 0FEh mov cs:dword_142FA22FC, 0FEh mov cs:dword_142FA22F8, 3B0h call sub_140AD5AA0 lea rcx, sub_142585950 call sub_142556E2C loc_141288404: ; CODE XREF: sub_1412881C0+1FAj cmp cs:dword_1430486E0, edi lea rsi, unk_142BE3168 mov [rbp+10h], rdi cmovnz rsi, cs:qword_1430486D8 test rsi, rsi jz short loc_141288495 or rax, 0FFFFFFFFFFFFFFFFh loc_141288426: ; CODE XREF: sub_1412881C0+26Dj inc rax cmp [rsi+rax*2], di jnz short loc_141288426 lea ebx, [rax+1] lea rcx, [rbp-70h] mov [rbp+20h], eax mov r8d, ebx call sub_1401131C0 mov rax, [rbp+10h] lea rdx, [rbp-70h] test rax, rax mov r9d, ebx mov r8, rsi setz dil neg edi movsxd rcx, edi and rcx, rdx mov edx, ebx or rcx, rax mov [rbp+18h], rcx call sub_140113280 test rax, rax jnz short loc_14128848F lea r9, unk_142BE3168 lea r8d, [rax+18h] lea rdx, aCSvn_arkEng_44 ; "C:\\SVN_Ark\\Engine\\Source\\Runtime\\C"... lea rcx, aResult ; "Result" call sub_140B5FD50 loc_14128848F: ; CODE XREF: sub_1412881C0+2AFj mov rdi, [rbp+10h] jmp short loc_14128849C ; --------------------------------------------------------------------------- loc_141288495: ; CODE XREF: sub_1412881C0+260j mov [rbp+18h], rdi mov [rbp+20h], edi loc_14128849C: ; CODE XREF: sub_1412881C0+2D3j mov rax, [rbp+18h] mov rsi, [rsp+168h] mov [rsp+50h], rax test rdi, rdi jz short loc_1412884D3 mov rcx, cs:qword_142FAE3D8 test rcx, rcx jnz short loc_1412884CA call sub_140AEDD60 mov rcx, cs:qword_142FAE3D8 loc_1412884CA: ; CODE XREF: sub_1412881C0+2FCj mov rax, [rcx] mov rdx, rdi call qword ptr [rax+28h] loc_1412884D3: ; CODE XREF: sub_1412881C0+2F0j mov eax, dword ptr cs:qword_142FBE330 lea r8, qword_142FBE338 lea rdx, [rsp+50h] mov [rsp+58h], eax movzx eax, word ptr cs:qword_142FBE328 mov ecx, 2 mov [rsp+5Ch], ax lea rax, nullsub_1 mov [rsp+60h], rax lea rax, sub_141287F00 mov [rsp+68h], rax lea rax, sub_141287C70 mov [rsp+70h], rax call r15 test al, al jz short loc_141288529 mov bl, 1 jmp short loc_141288538 ; --------------------------------------------------------------------------- loc_141288529: ; CODE XREF: sub_1412881C0+1B8j ; sub_1412881C0+1E3j ... mov rcx, cs:qword_142FBE358 call cs:FreeLibrary loc_141288536: ; CODE XREF: sub_1412881C0+19Fj ; sub_1412881C0+1CAj xor bl, bl loc_141288538: ; CODE XREF: sub_1412881C0+367j cmp qword ptr [rsp+30h], 0 mov r15, [rsp+140h] mov rdi, [rsp+170h] jz short loc_141288574 mov rcx, cs:qword_142FAE3D8 test rcx, rcx jnz short loc_141288568 call sub_140AEDD60 mov rcx, cs:qword_142FAE3D8 loc_141288568: ; CODE XREF: sub_1412881C0+39Aj mov r8, [rcx] mov rdx, [rsp+30h] call qword ptr [r8+28h] loc_141288574: ; CODE XREF: sub_1412881C0+38Ej movzx eax, bl jmp short loc_14128857B ; --------------------------------------------------------------------------- loc_141288579: ; CODE XREF: sub_1412881C0+23j ; sub_1412881C0+30j xor al, al loc_14128857B: ; CODE XREF: sub_1412881C0+3B7j mov rcx, [rbp+30h] xor rcx, rsp call sub_142556D00 add rsp, 148h pop rbx pop rbp retn sub_1412881C0 endp
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д