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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1e8
mov rsi, qword [rcx + 0x10]
mov r15, rcx
mov r12, rdx
call fcn.140242630
mov rdx, r12
mov rcx, r15
mov rbx, rax
call fcn.140242600
lea r8, [rsp + 0x78]
mov edx, 0x53
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x50], rax
mov rax, qword [rsi + 0x38]
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov rcx, qword [rax + 8]
mov rax, qword [0x14037abd0]
mov rax, qword [rax]
call qword [rax + 0x58]
mov ecx, eax
test eax, eax
jne 0x140244a0c
cmp qword [rsp + 0x78], 0
je 0x140244a0c
cmp qword [rbx + 8], 0
jne 0x140244a46
jmp 0x140244a39
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
xor r13d, r13d
call fcn.140243400
lea rdx, str.schannel:_Failed_to_read_remote_certificate_context:__s
mov rcx, r12
mov r8, rax
call fcn.140232170
jmp 0x140244f66
mov r13, qword [rbx + 0x48]
test r13, r13
je 0x140244e27
mov rax, qword [rsi + 0x38]
xor r13d, r13d
cmp byte [rax + 0x6c], 0
je 0x140244e27
mov dword [rsp + 0x20], 0
xor r8d, r8d
mov r9d, 2
mov edx, 1
mov ecx, 6
call fcn.140259010
test al, al
je 0x140244a8f
lea rdx, str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
mov rcx, r12
call fcn.140232170
jmp 0x140244e1d
mov rdx, r12
mov rcx, r15
call fcn.140241150
mov rsi, rax
test rax, rax
je 0x140244ae8
test r12, r12
je 0x140244db4
test byte [r12 + 0x986], 0x20
je 0x140244db4
mov rax, qword [r12 + 0x1120]
test rax, rax
je 0x140244ad1
cmp dword [rax + 8], 0
jle 0x140244db4
lea rdx, str.schannel:_reusing_certificate_store_from_cache
mov rcx, r12
xor r13d, r13d
call fcn.140239c50
jmp 0x140244db4
mov r9d, 0x2000
xor r8d, r8d
xor edx, edx
mov ecx, 2
mov qword [rsp + 0x20], 0
call qword [sym.imp.CRYPT32.dll_CertOpenStore]
mov r13, rax
test rax, rax
jne 0x140244b39
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
lea rdx, str.schannel:_failed_to_create_certificate_store:__s
mov r8, rax
jmp 0x140244e15
mov r14, qword [rbx + 0x48]
test r14, r14
je 0x140244b64
mov r8, qword [r14 + 8]
mov qword [rsp + 0x20], r12
lea r9, str._memory_blob_
mov rcx, rax
mov rdx, qword [r14]
call fcn.140248170
mov esi, eax
jmp 0x140244d90
mov rbp, qword [rbx + 8]
mov rcx, rbp
call sub.msvcrt.dll__strdup
mov rdi, rax
test rax, rax
jne 0x140244ba2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
mov r8, rbp
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r9, rax
jmp 0x140244c04
xor r9d, r9d
mov edx, 0x80000000
mov rcx, rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov r8d, 1
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
inc rax
jne 0x140244c16
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
mov r8, rbp
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov r9, rax
mov rcx, r12
mov esi, 0x4d
call fcn.140232170
jmp 0x140244d77
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x140244c5a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
mov r8, rbp
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov r9, rax
jmp 0x140244d40
mov r10, qword [rsp + 0x90]
cmp r10, 0x100000
jle 0x140244c85
mov r8d, 0x100000
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, r12
call fcn.140232170
jmp 0x140244d48
mov rax, qword [0x14037a0e0]
mov qword [rsp + 0x58], r10
lea rcx, [r10 + 1]
mov esi, 0x1b
call qword [rax]
mov r14, rax
test rax, rax
je 0x140244d6c
mov r10, qword [rsp + 0x58]
xor r11d, r11d
lea r9, [rsp + 0x74]
jmp 0x140244cc8
mov eax, dword [rsp + 0x74]
test eax, eax
je 0x140244cc5
add r11d, eax
mov rsi, r10
mov r10, rsi
mov esi, r11d
cmp r10, rsi
jbe 0x140244d4f
mov r8d, r10d
mov qword [rsp + 0x68], r9
mov rcx, qword [rsp + 0x48]
lea rdx, [r14 + rsi]
sub r8d, r11d
mov qword [rsp + 0x60], r10
mov dword [rsp + 0x58], r11d
mov dword [rsp + 0x74], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r11d, dword [rsp + 0x58]
mov r10, qword [rsp + 0x60]
test eax, eax
mov r9, qword [rsp + 0x68]
jne 0x140244cb7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
mov r8, rbp
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov r9, rax
mov rcx, r12
call fcn.140232170
mov esi, 0x4d
jmp 0x140244d6c
mov byte [r14 + r10], 0
mov r9, rbp
mov r8, r10
mov rdx, r14
mov qword [rsp + 0x20], r12
mov rcx, r13
call fcn.140248170
mov esi, eax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14037a0d0]
mov rcx, r14
call qword [rax]
test rdi, rdi
je 0x140244d90
mov rcx, rdi
call sub.msvcrt.dll_free
test esi, esi
jne 0x140244f80
mov r8, r13
mov rdx, r12
mov rcx, r15
mov rsi, r13
call fcn.140241250
test al, al
mov eax, 0
cmovne r13, rax
lea r8, [rsp + 0x90]
xor eax, eax
mov ecx, 0x14
mov rdi, r8
lea rdx, [rsp + 0x88]
rep stosd dword [rdi], eax
mov qword [rsp + 0xd0], rsi
mov rcx, r8
mov dword [rsp + 0x90], 0x50
call qword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
jne 0x140244e27
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
lea rdx, str.schannel:_failed_to_create_certificate_chain_engine:__s
mov r8, rax
mov rcx, r12
call fcn.140232170
mov esi, 0x4d
jmp 0x140244f80
lea rdx, [rsp + 0x90]
xor eax, eax
mov ecx, 8
mov r10, qword [rsp + 0x78]
mov rdi, rdx
rep stosd dword [rdi], eax
mov rax, qword [rsp + 0x50]
lea rcx, [rsp + 0x80]
mov dword [rsp + 0x90], 0x20
mov al, byte [rax + 0xb0]
mov r9, qword [r10 + 0x20]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x20], rdx
mov rcx, qword [rsp + 0x88]
mov rdx, r10
mov qword [rsp + 0x30], 0
and eax, 8
cmp al, 1
sbb eax, eax
xor r8d, r8d
and eax, 0x20000000
mov dword [rsp + 0x28], eax
call qword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
jne 0x140244edb
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xe0]
mov r8d, 0x100
mov ecx, eax
call fcn.140247c70
lea rdx, str.schannel:_CertGetCertificateChain_failed:__s
mov rcx, r12
mov r8, rax
call fcn.140232170
mov qword [rsp + 0x80], 0
jmp 0x140244f66
mov rax, qword [rsp + 0x80]
mov rax, qword [rax + 0x10]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov esi, eax
and esi, 0xfeffffbd
test byte [r12 + 0x5c8], 0x20
jne 0x140244f05
and eax, 0xfffffffd
mov esi, eax
test esi, esi
je 0x140244f6d
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
test sil, 4
jne 0x140244f23
bt esi, 0x10
jae 0x140244f2d
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
mov rcx, r12
call fcn.140232170
jmp 0x140244f66
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
test sil, 0x20
jne 0x140244f23
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
test sil, 1
jne 0x140244f23
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
test sil, 0x40
jne 0x140244f23
mov r8d, esi
lea rdx, str.schannel:_CertGetCertificateChain_error_mask:_0x_08lx
mov rcx, r12
call fcn.140232170
mov esi, 0x3c
jmp 0x140244f80
test byte [rbx + 0x6c], 2
je 0x140244f80
mov rdx, r12
mov rcx, r15
call fcn.140244fe0
mov esi, eax
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x140244f93
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test r13, r13
je 0x140244fa3
xor edx, edx
mov rcx, r13
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x140244fb6
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140244fc6
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, esi
add rsp, 0x1e8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret