Function at 0x140084530
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, 0x1d8
mov r13, qword [rcx + 0x10]
mov rbx, rcx
mov rsi, rdx
call fcn.140068bf0
mov rdx, rsi
mov rcx, rbx
mov rdi, rax
call fcn.140068bc0
lea r8, [rsp + 0x68]
mov edx, 0x53
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov rbp, rax
mov rax, qword [r13 + 0x30]
mov qword [rsp + 0x78], 0
mov rcx, qword [rax + 8]
mov rax, qword [0x1401856d0]
mov rax, qword [rax]
call qword [rax + 0x58]
test eax, eax
jne 0x1400846d8
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x1400846d8
cmp qword [rdi + 8], 0
je 0x140084778
mov rax, qword [r13 + 0x30]
xor r12d, r12d
lea r14, [rsp + 0x80]
cmp byte [rax + 0x6c], 0
jne 0x140084720
pxor xmm0, xmm0
lea rax, [rsp + 0x70]
xor r8d, r8d
mov dword [rsp + 0x80], 0x20
movups xmmword [rsp + 0x84], xmm0
mov rcx, qword [rsp + 0x78]
movups xmmword [rsp + 0x90], xmm0
mov r9, qword [rdx + 0x20]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0
movzx eax, byte [rbp + 0xb0]
mov qword [rsp + 0x20], r14
shr al, 3
xor eax, 1
and eax, 1
shl eax, 0x1d
mov dword [rsp + 0x28], eax
call qword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x140084800
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 0x10]
mov rax, qword [rax]
mov r14d, dword [rax + 4]
mov eax, r14d
and r14d, 0xfeffffbd
and eax, 0xfffffffd
test byte [rsi + 0x5c8], 0x20
cmove r14d, eax
test r14d, r14d
jne 0x1400847b0
test byte [rdi + 0x6c], 2
jne 0x140084798
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14008468a
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test r12, r12
je 0x14008469a
xor edx, edx
mov rcx, r12
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400846aa
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400846ba
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, r14d
add rsp, 0x1d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f9d0
mov rcx, rsi
lea rdx, str.schannel:_Failed_to_read_remote_certificate_context:__s
mov r8, rax
call fcn.140072600
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14008470f
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
mov r14d, 0x3c
jmp 0x14008469a
mov dword [rsp + 0x20], 0
xor r8d, r8d
mov r9d, 2
mov edx, 1
mov ecx, 6
call fcn.140064f70
test al, al
je 0x140084848
mov rcx, rsi
lea rdx, str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
call fcn.140072600
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x140084767
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
mov r14d, 0x4d
jmp 0x14008469a
mov r12, qword [rdi + 0x48]
lea r14, [rsp + 0x80]
test r12, r12
jne 0x1400845be
jmp 0x1400845d7
mov rdx, rsi
mov rcx, rbx
call fcn.1400842e0
mov r14d, eax
jmp 0x14008467a
test r14b, 4
jne 0x140084918
test r14d, 0x10000
jne 0x140084930
test r14b, 0x20
jne 0x140084900
test r14b, 1
jne 0x1400849e0
test r14b, 0x40
je 0x1400849c0
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
lea rdx, str.schannel:_CertGetCertificateChain_failed:__s
mov rcx, rsi
mov r8, rax
call fcn.140072600
mov qword [rsp + 0x70], 0
mov r14d, 0x3c
jmp 0x14008467a
mov rdx, rsi
mov rcx, rbx
call fcn.140083a50
test rax, rax
je 0x140084948
pxor xmm0, xmm0
lea rdx, [rsp + 0x78]
lea r14, [rsp + 0x80]
mov dword [rsp + 0x80], 0x50
movups xmmword [rsp + 0xb4], xmm0
mov rcx, r14
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0x84], xmm0
mov qword [rsp + 0xc0], rax
movups xmmword [rsp + 0x94], xmm0
movups xmmword [rsp + 0xa4], xmm0
call qword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
mov rdx, qword [rsp + 0x68]
test eax, eax
jne 0x1400845d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov r14d, 0x4d
mov ecx, eax
call fcn.14007f900
lea rdx, str.schannel:_failed_to_create_certificate_chain_engine:__s
mov rcx, rsi
mov r8, rax
call fcn.140072600
jmp 0x14008467a
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
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 r12, rax
test rax, rax
je 0x140084b3f
mov r13, qword [rdi + 0x48]
test r13, r13
je 0x140084a15
mov r8, qword [r13 + 8]
mov rdx, qword [r13]
mov qword [rsp + 0x20], rsi
mov rcx, rax
lea r9, str._memory_blob_
call fcn.140083f90
mov r14d, eax
test r14d, r14d
je 0x1400849f4
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14008468f
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
jmp 0x14008468f
mov r8d, r14d
lea rdx, str.schannel:_CertGetCertificateChain_error_mask:_0x_08lx
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
mov rcx, rsi
call fcn.140072600
jmp 0x140084836
mov r8, r12
mov rdx, rsi
mov rcx, rbx
call fcn.140083ba0
test al, al
mov rax, r12
je 0x14008485c
xor r12d, r12d
jmp 0x14008485c
mov rax, qword [rdi + 8]
mov rcx, rax
mov qword [rsp + 0x50], rax
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
mov qword [rsp + 0x40], rax
test rax, rax
je 0x140084cdb
mov dword [rsp + 0x28], pe_nt_image_headers64
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov r8d, 1
mov qword [rsp + 0x30], 0
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x140084c2d
mov rcx, qword [rsp + 0x48]
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140084c99
mov r14, qword [rsp + 0x80]
cmp r14, 0x100000
jg 0x140084c7f
mov rax, qword [0x140184850]
lea rcx, [r14 + 1]
mov r15, r14
call qword [rax]
mov r13, rax
test rax, rax
je 0x140084cd0
test r14, r14
je 0x140084c0a
xor r10d, r10d
lea rax, [rsp + 0x64]
mov qword [rsp + 0x58], rdi
xor r14d, r14d
mov qword [rsp + 0x220], rbx
mov edi, r10d
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x228], rsi
mov rsi, r15
mov r15, rax
jmp 0x140084b06
add edi, eax
mov r14d, edi
cmp r14, rsi
jae 0x140084bf2
mov r8d, esi
lea rdx, [r13 + r14]
mov r9, r15
mov rcx, rbx
sub r8d, edi
mov dword [rsp + 0x64], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140084b7f
mov eax, dword [rsp + 0x64]
test eax, eax
jne 0x140084af8
mov rsi, r14
jmp 0x140084afa
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
mov rcx, rsi
lea rdx, str.schannel:_failed_to_create_certificate_store:__s
mov r8, rax
call fcn.140072600
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140084761
jmp 0x140084767
mov rsi, qword [rsp + 0x228]
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x220]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
mov r8, qword [rsp + 0x50]
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov rcx, rsi
mov r9, rax
call fcn.140072600
mov r14d, 0x4d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140184840]
mov rcx, r13
call qword [rax]
mov rcx, qword [rsp + 0x40]
call fcn.1400b5948
jmp 0x14008499f
mov r15, rsi
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x220]
mov rsi, qword [rsp + 0x228]
mov byte [r13 + r15], 0
mov r8, r15
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], rsi
mov r9, qword [rsp + 0x50]
call fcn.140083f90
mov r14d, eax
jmp 0x140084bcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
mov r8, qword [rsp + 0x50]
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov rcx, rsi
mov r9, rax
call fcn.140072600
mov rax, qword [0x140184840]
xor ecx, ecx
call qword [rax]
mov rcx, qword [rsp + 0x40]
call fcn.1400b5948
mov r14d, 0x4d
jmp 0x1400849a4
mov r8d, 0x100000
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, rsi
call fcn.140072600
jmp 0x140084bc6
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
mov r8, qword [rsp + 0x50]
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov rcx, rsi
mov r9, rax
call fcn.140072600
jmp 0x140084bc6
mov r14d, 0x1b
jmp 0x140084bcc
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.14007f900
mov r8, qword [rsp + 0x50]
mov rcx, rsi
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov r9, rax
call fcn.140072600
mov rax, qword [0x140184840]
xor ecx, ecx
call qword [rax]
jmp 0x140084c74