-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.c
More file actions
35 lines (26 loc) · 940 Bytes
/
Copy pathmain.c
File metadata and controls
35 lines (26 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>
#include "MemoryTool.h"
int main() {
// Get the process ID of PUBG Mobile
pid_t pid = get_pid("com.tencent.ig");
if (pid == -1) {
printf("Error: PUBG Mobile process not found.\n");
return 1;
}
// Get the base address of libUE4.so module
unsigned long long base_address = get_module_address(pid, "libUE4.so");
if (base_address == 0) {
printf("Error: libUE4.so module not found in PUBG Mobile process.\n");
return 1;
}
// Modify memory to change the normal view into iPad view
float new_value = 240.0;
off_t offset = 0x3EF90E4;
ssize_t write_result = write_memory(pid, base_address + offset, &new_value, sizeof(float));
if (write_result == -1) {
printf("Error: Memory modification failed.\n");
return 1;
}
printf("Memory modification successful. PUBG Mobile view changed to iPad view!\n");
return 0;
}