Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <defs.h>
- #include <windows.h>
- #include <math.h>
- #include <stdarg.h>
- #include <stddef.h>
- #include <stdio.h>
- #include <stdlib.h>
- __int64 __fastcall common_ftell<__int64>(_QWORD); // weak
- __int64 __fastcall common_ftell<long>(_QWORD); // weak
- void *__cdecl j__malloc_base(size_t Size);
- void __cdecl j__free_base(void *Block);
- void *__fastcall sub_180093880(size_t *a1, const char *a2)
- {
- FILE *v3; // rax
- FILE *v4; // rdi
- size_t v5; // rbp
- void *v6; // rsi
- size_t v7; // rbx
- void *result; // rax
- if ( !a2 )
- return 0i64;
- v3 = fopen(a2, "rb");
- v4 = v3;
- if ( !v3 )
- return 0i64;
- fseek(v3, 0, 2);
- v5 = (int)common_ftell<long>(v4);
- fseek(v4, 0, 0);
- v6 = j__malloc_base(v5);
- v7 = fread(v6, 1ui64, v5, v4);
- ftell(v4);
- if ( v7 == v5 )
- {
- *a1 = v5;
- result = v6;
- }
- else
- {
- j__free_base(v6);
- result = 0i64;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment