Function at 0x401b04
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
xor r15d, r15d
mov rdi, rcx
mov dword [rax + 8], r15d
cmp rcx, 0xffffffffffffffff
jne 0x401b34
xor eax, eax
jmp 0x401dbf
mov r9d, 1
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rsp + 0xc0]
lea rdx, [rsp + 0x40]
mov r8d, 2
mov rcx, rdi
mov qword [rsp + 0x20], r15
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea r9, [rsp + 0xc0]
lea rdx, [rsp + 0x42]
mov r8d, 0xc
mov rcx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r11d, 0x4d42
cmp word [rsp + 0x40], r11w
je 0x401baf
xor r9d, r9d
xor r8d, r8d
mov edx, r14d
mov rcx, rdi
mov dword [rsp + 0x4a], r15d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, 0x28
lea r9, [rsp + 0xc0]
lea rdx, [rsp + 0x50]
mov rcx, rdi
mov r8d, esi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r15d
je 0x401b2d
lea rcx, [rsp + 0x50]
call fcn.004016f0
mov r8d, dword [rsp + 0x50]
movzx r12d, ax
mov r13d, r8d
cmp r8d, 0xc
je 0x401c05
cmp r8d, esi
je 0x401c86
jmp 0x401b2d
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x50]
mov r9d, 1
mov rax, qword [rcx]
xor r8d, r8d
mov qword [rdx], rax
mov eax, dword [rcx + 8]
mov dword [rsp + 0x50], esi
mov dword [rdx + 8], eax
mov rcx, qword [rsp + 0x30]
lea edx, [r9 - 0x1d]
mov rax, rcx
shr rcx, 0x30
mov dword [rsp + 0x60], r15d
shr rax, 0x20
mov dword [rsp + 0x58], ecx
mov rcx, rdi
movzx eax, ax
mov dword [rsp + 0x64], r15d
mov dword [rsp + 0x68], r15d
mov dword [rsp + 0x54], eax
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x6c], r15d
mov word [rsp + 0x5c], ax
shr eax, 0x10
mov word [rsp + 0x5e], ax
movzx eax, r12w
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x74], eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rsp + 0x50]
cmp dword [rsp + 0x64], r15d
jne 0x401ca9
movzx eax, word [rsp + 0x5e]
imul eax, dword [rsp + 0x54]
add eax, 0x1f
shr eax, 5
imul eax, dword [rsp + 0x58]
shl eax, 2
mov dword [rsp + 0x64], eax
cmp dword [rsp + 0x70], r15d
jne 0x401cc1
lea rcx, [rsp + 0x50]
call fcn.004016f0
movzx ecx, ax
mov dword [rsp + 0x70], ecx
movzx ecx, r12w
movsxd rax, r8d
lea rdx, [rax + rcx*4]
mov ecx, 0x42
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbp, rax
cmp rax, r15
je 0x401b2d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
lea rdx, [rsp + 0x50]
mov r8, rsi
mov rcx, rax
mov rbx, rax
call fcn.00449960
mov esi, dword [rsp + 0x50]
add rsi, rbx
cmp r12w, r15w
je 0x401d97
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0xc0]
mov rdx, rsi
mov rcx, rdi
cmp r13d, 0xc
jne 0x401d89
movzx ebx, r12w
lea r8d, [rbx + rbx*2]
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea r11d, [rbx - 1]
movsxd rcx, r11d
cmp rcx, r15
jl 0x401d97
lea rax, [rsi + rcx*2]
mov byte [rsp + 0xcb], r15b
lea rdx, [rcx + rax + 1]
mov al, byte [rdx + 1]
mov byte [rsp + 0xca], al
mov al, byte [rdx - 1]
mov byte [rsp + 0xc8], al
mov al, byte [rdx]
sub rdx, 3
mov byte [rsp + 0xc9], al
mov eax, dword [rsp + 0xc8]
mov dword [rsi + rcx*4], eax
dec rcx
cmp rcx, r15
jge 0x401d54
jmp 0x401d97
movzx r8d, r12w
shl r8d, 2
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x4a]
cmp eax, r15d
je 0x401db3
lea edx, [rax + r14]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rax, rbp
mov rbx, qword [rsp + 0xd0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret