Function at 0x1400ce078
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x20], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov r14, r9
mov r15, r8
mov r13, rdx
xor esi, esi
mov dword [rbp + 0x40], esi
mov qword [rbp - 0x30], rsi
lea rdi, [rdx + 0xe0]
mov qword [rax - 0x78], rsi
mov dword [rax - 0x80], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
mov rcx, qword [r13]
call sub.KERNEL32.dll_CreateFileW
mov r12, rax
mov qword [rbp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x1400ce516
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x40]
lea r8d, [rsi + 0x78]
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400ce516
cmp dword [rbp + 0x40], 0x78
je 0x1400ce11c
mov ebx, 0x8007012b
jmp 0x1400ce529
test rdi, rdi
jne 0x1400ce157
lea rax, [0x14014dd40]
mov rcx, qword [0x14014dd40]
cmp rcx, rax
je 0x1400ce14d
test byte [rcx + 0x1c], 1
je 0x1400ce14d
lea edx, [rdi + 0x37]
lea r8, [0x140127ce0]
mov rcx, qword [rcx + 0x10]
call fcn.140003614
mov ebx, 0x80070057
jmp 0x1400ce529
cmp dword [rdi], 0x4d51534d
je 0x1400ce197
lea rax, [0x14014dd40]
mov rcx, qword [0x14014dd40]
cmp rcx, rax
je 0x1400ce18d
test byte [rcx + 0x1c], 1
je 0x1400ce18d
mov edx, 0x39
lea r8, [0x140127ce0]
mov rcx, qword [rcx + 0x10]
call fcn.140003614
mov ebx, 0x8007000b
jmp 0x1400ce529
mov ebx, esi
cmp dword [rdi + 0x10], ebx
jbe 0x1400ce529
and qword [rsp + 0x20], rbx
lea r9, [rbp + 0x40]
mov r8d, 8
lea rdx, [rbp - 0x30]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400ce516
cmp dword [rbp + 0x40], 8
jne 0x1400ce112
cmp dword [rbp - 0x30], 7
je 0x1400ce20a
mov eax, dword [rdi + 0x10]
dec eax
cmp esi, eax
je 0x1400ce1fd
mov r9d, 1
xor r8d, r8d
mov edx, dword [rbp - 0x2c]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1400ce516
inc esi
cmp esi, dword [rdi + 0x10]
jae 0x1400ce529
jmp 0x1400ce1a2
mov ecx, dword [rbp - 0x2c]
add rcx, 2
call fcn.1401061b8
mov qword [rbp - 0x28], rax
test rax, rax
jne 0x1400ce229
mov ebx, 0x8007000e
jmp 0x1400ce529
mov r8d, dword [rbp - 0x2c]
add r8, 2
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
and qword [rsp + 0x20], rbx
lea r9, [rbp + 0x40]
mov r8d, dword [rbp - 0x2c]
mov rsi, qword [rbp - 0x28]
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400ce274
call sub.KERNEL32.dll_GetLastError
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x1400ce50a
mov ecx, dword [rbp - 0x2c]
cmp dword [rbp + 0x40], ecx
je 0x1400ce286
mov ebx, 0x8007012b
jmp 0x1400ce50a
mov eax, dword [rdi + 0x14]
add eax, 0x78
sub eax, ecx
add eax, 0xfffffff8
mov dword [r14], eax
mov ecx, eax
call fcn.1401061b8
mov qword [r15], rax
test rax, rax
jne 0x1400ce2ad
mov ebx, 0x8007000e
jmp 0x1400ce50a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1400ce25c
and qword [rsp + 0x20], rbx
lea r9, [rbp + 0x40]
mov r8d, dword [r14]
mov rdx, qword [r15]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400ce25c
mov eax, dword [r14]
cmp dword [rbp + 0x40], eax
jne 0x1400ce27c
or r11d, 0xffffffff
add dword [rdi + 0x10], r11d
mov eax, dword [rdi + 0x10]
mov r9, qword [r15]
mov dword [r9 + 0x10], eax
mov eax, dword [r14]
add eax, 0xffffff88
mov dword [rdi + 0x14], eax
mov dword [r9 + 0x14], eax
mov edx, dword [r14]
xor ecx, ecx
lea r8, [r9 + 0x14]
xor r10d, r10d
imul ecx, ecx, 0x65
movzx eax, byte [r8]
add ecx, eax
inc r8
inc r10d
movsxd rax, r10d
cmp rax, 0x10
jb 0x1400ce316
lea r8, [r9 + 0x78]
add edx, 0xffffff88
je 0x1400ce348
imul ecx, ecx, 0x65
movzx eax, byte [r8]
add ecx, eax
inc r8
add edx, r11d
jne 0x1400ce337
mov dword [rdi + 0xc], ecx
mov dword [r9 + 0xc], ecx
xor r12d, r12d
mov r14, rsi
xor edi, edi
mov qword [rbp - 0x18], rdi
xor esi, esi
mov dword [rbp - 0xc], esi
and dword [rbp - 0x10], ebx
lea r15d, [r12 + 3]
cmp dword [rbp - 0x2c], esi
jbe 0x1400ce4f8
cmp dword [r14], 0
jne 0x1400ce37d
lea rcx, [r13 + 0x20]
jmp 0x1400ce387
cmp dword [r14], 1
jne 0x1400ce39f
lea rcx, [r13 + 0x30]
lea rdx, [r14 + 8]
call fcn.1400d8f6c
mov ebx, eax
test eax, eax
js 0x1400ce4f8
jmp 0x1400ce4d5
cmp dword [r14], 2
jne 0x1400ce3d1
test rdi, rdi
je 0x1400ce3b2
test esi, esi
jne 0x1400ce4f3
lea rdx, [r14 + 8]
lea rcx, [rbp - 0x18]
call fcn.1400d8f6c
mov ebx, eax
test eax, eax
js 0x1400ce4f8
xor r15d, r15d
jmp 0x1400ce4ce
cmp dword [r14], 3
jne 0x1400ce3fa
test rdi, rdi
je 0x1400ce4f3
test esi, esi
je 0x1400ce4f3
test r15d, r15d
jne 0x1400ce4f3
lea rcx, [r13 + 0x40]
jmp 0x1400ce4a8
cmp dword [r14], 4
jne 0x1400ce42f
test rdi, rdi
je 0x1400ce40d
test esi, esi
jne 0x1400ce4f3
lea rdx, [r14 + 8]
lea rcx, [rbp - 0x18]
call fcn.1400d8f6c
mov ebx, eax
test eax, eax
js 0x1400ce4f8
mov r15d, 1
jmp 0x1400ce4ce
cmp dword [r14], 5
jne 0x1400ce465
test rdi, rdi
je 0x1400ce4f3
test esi, esi
je 0x1400ce4f3
cmp r15d, 1
jne 0x1400ce4f3
lea r8, [r14 + 8]
lea rcx, [r13 + 0xa8]
mov rdx, rdi
call fcn.1400d9868
jmp 0x1400ce4b4
cmp dword [r14], 6
jne 0x1400ce48f
test rdi, rdi
je 0x1400ce474
test esi, esi
jne 0x1400ce4f3
lea rdx, [r14 + 8]
lea rcx, [rbp - 0x18]
call fcn.1400d8f6c
mov ebx, eax
test eax, eax
js 0x1400ce4f8
mov r15d, 2
jmp 0x1400ce4ce
cmp dword [r14], 7
jne 0x1400ce4f3
test rdi, rdi
je 0x1400ce4f3
test esi, esi
je 0x1400ce4f3
cmp r15d, 2
jne 0x1400ce4f3
lea rcx, [r13 + 0x78]
lea r8, [r14 + 8]
mov rdx, rdi
call fcn.1400db078
mov ebx, eax
test eax, eax
js 0x1400ce4f8
mov edx, 1
lea rcx, [rbp - 0x18]
call fcn.1400d9748
mov r15d, 3
mov rdi, qword [rbp - 0x18]
mov esi, dword [rbp - 0xc]
mov eax, dword [r14 + 4]
lea ecx, [rax*2 + 0xc]
mov eax, ecx
add r14, rax
add r12d, ecx
cmp r12d, dword [rbp - 0x2c]
jae 0x1400ce4f8
jmp 0x1400ce371
mov ebx, 0x8007000d
mov edx, 1
lea rcx, [rbp - 0x18]
call fcn.1400d9748
mov r12, qword [rbp + 0x48]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
jmp 0x1400ce529
call sub.KERNEL32.dll_GetLastError
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, r12
call sub.KERNEL32.dll_CloseHandle
mov eax, ebx
mov rbx, qword [rsp + 0xc0]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret