Function at 0x6b49bf90
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, 0x160
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
cmp dword [ecx + 0xb8], 2
jne 0x6b49bfdf
xor eax, eax
cmp dword [ecx + 0x134], 0xffffffff
setne al
shl eax, 4
cmp dword [ecx + eax + 0x198], 2
jne 0x6b49bfe4
lea eax, [ecx + 0x64]
jmp 0x6b49bfea
lea eax, [ecx + 0xac]
mov edi, dword [ebp + 8]
mov ebx, dword [eax]
mov eax, dword [0x6b83af0c]
mov eax, dword [eax]
shl esi, 4
mov ecx, dword [ecx + esi + 0x180]
lea edx, [esp + 0x14]
push edx
push 0x53
push dword [ecx + 4]
call dword [eax + 0x2c]
test eax, eax
jne 0x6b49c057
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x6b49c057
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xb8]
cmp eax, 2
jne 0x6b49c085
xor edx, edx
mov edi, dword [ebp + 0xc]
cmp dword [edi + 0x134], 0xffffffff
setne dl
shl edx, 4
mov edi, dword [ebp + 0xc]
cmp dword [edi + edx + 0x198], 2
mov edx, dword [ebp + 0xc]
jne 0x6b49c099
cmp dword [edx + 0x1c8], 0
mov edi, dword [ebp + 8]
jne 0x6b49c0b2
jmp 0x6b49c08e
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481b20
add esp, 0xc
push eax
push str.schannel:_Failed_to_read_remote_certificate_context:__s
push edi
call fcn.6b476950
add esp, 0xc
mov ebx, 0x3c
xor esi, esi
jmp 0x6b49c7b4
cmp dword [edx + 0x1c8], 0
jne 0x6b49c0b2
cmp dword [edx + 0x1ec], 0
jne 0x6b49c0b2
jmp 0x6b49c0ef
cmp dword [edx + 0x208], 0
mov edi, dword [ebp + 8]
jne 0x6b49c0b2
cmp dword [edx + 0x22c], 0
je 0x6b49c319
lea edx, [edx + esi + 0x180]
mov edx, dword [edx]
cmp dword [edx + 0x50], 0
je 0x6b49c0ef
push 0
push 2
push 1
push 6
call fcn.6b48f120
add esp, 0x10
test eax, eax
je 0x6b49c153
push str.schannel:_this_version_of_Windows_is_too_old_to_support_certificate_verification_via_CA_bundle_file.
push edi
call fcn.6b476950
add esp, 8
mov ebx, 0x4d
xor esi, esi
jmp 0x6b49c7b4
mov dword [esp + 0x10], ebx
xor esi, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0x10
mov edx, dword [esp + 0x20]
mov ebx, dword [ecx + 0x10]
cmp eax, 2
mov dword [esp + 4], esi
jne 0x6b49c14b
xor eax, eax
mov dword [esp], edx
mov esi, edi
mov edi, dword [ebp + 0xc]
cmp dword [edi + 0x134], 0xffffffff
setne al
shl eax, 4
cmp dword [edi + eax + 0x198], 2
mov edi, esi
mov edx, dword [esp]
jne 0x6b49c1b6
lea eax, [edi + 0x440]
jmp 0x6b49c1bc
push 0
push 0x2000
push 0
push 0
push 2
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
test eax, eax
je 0x6b49c2e2
mov esi, eax
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0xb8], 2
mov dword [esp + 0x10], ebx
jne 0x6b49c19d
xor eax, eax
cmp dword [ecx + 0x134], 0xffffffff
setne al
shl eax, 4
cmp dword [ecx + eax + 0x198], 2
jne 0x6b49c329
mov eax, dword [ecx + 0x1ec]
test eax, eax
jne 0x6b49c337
lea eax, [ecx + 0x1c8]
jmp 0x6b49c4b2
lea eax, [edi + 0x4b4]
mov eax, dword [eax]
shl eax, 0x1a
not eax
and eax, 0x20000000
lea esi, [esp + 0x18]
lea edi, [esp + 0x28]
push esi
push 0
push eax
push edi
push ebx
push 0
push ecx
push edx
call dword [sym.imp.CRYPT32.dll_CertGetCertificateChain]
test eax, eax
je 0x6b49c25b
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x10]
mov eax, dword [eax]
mov ecx, dword [eax + 4]
mov edi, dword [ebp + 8]
test byte [edi + 0x440], 0x20
mov edx, 0xfffffffd
mov eax, 0xfeffffbd
cmove eax, edx
and eax, ecx
mov esi, dword [esp + 4]
je 0x6b49c29b
test cl, 4
jne 0x6b49c2d8
test ecx, 0x10000
jne 0x6b49c30f
test cl, 0x20
jne 0x6b49c472
test cl, 1
jne 0x6b49c4a2
test al, 0x40
jne 0x6b49c711
push eax
push str.schannel:_CertGetCertificateChain_error_mask:_0x_08x
push edi
call fcn.6b476950
add esp, 0xc
mov ebx, 0x3c
jmp 0x6b49c7b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push str.schannel:_CertGetCertificateChain_failed:__s
push dword [ebp + 8]
call fcn.6b476950
add esp, 0xc
mov dword [esp + 0x18], 0
mov ebx, 0x3c
mov esi, dword [esp + 4]
jmp 0x6b49c7b4
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0xb8], 2
jne 0x6b49c2c4
xor eax, eax
cmp dword [ecx + 0x134], 0xffffffff
setne al
shl eax, 4
cmp dword [ecx + eax + 0x198], 2
jne 0x6b49c353
xor ebx, ebx
test byte [ecx + 0x1f8], 2
jne 0x6b49c362
jmp 0x6b49c7b4
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_REVOKED
jmp 0x6b49c716
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push str.schannel:_failed_to_create_certificate_store:__s
push edi
call fcn.6b476950
add esp, 0xc
jmp 0x6b49c0e3
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_PARTIAL_CHAIN
jmp 0x6b49c716
mov dword [esp + 0x10], ebx
xor esi, esi
mov eax, 2
jmp 0x6b49c0f5
mov eax, dword [ecx + 0x22c]
test eax, eax
je 0x6b49c4ac
mov edx, dword [eax]
mov ecx, esi
push edi
push str._memory_blob_
push dword [eax + 4]
call fcn.6b49c860
add esp, 0xc
mov ebx, eax
jmp 0x6b49c655
xor ebx, ebx
test byte [ecx + 0x238], 2
je 0x6b49c7b4
mov ebx, edi
mov edi, dword [esp + 0x14]
mov ecx, ebx
mov edx, edi
push 0
push 0
call fcn.6b49caf0
add esp, 8
test eax, eax
je 0x6b49c47c
mov ecx, dword [0x6b83acf8]
push eax
mov dword [esp + 0x10], eax
call dword [ecx]
add esp, 4
test eax, eax
je 0x6b49c496
mov ebx, eax
mov ecx, dword [ebp + 8]
mov edx, edi
mov edi, dword [esp + 0xc]
push edi
push eax
call fcn.6b49caf0
add esp, 8
cmp eax, edi
mov edi, ebx
jne 0x6b49c573
xor edx, edx
mov ebx, 0x3c
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], edi
jmp 0x6b49c3e2
mov ebx, 0x1b
mov ecx, dword [esp + 0xc]
mov edx, dword [esp]
cmp edx, ecx
mov eax, dword [ebp + 8]
mov edi, dword [esp + 0x1c]
jae 0x6b49c58d
cmp ebx, 0x3c
jne 0x6b49c58d
cmp byte [edi + edx], 0
je 0x6b49c58d
mov dword [esp], edx
lea ebx, [edi + edx]
push ebx
call sub.msvcrt.dll__strdup_1
add esp, 4
test eax, eax
je 0x6b49c3c7
mov edi, eax
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x10]
push ebx
push eax
call fcn.6b4580d0
add esp, 8
cmp eax, 1
jne 0x6b49c437
push edi
push ebx
push str.schannel:_connection_hostname___s__validated_against_certificate_name___s_
push dword [ebp + 8]
call fcn.6b4767f0
add esp, 0x10
xor ebx, ebx
jmp 0x6b49c464
push edi
push ebx
push str.schannel:_connection_hostname___s__did_not_match_against_certificate_name___s_
push dword [ebp + 8]
call fcn.6b4767f0
add esp, 0x10
push dword [esp + 8]
call sub.msvcrt.dll_strlen
add esp, 4
mov ecx, dword [esp]
lea ecx, [ecx + eax + 1]
mov dword [esp], ecx
mov ebx, 0x3c
push edi
call fcn.6b721a48
add esp, 4
jmp 0x6b49c3cc
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_UNTRUSTED_ROOT
jmp 0x6b49c716
push str.schannel:_CertGetNameString___returned_no_certificate_name_information
push ebx
call fcn.6b476950
add esp, 8
mov ebx, 0x3c
xor edi, edi
jmp 0x6b49c7a9
mov ebx, 0x1b
xor edi, edi
jmp 0x6b49c7a9
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_IS_NOT_TIME_VALID
jmp 0x6b49c716
lea eax, [ecx + 0x208]
mov ebx, dword [eax]
push ebx
call sub.msvcrt.dll__strdup_1
add esp, 4
test eax, eax
je 0x6b49c534
mov dword [esp + 8], ebx
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], ebx
je 0x6b49c5ba
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 8], eax
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x6b49c5f9
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
cmp edx, 0x100001
sbb eax, 0
jl 0x6b49c729
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push edi
call fcn.6b476950
add esp, 0xc
jmp 0x6b49c625
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push edi
call fcn.6b476950
add esp, 0x10
mov eax, dword [0x6b83acf4]
push 0
call dword [eax]
add esp, 4
mov ebx, 0x4d
jmp 0x6b49c655
push str.schannel:_CertGetNameString___returned_certificate_name_information_of_unexpected_size
push dword [ebp + 8]
call fcn.6b476950
add esp, 8
mov ebx, 0x3c
jmp 0x6b49c7a9
test ebx, ebx
je 0x6b49c7a9
cmp ebx, 0x3c
jne 0x6b49c79b
push dword [esp + 0x10]
push str.schannel:_CertGetNameString___failed_to_match_connection_hostname___s__against_server_certificate_names
push eax
call fcn.6b476950
add esp, 0xc
mov ebx, 0x3c
jmp 0x6b49c7a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_open_CA_file__s:__s
push edi
call fcn.6b476950
add esp, 0x10
mov eax, dword [0x6b83acf4]
push 0
call dword [eax]
add esp, 4
mov ebx, 0x4d
jmp 0x6b49c649
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push edi
call fcn.6b476950
add esp, 0x10
mov ebx, 0x4d
mov dword [esp], 0
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x6b83acf4]
push dword [esp]
call dword [eax]
add esp, 4
push dword [esp + 0x1c]
call fcn.6b721a48
add esp, 4
test ebx, ebx
jne 0x6b49c7b4
mov dword [esp + 0x54], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0x30
mov dword [esp + 0x50], esi
lea eax, [esp + 0x20]
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.CRYPT32.dll_CertCreateCertificateChainEngine]
test eax, eax
je 0x6b49c6df
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0xb8]
jmp 0x6b49c0f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push str.schannel:_failed_to_create_certificate_chain_engine:__s
push edi
call fcn.6b476950
add esp, 0xc
mov ebx, 0x4d
jmp 0x6b49c7b4
push str.schannel:_CertGetCertificateChain_trust_error_CERT_TRUST_REVOCATION_STATUS_UNKNOWN
push edi
call fcn.6b476950
add esp, 8
mov ebx, 0x3c
jmp 0x6b49c7b4
mov eax, dword [0x6b83acf8]
lea ecx, [edx + 1]
push ecx
mov dword [esp + 0x10], edx
call dword [eax]
add esp, 4
test eax, eax
je 0x6b49c7f8
mov ebx, dword [esp + 0xc]
test ebx, ebx
mov dword [esp], eax
je 0x6b49c802
xor ecx, ecx
mov edx, ebx
sub edx, ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0xc], ecx
add ecx, eax
push 0
lea eax, [esp + 0x28]
push eax
push edx
push ecx
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x6b49c821
mov eax, dword [esp + 0x24]
test eax, eax
mov ecx, dword [esp + 0xc]
cmove ebx, ecx
add eax, ecx
cmp ebx, eax
mov ecx, eax
mov eax, dword [esp]
ja 0x6b49c754
jmp 0x6b49c804
push str.schannel:_server_certificate_name_verification_failed
push eax
call fcn.6b476950
add esp, 8
mov eax, dword [0x6b83acf4]
push edi
call dword [eax]
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x6b49c7c3
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChainEngine]
test esi, esi
je 0x6b49c7d0
push 0
push esi
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x6b49c7df
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateChain]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x6b49c7ee
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, 0x1b
jmp 0x6b49c62a
xor ebx, ebx
mov byte [eax + ebx], 0
mov ecx, esi
mov edx, eax
push edi
push dword [esp + 0xc]
push ebx
call fcn.6b49c860
add esp, 0xc
mov ebx, eax
jmp 0x6b49c631
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x5c]
push 0x100
push ecx
push eax
call fcn.6b481aa0
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push edi
call fcn.6b476950
add esp, 0x10
mov ebx, 0x4d
jmp 0x6b49c631