Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A few functions from the old Razor911.dll
- -------------------------------------------
- BOOL sub_10001050()
- {
- HWND v0; // eax@1
- HWND v1; // ebx@1
- void *v2; // eax@1
- void *v3; // esi@1
- void *v4; // ebx@11
- struct tagRECT Rect; // [sp+14h] [bp-5Ch]@1
- struct tagMSG Msg; // [sp+24h] [bp-4Ch]@5
- WNDCLASSEXW v8; // [sp+40h] [bp-30h]@1
- v8.cbSize = 48;
- v8.style = 64;
- v8.lpfnWndProc = (WNDPROC)sub_10001000;
- v8.cbClsExtra = 0;
- v8.cbWndExtra = 0;
- v8.hInstance = GetModuleHandleW(0);
- v8.hIcon = 0;
- v8.hCursor = 0;
- v8.hbrBackground = 0;
- v8.lpszMenuName = 0;
- v8.lpszClassName = L"Razor1911";
- v8.hIconSm = 0;
- RegisterClassExW(&v8);
- v0 = GetDesktopWindow();
- GetClientRect(v0, &Rect);
- v1 = CreateWindowExW(
- 0,
- L"Razor1911",
- L"Razor 1911",
- 0x80000000,
- (Rect.right - Rect.left - 800) >> 1,
- (Rect.bottom - Rect.top - 300) >> 1,
- 800,
- 300,
- 0,
- 0,
- v8.hInstance,
- 0);
- v2 = operator new(0x58u);
- v3 = v2;
- if ( v2 )
- {
- *((float *)v2 + 6) = 0.0;
- *(_BYTE *)v2 = 1;
- *((_DWORD *)v2 + 7) = 0;
- *((_DWORD *)v2 + 8) = 0;
- *((_DWORD *)v2 + 11) = 0;
- *((_DWORD *)v2 + 12) = 0;
- *((_DWORD *)v2 + 14) = 0;
- *((_DWORD *)v2 + 15) = 0;
- *((_DWORD *)v2 + 16) = 0;
- *((_DWORD *)v2 + 21) = 0;
- QueryPerformanceFrequency((LARGE_INTEGER *)v2 + 1);
- }
- else
- {
- v3 = 0;
- }
- dword_10040E44 = v3;
- if ( !sub_10001350(v1) )
- {
- Msg.hwnd = 0;
- Msg.message = 0;
- Msg.wParam = 0;
- Msg.lParam = 0;
- Msg.time = 0;
- Msg.pt.x = 0;
- Msg.pt.y = 0;
- do
- {
- if ( PeekMessageW(&Msg, 0, 0, 0, 1u) )
- {
- TranslateMessage(&Msg);
- DispatchMessageW(&Msg);
- }
- else if ( sub_100016D0() )
- {
- DestroyWindow(v1);
- }
- }
- while ( Msg.message != 18 );
- }
- v4 = dword_10040E44;
- if ( dword_10040E44 )
- {
- sub_100012C0((int)dword_10040E44);
- operator delete(v4);
- }
- return UnregisterClassW(L"Razor1911", v8.hInstance);
- }
- -------------------------------------------------------
- int __usercall sub_100012C0@<eax>(int a1@<esi>)
- {
- int v1; // eax@5
- int v2; // eax@7
- int v3; // eax@9
- int v4; // eax@11
- int v5; // eax@13
- int result; // eax@15
- if ( *(_DWORD *)(a1 + 84) )
- sub_100020A0(*(void **)(a1 + 84));
- if ( *(_DWORD *)(a1 + 48) )
- DeleteObject(*(HGDIOBJ *)(a1 + 48));
- v1 = *(_DWORD *)(a1 + 64);
- if ( v1 )
- {
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v1 + 8))(*(_DWORD *)(a1 + 64));
- *(_DWORD *)(a1 + 64) = 0;
- }
- v2 = *(_DWORD *)(a1 + 60);
- if ( v2 )
- {
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v2 + 8))(*(_DWORD *)(a1 + 60));
- *(_DWORD *)(a1 + 60) = 0;
- }
- v3 = *(_DWORD *)(a1 + 56);
- if ( v3 )
- {
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v3 + 8))(*(_DWORD *)(a1 + 56));
- *(_DWORD *)(a1 + 56) = 0;
- }
- v4 = *(_DWORD *)(a1 + 44);
- if ( v4 )
- {
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v4 + 8))(*(_DWORD *)(a1 + 44));
- *(_DWORD *)(a1 + 44) = 0;
- }
- v5 = *(_DWORD *)(a1 + 32);
- if ( v5 )
- {
- (*(void (__stdcall **)(_DWORD))(*(_DWORD *)v5 + 8))(*(_DWORD *)(a1 + 32));
- *(_DWORD *)(a1 + 32) = 0;
- }
- result = *(_DWORD *)(a1 + 28);
- if ( result )
- {
- result = (*(int (__stdcall **)(_DWORD))(*(_DWORD *)result + 8))(*(_DWORD *)(a1 + 28));
- *(_DWORD *)(a1 + 28) = 0;
- }
- return result;
- }
- -------------------------------------------------------
- char *__stdcall sub_1000462C(int a1, int a2, int a3, HANDLE Process)
- {
- HWND v4; // esi@6
- DWORD v6; // eax@9
- char v7; // [sp+0h] [bp-90h]@1
- int v8; // [sp+10h] [bp-80h]@12
- LPVOID lpBaseAddress; // [sp+14h] [bp-7Ch]@15
- LPVOID v10; // [sp+18h] [bp-78h]@15
- SIZE_T NumberOfBytesRead; // [sp+40h] [bp-50h]@12
- int Buffer; // [sp+44h] [bp-4Ch]@1
- char v13; // [sp+48h] [bp-48h]@1
- Buffer = 1;
- qmemcpy(&v7, L"GTAIV.exe", 0x17u);
- qmemcpy(&v13, &unk_1001B240, 0x40u);
- if ( a2 == 43858 )
- {
- ReadProcessMemory(hProcess, Process, &v7, 0x40u, &NumberOfBytesRead);
- switch ( v8 )
- {
- case 18:
- WriteProcessMemory(hProcess, v10, &v13, 0x40u, &NumberOfBytesRead);
- break;
- case 100:
- WriteProcessMemory(hProcess, lpBaseAddress, &Buffer, 4u, &NumberOfBytesRead);
- break;
- case 51:
- return (char *)lpBaseAddress + (_DWORD)v10;
- }
- }
- else
- {
- if ( a2 == 43860 )
- {
- v4 = hWnd;
- hWnd = (HWND)Process;
- CreateThread(0, 0x1000u, (LPTHREAD_START_ROUTINE)sub_100047C4, Process, 0, (LPDWORD)&v7);
- return (char *)v4;
- }
- if ( a2 != 43869 )
- return (char *)1;
- if ( a3 == 1 )
- {
- hWnd = 0;
- hProcess = Process;
- v6 = GetProcessId(Process);
- sprintf(&v7, "v7_%04d", v6 ^ 0x19EA3FD3);
- CreateEventA(0, 1, 1, &v7);
- return (char *)100;
- }
- if ( a3 == 2 )
- {
- v4 = (HWND)calloc(1u, 0x14u);
- memcpy(v4, &v7, 0x12u);
- return (char *)v4;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement