Function at 0x14012c020
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, 0x1e8
mov rsi, rdx
mov rbx, rcx
mov rax, qword [0x14051d038]
xor rax, rsp
mov qword [rsp + 0x1e0], rax
mov r12, qword [rcx + 0x10]
call fcn.14012d3d0
mov r14, rax
mov rcx, rbx
mov rdx, rsi
call fcn.14012d3f0
mov r15, rax
xor eax, eax
lea r8, [rsp + 0xd0]
mov qword [r8], rax
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0xc0], rax
mov rax, qword [0x14053be38]
mov rax, qword [rax + 0x58]
mov rcx, qword [r12 + 0x20]
mov rcx, qword [rcx + 8]
mov edx, 0x53
call qword [case.0x14012d181.0]
mov edi, eax
test eax, eax
jne 0x14012c124
mov rdx, qword [rsp + 0xd0]
test rdx, rdx
je 0x14012c124
cmp qword [r14 + 8], 0
je 0x14012c1d6
mov rax, qword [r12 + 0x20]
cmp byte [rax + 0x6c], 0
je 0x14012c1e1
mov dword [rsp + 0x20], 0
mov ecx, 6
mov edx, 1
xor r8d, r8d
mov r9d, 2
call fcn.140127f00
test al, al
je 0x14012c31c
lea rdx, str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
mov rcx, rsi
call fcn.1400f8040
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
jmp 0x14012c164
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
mov rcx, rsi
call fcn.1400f8040
mov r13d, 0x3c
jmp 0x14012c166
lea rbx, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, rbx
mov dl, 0xaa
call fcn.1402e0d10
mov r8d, 0x100
mov ecx, edi
mov rdx, rbx
call fcn.14011b310
lea rdx, str.schannel:_Failed_to_read_remote_certificate_context:__s
mov rcx, rsi
mov r8, rax
call fcn.1400f8040
mov r13d, 0x3c
xor edi, edi
mov rcx, qword [rsp + 0xc0]
test rcx, rcx
je 0x14012c179
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test rdi, rdi
je 0x14012c189
mov rcx, rdi
xor edx, edx
call qword [sym.imp.CRYPT32.dll_CertCloseStore]
mov rcx, qword [rsp + 0xc8]
test rcx, rcx
je 0x14012c19c
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov rcx, qword [rsp + 0xd0]
test rcx, rcx
je 0x14012c1af
call qword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov rcx, qword [rsp + 0x1e0]
xor rcx, rsp
call fcn.1402ddd70
mov eax, r13d
add rsp, 0x1e8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [r14 + 0x48], 0
jne 0x14012c0bf
xor ecx, ecx
xor edi, edi
xorps xmm0, xmm0
lea rax, [rsp + 0x60]
movaps xmmword [rax], xmm0
movaps xmmword [rax + 0x50], xmm0
movaps xmmword [rax + 0x40], xmm0
movaps xmmword [rax + 0x30], xmm0
movaps xmmword [rax + 0x20], xmm0
movaps xmmword [rax + 0x10], xmm0
mov dword [rax], 0x60
xor r8d, r8d
cmp byte [r15 + 0xb3], 0
sete r8b
shl r8d, 0x1d
mov r9, qword [rdx + 0x20]
lea r10, [rsp + 0xc8]
mov qword [rsp + 0x38], r10
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], r8d
mov qword [rsp + 0x30], 0
xor r8d, r8d
call qword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x14012c2cb
mov rax, qword [rsp + 0xc8]
mov rax, qword [rax + 0x10]
mov rax, qword [rax]
mov eax, dword [rax + 4]
cmp byte [rsi + 0x5d5], 0
mov ecx, 0xfffffffd
mov r8d, 0xfeffffbd
cmove r8d, ecx
and r8d, eax
je 0x14012c2a9
test al, 4
jne 0x14012c10d
bt eax, 0x10
jae 0x14012c295
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
jmp 0x14012c114
test al, 0x20
je 0x14012c410
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
jmp 0x14012c114
cmp byte [r14 + 0x6a], 0
je 0x14012c2c3
mov rcx, rbx
mov rdx, rsi
call fcn.14012bb50
mov r13d, eax
jmp 0x14012c166
xor r13d, r13d
jmp 0x14012c166
lea rbx, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, rbx
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, rbx
call fcn.14011b1d0
lea rdx, str.schannel:_CertGetCertificateChain_failed:__s
mov rcx, rsi
mov r8, rax
call fcn.1400f8040
mov qword [rsp + 0xc8], 0
jmp 0x14012c11c
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 0x14012c3cb
mov rdi, rax
mov rax, qword [r14 + 0x48]
test rax, rax
je 0x14012c446
mov rdx, qword [rax]
mov r8, qword [rax + 8]
mov qword [rsp + 0x20], rsi
lea r9, str._memory_blob_
mov rcx, rdi
call fcn.14012c770
mov r13d, eax
test r13d, r13d
jne 0x14012c166
xorps xmm0, xmm0
lea rcx, [rsp + 0x60]
movaps xmmword [rcx], xmm0
movaps xmmword [rcx + 0x40], xmm0
movaps xmmword [rcx + 0x30], xmm0
movaps xmmword [rcx + 0x20], xmm0
movaps xmmword [rcx + 0x10], xmm0
mov dword [rcx], 0x50
mov qword [rcx + 0x40], rdi
lea rdx, [rsp + 0xc0]
call qword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
je 0x14012c611
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc0]
jmp 0x14012c1e5
lea rdi, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, rdi
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, rdi
call fcn.14011b1d0
lea rdx, str.schannel:_failed_to_create_certificate_store:__s
mov rcx, rsi
mov r8, rax
call fcn.1400f8040
jmp 0x14012c105
test al, 1
je 0x14012c420
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
jmp 0x14012c114
test r8b, 0x40
je 0x14012c432
lea rdx, str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
jmp 0x14012c114
lea rdx, str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
mov rcx, rsi
call fcn.1400f8040
jmp 0x14012c11c
mov r13, qword [r14 + 8]
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x60], rax
mov rcx, r13
call fcn.1400f7610
test rax, rax
je 0x14012c564
mov rbp, 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_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x14012c5c1
mov r12, rax
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14012c4ea
mov qword [rsp + 0x58], r13
mov r13, qword [rsp + 0x60]
cmp r13, 0x100001
jl 0x14012c699
lea rdx, str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov rcx, rsi
mov r8d, 0x100000
call fcn.1400f8040
jmp 0x14012c52f
lea rcx, [rsp + 0xe0]
mov r8d, 0x100
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
lea rdx, [rsp + 0xe0]
call fcn.14011b1d0
lea rdx, str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov rcx, rsi
mov r8, r13
mov r9, rax
call fcn.1400f8040
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
xor eax, eax
mov qword [rsp + 0x40], rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
mov rax, qword [fcn.140225eb0]
call qword [case.0x14012d181.0]
mov rcx, rbp
call fcn.140225eb0
jmp 0x14012c372
lea r12, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, r12
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, r12
call fcn.14011b1d0
lea rdx, str.schannel:_invalid_path_name_for_CA_file__s:__s
mov rcx, rsi
mov r8, r13
mov r9, rax
call fcn.1400f8040
mov rax, qword [fcn.140225eb0]
xor ecx, ecx
call qword [case.0x14012d181.0]
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
jmp 0x14012c372
lea r12, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, r12
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, r12
call fcn.14011b1d0
lea rdx, str.schannel:_failed_to_open_CA_file__s:__s
mov rcx, rsi
mov r8, r13
mov r9, rax
call fcn.1400f8040
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
xor ecx, ecx
jmp 0x14012c54a
lea rbx, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, rbx
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, rbx
call fcn.14011b1d0
lea rdx, str.schannel:_failed_to_create_certificate_chain_engine:__s
mov rcx, rsi
mov r8, rax
call fcn.1400f8040
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
jmp 0x14012c166
xor r13d, r13d
mov byte [rax + r13], 0
mov qword [rsp + 0x20], rsi
mov rcx, rdi
mov rdx, rax
mov r8, r13
mov r9, qword [rsp + 0x58]
call fcn.14012c770
mov r13d, eax
mov rbp, qword [rsp + 0x50]
mov r12, qword [rsp + 0x48]
jmp 0x14012c53c
mov r13d, 0x1b
jmp 0x14012c535
mov rax, qword [fcn.140225e50]
lea rcx, [r13 + 1]
call qword [case.0x14012d181.0]
test rax, rax
je 0x14012c68e
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], rbp
xor ebp, ebp
test r13, r13
mov qword [rsp + 0x40], rax
je 0x14012c65c
xor r12d, r12d
mov r8d, r13d
sub r8d, ebp
mov dword [rsp + 0xdc], 0
lea rdx, [rax + r12]
mov qword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x48]
lea r9, [rsp + 0xdc]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14012c71e
mov eax, dword [rsp + 0xdc]
add ebp, eax
test eax, eax
cmove r13, r12
mov r12, rbp
cmp r13, rbp
mov rax, qword [rsp + 0x40]
ja 0x14012c6c8
jmp 0x14012c65f
lea r13, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, r13
mov dl, 0xaa
call fcn.1402e0d10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x100
mov ecx, eax
mov rdx, r13
call fcn.14011b1d0
lea rdx, str.schannel:_failed_to_read_from_CA_file__s:__s
mov rcx, rsi
mov r8, qword [rsp + 0x58]
mov r9, rax
call fcn.1400f8040
mov r13d, reloc.OLEAUT32.dll_VarR8FromUI1
jmp 0x14012c67f