Function at 0x180040a0c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
xor ebx, ebx
mov rsi, r8
mov dword [rdx], ebx
mov rdi, rdx
mov dword [r8], ebx
mov r14, rcx
call fcn.18006a93c
lea r13d, [rbx + 1]
mov r12d, eax
test r13b, al
jne 0x180040ca4
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov r8d, r13d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, r14
mov dword [rbp + 0x48], 0x5a5a5a5a
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x180040a9d
mov dword [rdi], r13d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsi], eax
jmp 0x180040ca4
lea r9, [rbp + 0x50]
mov qword [rsp + 0x20], rbx
mov r8d, 4
lea rdx, [rbp + 0x48]
mov rcx, r15
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x180040c81
mov ecx, dword [rbp + 0x50]
mov eax, dword [rbp + 0x48]
mov dword [rsi], eax
test ecx, ecx
je 0x180040c1b
cmp ecx, r13d
je 0x180040bff
jbe 0x180040c95
cmp ecx, 3
jbe 0x180040bdc
cmp ecx, 4
jne 0x180040c95
test eax, eax
jne 0x180040b07
mov dword [rdi], 0xb
jmp 0x180040c21
cmp eax, 0xffffffff
jne 0x180040b17
mov dword [rdi], 0xa
jmp 0x180040c21
cmp al, 0x3c
jne 0x180040c95
movzx edx, word [r14]
mov rcx, rbx
mov r8, r14
test dx, dx
je 0x180040c95
add r8, 2
cmp dx, 0x2e
mov rax, r8
cmovne rax, rcx
movzx edx, word [r8]
mov rcx, rax
test dx, dx
jne 0x180040b32
test rax, rax
je 0x180040c95
lea rdx, [0x180088968]
call qword [sym.imp.ntdll.dll__wcsicmp]
nop dword [rax + rax]
test eax, eax
jne 0x180040c95
mov ecx, dword [rbp + 0x48]
shr ecx, 8
mov dword [rbp + 0x48], ecx
cmp cl, 0x3f
je 0x180040bd4
cmp cl, 0x21
je 0x180040bd4
test cl, cl
jne 0x180040ba4
mov eax, ecx
shr eax, 8
sub al, 0x20
cmp al, 0x5a
ja 0x180040c95
shr ecx, 0x10
test cl, cl
jne 0x180040c95
jmp 0x180040bd4
mov al, cl
mov dl, 0x41
sub al, dl
mov r8b, 0x39
cmp al, r8b
ja 0x180040c95
mov eax, ecx
shr eax, 8
sub al, dl
cmp al, r8b
ja 0x180040c95
shr ecx, 0x10
sub cl, dl
cmp cl, r8b
ja 0x180040c95
mov dword [rdi], 0xc
jmp 0x180040c21
test ax, ax
jne 0x180040be9
mov dword [rdi], 8
jmp 0x180040c21
mov ecx, 0xffff
cmp ax, cx
jne 0x180040c95
mov dword [rdi], 7
jmp 0x180040c21
test al, al
jne 0x180040c0b
mov dword [rdi], 6
jmp 0x180040c21
cmp al, 0xff
jne 0x180040c95
mov dword [rdi], 5
jmp 0x180040c21
mov dword [rdi], 4
mov ecx, 0xc1
call qword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
nop dword [rax + rax]
mov ebx, r13d
test r12b, 2
je 0x180040c95
mov rdx, r14
lea rcx, [rbp - 0x20]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
nop dword [rax + rax]
lea rax, [rbp - 0x20]
mov r8d, r13d
mov qword [rbp - 0x10], rax
lea r9, [rbp - 0x10]
lea rax, [rbp + 0x58]
mov edx, r13d
mov qword [rsp + 0x28], rax
mov ecx, 0xc0000102
mov dword [rsp + 0x20], r13d
call qword [sym.imp.ntdll.dll_NtRaiseHardError]
nop dword [rax + rax]
jmp 0x180040c95
mov dword [rdi], 2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsi], eax
mov rcx, r15
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov eax, ebx
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret