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

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x130]
sub rsp, 0x230
mov rax, qword [0x1401980c8]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov rsi, qword [r8]
xor edi, edi
mov qword [rbp - 0x78], rcx
mov r14, rdx
mov r12d, edi
mov r15d, edi
mov r13d, edi
test rdx, rdx
jne 0x14004a9de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp - 0x60]
call fcn.140029a88
xor r8d, r8d
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r9, rax
mov rcx, rsi
call fcn.140010ce0
mov edi, Ordinal_79
jmp 0x14004acc4
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x78], rax
cmp rax, 0xffffffffffffffff
jne 0x14004aa2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp - 0x60]
call fcn.140029a88
mov r8, r14
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
jmp 0x14004a9c9
lea rdx, [rbp - 0x80]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14004aa70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp - 0x60]
call fcn.140029a88
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r8, r14
mov r9, rax
mov rcx, rsi
call fcn.140010ce0
mov edi, Ordinal_79
jmp 0x14004acb9
mov rbx, qword [rbp - 0x80]
mov eax, 0x100000
cmp rbx, rax
jle 0x14004aa92
mov r8d, eax
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, rsi
call fcn.140010ce0
jmp 0x14004aa66
lea rcx, [rbx + 1]
call qword [fcn.1400bac0c]
mov r12, rax
test rax, rax
jne 0x14004aaac
lea edi, [rax + 0x1b]
jmp 0x14004acb9
test rbx, rbx
je 0x14004aaf6
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x64]
mov r8d, ebx
mov edx, r15d
sub r8d, r15d
mov dword [rsp + 0x64], edi
add rdx, r12
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14004abf7
cmp dword [rsp + 0x64], edi
jne 0x14004aae9
mov ebx, r15d
jmp 0x14004aaee
add r15d, dword [rsp + 0x64]
mov eax, r15d
cmp rax, rbx
jb 0x14004aab1
mov byte [rbx + r12], dil
mov r15, r12
mov byte [rsp + 0x60], 1
cmp byte [r15], dil
je 0x14004ac23
lea rdx, str._____BEGIN_CERTIFICATE_____
mov rcx, r15
call fcn.140091fc0
mov rbx, rax
test rax, rax
je 0x14004ac14
mov cl, byte [rax + 0x1b]
call fcn.14004a950
test eax, eax
je 0x14004ac14
lea rdx, str._n_____END_CERTIFICATE_____
mov rcx, rbx
call fcn.140091fc0
mov r15, rax
test rax, rax
je 0x14004ac90
lea rax, [rsp + 0x70]
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x50], rax
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x48], rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rdi
sub r15d, ebx
mov qword [rsp + 0x38], rdi
add r15d, 0x1a
mov qword [rsp + 0x30], rax
mov eax, 2
mov qword [rsp + 0x28], rdi
mov r8d, eax
mov ecx, eax
mov dword [rsp + 0x68], edi
mov qword [rbp - 0x68], rbx
lea r9d, [rax + 0xc]
mov dword [rbp - 0x70], r15d
mov dword [rsp + 0x20], edi
call qword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x14004ac70
mov r8d, dword [rsp + 0x68]
add r15, rbx
cmp r8d, 1
jne 0x14004ac59
mov rdx, qword [rsp + 0x70]
xor r9d, r9d
mov rcx, qword [rbp - 0x78]
lea r8d, [r9 + 4]
call qword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov rcx, qword [rsp + 0x70]
mov ebx, eax
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test ebx, ebx
je 0x14004ac3c
mov al, byte [rsp + 0x60]
inc r13d
jmp 0x14004ac1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp - 0x60]
call fcn.140029a88
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
jmp 0x14004aa58
mov al, dil
mov byte [rsp + 0x60], al
test al, al
jne 0x14004ab02
mov rcx, rsi
test r13d, r13d
jne 0x14004aca7
mov r8, r14
lea rdx, str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
call fcn.140010bf0
jmp 0x14004acb9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp + 0x20]
call fcn.140029a88
lea rdx, str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
jmp 0x14004aa58
mov r9, r14
lea rdx, str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
mov rcx, rsi
call fcn.140010ce0
jmp 0x14004aa66
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rbp + 0xa0]
call fcn.140029a88
lea rdx, str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
jmp 0x14004aa58
mov r8, r14
lea rdx, str.schannel:_CA_file__s_is_not_correctly_formatted
mov rcx, rsi
call fcn.140010ce0
jmp 0x14004aa66
mov r9, r14
lea rdx, str.schannel:_added__d_certificate_s__from_CA_file__s_n
mov r8d, r13d
call fcn.140010bf0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r12
call qword [fcn.1400b8804]
mov eax, edi
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.14008f320
mov rbx, qword [rsp + 0x288]
add rsp, 0x230
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret