Function at 0x100004cc8
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rbp, rcx
or r15, 0xffffffffffffffff
xor eax, eax
mov rdi, qword [rbp + 0x38]
mov rcx, r15
mov r14, rdx
repne scasw ax, word [rdi]
mov ebx, 0x80041008
not rcx
dec rcx
test ecx, ecx
je 0x100004f8e
and qword [rsp + 0x30], rax
mov rcx, qword [rbp + 0x38]
lea r8d, [rax + 1]
xor r9d, r9d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, r15
je 0x100004f30
lea rdx, [rsp + 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x80], eax
cmp eax, 0xffffffff
je 0x100004f25
lea ecx, [rax + 2]
call qword [sym.imp.wbemcomn.dll_public:_static_void____ptr64___cdecl_CWin32DefaultArena::WbemMemAlloc_unsigned_long_long_unsigned___int64__]
mov rsi, rax
test rax, rax
jne 0x100004d78
mov ebx, 0x80041006
jmp 0x100004f25
mov r8d, dword [rsp + 0x80]
xor edx, edx
mov rcx, rax
add r8d, 2
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x80]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x90]
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100004eb9
mov eax, 0xfeff
xor ebx, ebx
cmp word [rsi], ax
jne 0x100004dd6
lea rcx, [rbp + 0x30]
mov rdx, rsi
call qword [sym.imp.wbemcomn.dll_public:_void___cdecl_WString::BindPtr_unsigned_short_int____ptr64____ptr64]
jmp 0x100004eaa
xor eax, eax
mov rcx, r15
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
mov r12d, ecx
movsxd rcx, ecx
add rcx, rcx
call qword [sym.imp.wbemcomn.dll_public:_static_void____ptr64___cdecl_CWin32DefaultArena::WbemMemAlloc_unsigned_long_long_unsigned___int64__]
mov rdi, rax
test rax, rax
jne 0x100004e04
mov ebx, 0x80041006
jmp 0x100004e9d
mov edx, 1
mov r9d, r12d
mov r8, rsi
lea ecx, [rdx + 2]
mov dword [rsp + 0x28], r12d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x100004e90
call qword [sym.imp.wbemcomn.dll_class_CMemoryLog____ptr64___cdecl_GetMemLogObject_void_]
mov edx, r15d
mov rcx, rax
call qword [sym.imp.wbemcomn.dll_public:_void___cdecl_CMemoryLog::Write_long_int____ptr64]
mov rcx, qword [0x10000b190]
lea rax, [0x10000b190]
cmp rcx, rax
je 0x100004e80
test byte [rcx + 0x1c], 2
je 0x100004e80
cmp byte [rcx + 0x19], 2
jb 0x100004e80
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x10000b190]
lea r8, [0x1000016c8]
mov rcx, qword [rcx + 0x10]
mov edx, 0x18
mov r9, rsi
mov dword [rsp + 0x20], eax
call fcn.1000039fc
mov rcx, rdi
mov ebx, 0x80041001
call qword [sym.imp.wbemcomn.dll_public:_static_int___cdecl_CWin32DefaultArena::WbemMemFree_void____ptr64_]
jmp 0x100004e9d
lea rcx, [rbp + 0x30]
mov rdx, rdi
call qword [sym.imp.wbemcomn.dll_public:_void___cdecl_WString::BindPtr_unsigned_short_int____ptr64____ptr64]
mov rcx, rsi
call qword [sym.imp.wbemcomn.dll_public:_static_int___cdecl_CWin32DefaultArena::WbemMemFree_void____ptr64_]
test ebx, ebx
js 0x100004f25
mov rdx, r14
mov rcx, rbp
call fcn.100004528
mov ebx, eax
jmp 0x100004f25
call qword [sym.imp.wbemcomn.dll_class_CMemoryLog____ptr64___cdecl_GetMemLogObject_void_]
mov edx, r15d
mov rcx, rax
call qword [sym.imp.wbemcomn.dll_public:_void___cdecl_CMemoryLog::Write_long_int____ptr64]
mov rcx, qword [0x10000b190]
lea rax, [0x10000b190]
cmp rcx, rax
je 0x100004f17
test byte [rcx + 0x1c], 2
je 0x100004f17
cmp byte [rcx + 0x19], 2
jb 0x100004f17
mov rdi, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x10000b190]
mov rcx, qword [rcx + 0x10]
lea r8, [0x1000016c8]
mov edx, 0x19
mov r9, rdi
mov dword [rsp + 0x20], eax
call fcn.100003960
mov rcx, rsi
call qword [sym.imp.wbemcomn.dll_public:_static_int___cdecl_CWin32DefaultArena::WbemMemFree_void____ptr64_]
mov ebx, 0x80041001
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100004f8e
call qword [sym.imp.wbemcomn.dll_class_CMemoryLog____ptr64___cdecl_GetMemLogObject_void_]
mov edx, r15d
mov rcx, rax
call qword [sym.imp.wbemcomn.dll_public:_void___cdecl_CMemoryLog::Write_long_int____ptr64]
mov rcx, qword [0x10000b190]
lea rax, [0x10000b190]
cmp rcx, rax
je 0x100004f8e
test byte [rcx + 0x1c], 2
je 0x100004f8e
cmp byte [rcx + 0x19], 2
jb 0x100004f8e
mov rdi, qword [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x10000b190]
mov rcx, qword [rcx + 0x10]
lea r8, [0x1000016c8]
mov edx, 0x1a
mov r9, rdi
mov dword [rsp + 0x20], eax
call fcn.100003960
mov eax, ebx
mov rbx, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret