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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x168
mov esi, dword [ebp + 8]
mov eax, dword [0x7a9040]
xor eax, ebp
mov dword [esp + 0x160], eax
mov edi, dword [esi + 8]
push esi
call fcn.0051abc0
add esp, 4
mov dword [esp + 0xc], eax
push dword [ebp + 0xc]
push esi
call fcn.0051abf0
add esp, 8
mov dword [esp + 0x14], eax
xor eax, eax
lea esi, [esp + 0x58]
mov dword [esi], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], eax
mov eax, dword [0x7b1670]
mov ecx, dword [eax + 0x2c]
mov eax, dword [edi + 0x14]
mov ebx, dword [eax + 4]
call dword [0x7a29f4]
push esi
push 0x53
push ebx
call ecx
mov ebx, eax
test eax, eax
sete cl
mov eax, dword [esi]
test eax, eax
setne dl
test cl, dl
je 0x519ba9
mov ecx, dword [esp + 0xc]
cmp dword [ecx + 4], 0
mov esi, ecx
je 0x519aac
mov edx, dword [edi + 0x14]
xor ecx, ecx
cmp byte [edx + 0x48], 1
mov edi, 0
jne 0x519ab6
sub esp, 0x14
movaps xmm0, xmmword [0x749c70]
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0
call fcn.00515e30
add esp, 0x14
test al, al
je 0x519c87
push str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 8
mov ebx, 0x4d
jmp 0x519be2
cmp dword [esi + 0x24], 0
jne 0x519a5c
xor ecx, ecx
xor edi, edi
mov dword [esp + 4], edi
xorps xmm0, xmm0
lea edx, [esp + 0x18]
movups xmmword [edx + 0x24], xmm0
movups xmmword [edx + 0x14], xmm0
movups xmmword [edx + 4], xmm0
mov dword [edx], 0x34
mov esi, dword [esp + 0x14]
movzx esi, byte [esi + 0x63]
xor esi, 1
shl esi, 0x1d
lea edi, [esp + 0x54]
xor ebx, ebx
push edi
push ebx
push esi
push edx
push dword [eax + 0x10]
push ebx
push eax
push ecx
call dword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x519b4c
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov esi, dword [ebp + 0xc]
cmp byte [esi + 0x421], 0
mov edx, 0xfeffffbd
mov eax, 0xfffffffd
cmovne eax, edx
and eax, ecx
je 0x519c36
test cl, 4
mov edi, dword [esp + 4]
jne 0x519b94
bt ecx, 0x10
jb 0x519b45
test cl, 0x20
je 0x519c56
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
jmp 0x519b99
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
jmp 0x519b99
mov esi, 0x100
lea edi, [esp + 0x60]
push esi
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
push eax
call fcn.00509710
add esp, 0xc
push eax
push str.schannel:_CertGetCertificateChain_failed:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0xc
mov dword [esp + 0x54], 0
mov edi, dword [esp + 4]
jmp 0x519ba2
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
push esi
call fcn.004e7570
add esp, 8
mov ebx, 0x3c
jmp 0x519be4
mov esi, 0x100
lea edi, [esp + 0x60]
push esi
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
push esi
push edi
push ebx
call fcn.00509830
add esp, 0xc
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0xc
mov ebx, 0x3c
xor edi, edi
mov eax, dword [esp + 0x50]
test eax, eax
je 0x519bf3
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test edi, edi
je 0x519c00
push 0
push edi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, dword [esp + 0x54]
test eax, eax
je 0x519c0f
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov eax, dword [esp + 0x58]
test eax, eax
je 0x519c1e
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov ecx, dword [esp + 0x160]
xor ecx, ebp
call fcn.00650d60
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
mov eax, dword [esp + 0xc]
cmp byte [eax + 0x3a], 1
mov edi, dword [esp + 4]
jne 0x519be4
push esi
push dword [ebp + 8]
call fcn.00519580
add esp, 8
mov ebx, eax
jmp 0x519be4
test cl, 1
je 0x519c65
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
jmp 0x519b99
test al, 0x40
je 0x519c73
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
jmp 0x519b99
push eax
push str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
push esi
call fcn.004e7570
add esp, 0xc
jmp 0x519ba2
sub esp, 0x14
movaps xmm0, xmmword [0x74b170]
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
test eax, eax
je 0x519d0e
mov edi, eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x519d95
mov edx, dword [eax]
mov ecx, edi
push dword [ebp + 0xc]
push str._memory_blob_
push dword [eax + 4]
call fcn.0051a040
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x519be4
xorps xmm0, xmm0
lea eax, [esp + 0x18]
movups xmmword [eax + 0x20], xmm0
movups xmmword [eax + 0x14], xmm0
movups xmmword [eax + 4], xmm0
mov dword [eax], 0x30
mov dword [eax + 0x28], edi
lea ecx, [esp + 0x50]
push ecx
push eax
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
je 0x519d4d
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x50]
jmp 0x519ab6
mov esi, 0x100
lea edi, [esp + 0x60]
push esi
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
push eax
call fcn.00509710
add esp, 0xc
push eax
push str.schannel:_failed_to_create_certificate_store:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0xc
jmp 0x519aa2
mov esi, 0x100
mov ebx, edi
lea edi, [esp + 0x60]
push esi
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
mov edi, ebx
push eax
call fcn.00509710
add esp, 0xc
push eax
push str.schannel:_failed_to_create_certificate_chain_engine:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0xc
mov ebx, 0x4d
jmp 0x519be4
mov esi, dword [esi + 4]
xor eax, eax
dec eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
push esi
call fcn.004e6c90
add esp, 4
test eax, eax
je 0x519ea5
sub esp, 0x1c
movaps xmm0, xmmword [0x74b180]
movups xmmword [esp + 4], xmm0
mov dword [esp + 0x2c], eax
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x519f73
mov dword [esp + 8], esi
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x519e2f
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp ebx, 0x100001
sbb eax, 0
jl 0x519f10
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0xc
jmp 0x519e71
mov esi, 0x100
mov ebx, edi
lea edi, [esp + 0x60]
push esi
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
mov edi, ebx
push eax
call fcn.00509710
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0x10
mov ebx, 0x4d
xor esi, esi
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [fcn.005464a0]
call dword [0x7a29f4]
push esi
call ecx
add esp, 4
push dword [esp + 0x10]
call fcn.005464a0
add esp, 4
jmp 0x519ccd
mov eax, 0x100
mov ebx, edi
lea edi, [esp + 0x60]
push eax
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x100
push ecx
push edi
mov edi, ebx
push eax
call fcn.00509710
add esp, 0xc
push eax
push esi
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0x10
mov ecx, dword [fcn.005464a0]
call dword [0x7a29f4]
push 0
call ecx
add esp, 4
mov ebx, 0x4d
jmp 0x519ccd
mov ebx, 0x1b
jmp 0x519e76
mov ecx, dword [fcn.00546590]
lea esi, [ebx + 1]
call dword [0x7a29f4]
push esi
call ecx
add esp, 4
test eax, eax
je 0x519f06
mov esi, eax
mov dword [esp + 4], edi
test ebx, ebx
je 0x519fc3
xor edi, edi
mov eax, ebx
sub eax, edi
xor edx, edx
mov dword [esp + 0x5c], edx
lea ecx, [esi + edi]
push edx
lea edx, [esp + 0x60]
push edx
push eax
push ecx
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x519fe8
mov eax, dword [esp + 0x5c]
test eax, eax
cmove ebx, edi
add eax, edi
mov edi, eax
cmp eax, ebx
jb 0x519f39
jmp 0x519fc5
mov eax, 0x100
mov ebx, edi
lea edi, [esp + 0x60]
push eax
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x100
push ecx
push edi
mov edi, ebx
push eax
call fcn.00509710
add esp, 0xc
push eax
push esi
push str.schannel:_failed_to_open_CA_file__s:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0x10
mov ebx, 0x4d
xor esi, esi
jmp 0x519e82
xor ebx, ebx
mov byte [esi + ebx], 0
mov edi, dword [esp + 4]
mov ecx, edi
mov edx, esi
push dword [ebp + 0xc]
push dword [esp + 0xc]
push ebx
call fcn.0051a040
add esp, 0xc
mov ebx, eax
jmp 0x519e78
mov ebx, 0x100
lea edi, [esp + 0x60]
push ebx
push 0xff
push edi
call fcn.006547d0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push edi
push eax
call fcn.00509710
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push dword [ebp + 0xc]
call fcn.004e7570
add esp, 0x10
mov ebx, 0x4d
mov edi, dword [esp + 4]
jmp 0x519e78