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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x350]
sub rsp, 0x450
xor esi, esi
mov rcx, rdx
mov r15d, esi
mov ebx, esi
mov r13, r8
mov rdi, rdx
call fcn.14007e8e0
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x1400a5d75
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov qword [rsp + 0x30], rsi
lea r15, [rsp + 0x50]
mov dword [rsp + 0x28], 0x100
xor r9d, r9d
mov r8d, r14d
mov word [rbp + 0x150], si
mov edi, dword [rax]
xor edx, edx
lea rax, [rbp + 0x150]
mov byte [rsp + 0x50], sil
mov ecx, 0x1200
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1400a5cca
mov r8d, 0xff
lea rdx, [rbp + 0x150]
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs]
cmp rax, 0xffffffffffffffff
je 0x1400a5cc5
mov byte [rsp + rax + 0x50], sil
jmp 0x1400a5cca
mov byte [rsp + 0x50], sil
mov edx, 0xa
lea rcx, [rsp + 0x50]
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1400a5cf8
lea rcx, [rsp + 0x50]
cmp rax, rcx
jbe 0x1400a5cf5
cmp byte [rax - 1], 0xd
jne 0x1400a5cf5
mov byte [rax - 1], sil
jmp 0x1400a5cf8
mov byte [rax], sil
cmp byte [rsp + 0x50], sil
cmovne rsi, r15
test rsi, rsi
jne 0x1400a5d24
mov r9d, r14d
mov dword [rsp + 0x20], r14d
lea r8, str.Unknown_error__lu__0x_08lX_
mov edx, 0x100
lea rcx, [rsp + 0x50]
call fcn.14007e5a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], edi
je 0x1400a5d36
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, eax
je 0x1400a5d48
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8, qword [rbp + 0x398]
lea r9, [rsp + 0x50]
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov rcx, r13
call fcn.140077850
xor ecx, ecx
mov ebx, 0x4d
call qword [0x1401630a8]
jmp 0x1400a5ffd
mov qword [rsp + 0x30], rsi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x80000000
mov r8d, 1
mov dword [rsp + 0x20], 3
mov rcx, rax
mov qword [rsp + 0x4a0], r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400a5ed5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov qword [rsp + 0x30], rsi
lea r15, [rbp + 0x50]
mov dword [rsp + 0x28], 0x100
xor r9d, r9d
mov r8d, r14d
mov word [rbp + 0x150], si
mov edi, dword [rax]
xor edx, edx
lea rax, [rbp + 0x150]
mov byte [rbp + 0x50], sil
mov ecx, 0x1200
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x1400a5e35
mov r8d, 0xff
lea rdx, [rbp + 0x150]
lea rcx, [rbp + 0x50]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs]
cmp rax, r12
je 0x1400a5e31
mov byte [rbp + rax + 0x50], sil
jmp 0x1400a5e35
mov byte [rbp + 0x50], sil
mov edx, 0xa
lea rcx, [rbp + 0x50]
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1400a5e61
lea rcx, [rbp + 0x50]
cmp rax, rcx
jbe 0x1400a5e5e
cmp byte [rax - 1], 0xd
jne 0x1400a5e5e
mov byte [rax - 1], sil
jmp 0x1400a5e61
mov byte [rax], sil
cmp byte [rbp + 0x50], sil
cmovne rsi, r15
test rsi, rsi
jne 0x1400a5e8b
mov r9d, r14d
mov dword [rsp + 0x20], r14d
lea r8, str.Unknown_error__lu__0x_08lX_
mov edx, 0x100
lea rcx, [rbp + 0x50]
call fcn.14007e5a0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], edi
je 0x1400a5e9d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], edi
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, eax
je 0x1400a5eaf
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8, qword [rbp + 0x398]
lea r9, [rbp + 0x50]
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov rcx, r13
call fcn.140077850
xor ecx, ecx
mov ebx, 0x4d
jmp 0x1400a5fe4
lea rdx, [rsp + 0x40]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400a5f1a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp + 0x150]
call fcn.14005b170
mov r9, rax
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r8, rdi
mov rcx, r13
call fcn.140077850
mov ebx, 0x4d
jmp 0x1400a5fd8
mov rdi, qword [rsp + 0x40]
cmp rdi, 0x100000
jle 0x1400a5f47
mov r8d, 0x100000
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, r13
call fcn.140077850
mov ebx, 0x4d
jmp 0x1400a5fd8
lea rcx, [rdi + 1]
call qword [0x140163098]
mov r15, rax
test rax, rax
jne 0x1400a5f60
mov ebx, 0x1b
jmp 0x1400a5fd8
test rdi, rdi
je 0x1400a5fb4
nop word [rax + rax]
mov r8d, edi
mov r14d, ebx
sub r8d, ebx
mov dword [rbp + 0x3a8], esi
lea r9, [rbp + 0x3a8]
mov qword [rsp + 0x20], rsi
mov rcx, r12
lea rdx, [r14 + r15]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400a6011
mov eax, dword [rbp + 0x3a8]
test eax, eax
jne 0x1400a5fab
mov edi, r14d
jmp 0x1400a5fad
add ebx, eax
mov eax, ebx
cmp rax, rdi
jb 0x1400a5f70
mov r9, qword [rbp + 0x398]
mov r8, rdi
mov rcx, qword [rbp + 0x390]
mov rdx, r15
mov byte [rdi + r15], sil
mov qword [rsp + 0x20], r13
call fcn.1400a57a0
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r15
call qword [0x1401630a8]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r12, qword [rsp + 0x4a0]
mov eax, ebx
add rsp, 0x450
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp + 0x150]
call fcn.14005b170
mov r8, qword [rbp + 0x398]
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov r9, rax
mov rcx, r13
call fcn.140077850
mov ebx, 0x4d
jmp 0x1400a5fd8