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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x1d8
mov rdi, rdx
mov rsi, rcx
mov r12, qword [rcx + 0x10]
call fcn.140195e70
mov rbx, rax
mov rcx, rsi
mov rdx, rdi
call fcn.140195e90
mov r14, rax
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x68], 0
mov rax, qword [0x140277f40]
mov rax, qword [rax]
mov rcx, qword [r12 + 0x28]
mov rcx, qword [rcx + 8]
lea r8, [rsp + 0x48]
mov edx, 0x53
call qword [rax + 0x58]
test eax, eax
jne 0x140241fe1
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x140241fe1
cmp qword [rbx + 8], 0
jne 0x140241f9a
cmp qword [rbx + 0x48], 0
je 0x140242014
mov rax, qword [r12 + 0x28]
cmp byte [rax + 0x6c], 0
je 0x140242014
mov dword [rsp + 0x20], 0
mov ecx, 6
mov edx, 1
xor r8d, r8d
mov r9d, 2
call fcn.1401ed150
test al, al
je 0x1402420f2
lea rdx, str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
mov rcx, rdi
call fcn.140195520
jmp 0x140242235
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f90c0
lea rdx, [0x140285c60]
mov rcx, rdi
mov r8, rax
call fcn.140195520
mov ebp, 0x3c
xor esi, esi
jmp 0x140242651
xor ecx, ecx
xor esi, esi
xorps xmm0, xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x90], xmm0
mov dword [rsp + 0x80], 0x20
mov r9, qword [rdx + 0x20]
mov eax, dword [r14 + 0xb0]
not eax
and eax, 8
shl eax, 0x1a
lea r8, [rsp + 0x58]
mov qword [rsp + 0x38], r8
lea r8, [rsp + 0x80]
mov qword [rsp + 0x20], r8
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], 0
xor r8d, r8d
call qword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x14024214c
mov rax, qword [rsp + 0x58]
mov rax, qword [rax + 0x10]
mov rax, qword [rax]
mov eax, dword [rax + 4]
test byte [rdi + 0x5d8], 0x20
mov ecx, 0xfffffffd
mov r8d, 0xfeffffbd
cmove r8d, ecx
and r8d, eax
je 0x14024218c
test al, 4
jne 0x140242241
test eax, 0x10000
jne 0x1402423bd
test al, 0x20
jne 0x1402423c9
test al, 1
jne 0x14024247b
test r8b, 0x40
jne 0x140242620
lea rdx, str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
mov rcx, rdi
call fcn.140195520
mov ebp, 0x3c
jmp 0x140242651
mov qword [rsp + 0x20], 0
mov ecx, 2
xor edx, edx
xor r8d, r8d
mov r9d, 0x2000
call qword [sym.imp.CRYPT32.dll_CertOpenStore]
test rax, rax
je 0x140242208
mov rsi, rax
mov rax, qword [rbx + 0x48]
test rax, rax
je 0x14024231e
mov rdx, qword [rax]
mov r8, qword [rax + 8]
mov qword [rsp + 0x20], rdi
lea r9, str._memory_blob_
mov rcx, rsi
call fcn.140242730
mov ebp, eax
jmp 0x1402424f7
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_CertGetCertificateChain_failed:__s
mov rcx, rdi
mov r8, rax
call fcn.140195520
mov qword [rsp + 0x58], 0
mov ebp, 0x3c
jmp 0x140242651
xor ebp, ebp
test byte [rbx + 0x6c], 2
je 0x140242651
mov r13, qword [rsp + 0x48]
mov r14, qword [r12 + 8]
mov rcx, r14
call sub.msvcrt.dll_strlen
mov qword [rsp + 0x40], rax
mov rcx, rdi
mov rdx, r13
xor r8d, r8d
xor r9d, r9d
call fcn.140242a90
test eax, eax
je 0x14024241a
mov ebp, eax
mov rax, qword [0x1402654c8]
mov r12d, ebp
mov rcx, r12
call qword [rax]
test rax, rax
je 0x14024246f
mov rbx, rax
mov rcx, rdi
mov rdx, r13
mov r8, rax
mov r9d, ebp
call fcn.140242a90
cmp eax, ebp
jne 0x140242487
mov ebp, 0x3c
xor r15d, r15d
jmp 0x14024225b
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_failed_to_create_certificate_store:__s
mov rcx, rdi
mov r8, rax
call fcn.140195520
mov ebp, 0x4d
xor esi, esi
jmp 0x140242651
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
jmp 0x140242627
mov ebp, 0x1b
cmp r15, r12
jae 0x1402422f1
cmp ebp, 0x3c
jne 0x1402422f1
cmp byte [rbx + r15], 0
je 0x1402422f1
lea rbp, [rbx + r15]
mov rcx, rbp
call sub.msvcrt.dll__strdup
test rax, rax
je 0x14024224d
mov r13, rax
mov rcx, rax
call sub.msvcrt.dll_strlen
mov rcx, r13
mov rdx, rax
mov r8, r14
mov r9, qword [rsp + 0x40]
call fcn.140250b50
mov rcx, rdi
test al, al
je 0x1402422bb
lea rdx, str.schannel:_connection_hostname___s__validated_against_certificate_name___s_
mov r8, r14
mov r9, r13
call fcn.1401955d0
xor ebp, ebp
jmp 0x1402422e0
lea rdx, str.schannel:_connection_hostname___s__did_not_match_against_certificate_name___s_
mov r8, r14
mov r9, r13
call fcn.1401955d0
mov rcx, rbp
call sub.msvcrt.dll_strlen
add r15, rax
inc r15
mov ebp, 0x3c
mov rcx, r13
call fcn.140257dd0
cmp r15, r12
jb 0x14024225b
test ebp, ebp
je 0x140242645
cmp ebp, 0x3c
jne 0x140242636
lea rdx, str.schannel:_CertGetNameString___failed_to_match_connection_hostname___s__against_server_certificate_names
mov rcx, rdi
mov r8, r14
call fcn.140195520
mov ebp, 0x3c
jmp 0x140242645
mov r13, qword [rbx + 8]
mov rcx, r13
call sub.msvcrt.dll__strdup
test rax, rax
je 0x1402423d5
mov r15, rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov rcx, rax
mov edx, 0x80000000
mov r8d, 1
xor r9d, r9d
call qword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x140242435
lea rdx, [rsp + 0x80]
mov qword [rsp + 0x40], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
je 0x1402424a0
mov rbp, qword [rsp + 0x80]
cmp rbp, 0x100001
jl 0x14024259a
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, rdi
mov r8d, 0x100000
call fcn.140195520
jmp 0x1402424d0
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
jmp 0x140242627
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
jmp 0x140242627
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov rcx, rdi
mov r8, r13
mov r9, rax
call fcn.140195520
mov rax, qword [0x1402654c0]
xor ecx, ecx
call qword [rax]
mov ebp, 0x4d
jmp 0x1402424f7
lea rdx, str.schannel:_CertGetNameString___returned_no_certificate_name_information
mov rcx, rdi
call fcn.140195520
mov ebp, 0x3c
xor ebx, ebx
jmp 0x140242645
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov rcx, rdi
mov r8, r13
mov r9, rax
call fcn.140195520
mov ebp, 0x4d
xor r13d, r13d
jmp 0x1402424e3
mov ebp, 0x1b
xor ebx, ebx
jmp 0x140242645
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
jmp 0x140242627
lea rdx, str.schannel:_CertGetNameString___returned_certificate_name_information_of_unexpected_size
mov rcx, rdi
call fcn.140195520
mov ebp, 0x3c
jmp 0x140242645
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov rcx, rdi
mov r8, r13
mov r9, rax
call fcn.140195520
mov ebp, 0x4d
xor r13d, r13d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rax, qword [0x1402654c0]
mov rcx, r13
call qword [rax]
mov rcx, r15
call fcn.140257dd0
test ebp, ebp
jne 0x140242651
xorps xmm0, xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
mov dword [rsp + 0x80], 0x50
mov qword [rsp + 0xc0], rsi
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x68]
call qword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
je 0x140242563
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x48]
jmp 0x140242018
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_failed_to_create_certificate_chain_engine:__s
mov rcx, rdi
mov r8, rax
call fcn.140195520
mov ebp, 0x4d
jmp 0x140242651
mov rax, qword [0x1402654c8]
lea rcx, [rbp + 1]
call qword [rax]
mov qword [rsp + 0x60], rax
test rax, rax
je 0x1402426a7
mov qword [rsp + 0x70], r13
xor r13d, r13d
test rbp, rbp
mov qword [rsp + 0x78], r15
je 0x1402426b1
xor r15d, r15d
mov r8d, ebp
sub r8d, r13d
mov dword [rsp + 0x54], 0
mov rax, qword [rsp + 0x60]
lea rdx, [rax + r15]
mov qword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x54]
call qword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x1402426e2
mov eax, dword [rsp + 0x54]
add r13d, eax
test eax, eax
cmove rbp, r15
mov r15, r13
cmp rbp, r13
ja 0x1402425ce
jmp 0x1402426b3
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
mov rcx, rdi
call fcn.140195520
mov ebp, 0x3c
jmp 0x140242651
lea rdx, str.schannel:_server_certificate_name_verification_failed
mov rcx, rdi
call fcn.140195520
mov rax, qword [0x1402654c0]
mov rcx, rbx
call qword [rax]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140242661
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test rsi, rsi
je 0x140242671
mov rcx, rsi
xor edx, edx
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140242681
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140242691
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, ebp
add rsp, 0x1d8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ebp, 0x1b
jmp 0x1402424d5
xor ebp, ebp
mov r13, qword [rsp + 0x60]
mov byte [r13 + rbp], 0
mov qword [rsp + 0x20], rdi
mov rcx, rsi
mov rdx, r13
mov r8, rbp
mov r9, qword [rsp + 0x70]
call fcn.140242730
mov ebp, eax
mov r15, qword [rsp + 0x78]
jmp 0x1402424d8
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, [rsp + 0xd0]
mov r8d, 0x100
mov ecx, eax
call fcn.1401f8fb0
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov rcx, rdi
mov r8, qword [rsp + 0x70]
mov r9, rax
call fcn.140195520
mov ebp, 0x4d
mov r15, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x40]
mov r13, qword [rsp + 0x60]
jmp 0x1402424dd