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

Disassembly:
sub esp, 0x128
push ebx
push ebp
mov ebp, dword [eax]
push esi
xor ebx, ebx
push edi
mov edi, dword [esp + 0x140]
xor esi, esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
cmp edi, ebx
jne 0x4421c5
push 0x100
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push ebp
call fcn.004100a0
add esp, 0x1c
lea ebp, [ebx + 0x4d]
jmp 0x4424eb
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
jne 0x442215
push 0x100
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
push eax
push edi
push str.schannel:_failed_to_open_CA_file__s:__s
push ebp
call fcn.004100a0
add esp, 0x1c
mov ebp, 0x4d
jmp 0x4424eb
lea ecx, [esp + 0x30]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x442255
push 0x100
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
push eax
push edi
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push ebp
call fcn.004100a0
add esp, 0x1c
mov ebp, 0x4d
jmp 0x4424e0
mov edi, dword [esp + 0x30]
cmp dword [esp + 0x34], ebx
jl 0x442288
jg 0x442269
cmp edi, 0x100000
jbe 0x442288
push 0x100000
mov eax, ebp
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push eax
call fcn.004100a0
add esp, 0xc
mov ebp, 0x4d
jmp 0x4424e0
lea ecx, [edi + 1]
push ecx
call dword [0x5960bc]
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
jne 0x4422a7
mov ebp, 0x1b
jmp 0x4424e0
xor ebp, ebp
cmp edi, ebx
jbe 0x4422ed
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea edx, [esp + 0x18]
push edx
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esi + eax]
mov eax, dword [esp + 0x30]
push edx
push eax
mov dword [esp + 0x28], ebx
call ebp
test eax, eax
je 0x4423c2
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x4423b7
add esi, eax
mov eax, dword [esp + 0x1c]
cmp esi, edi
jb 0x4422b3
mov ebp, ebx
mov byte [edi + eax], bl
mov edi, eax
cmp byte [edi], bl
je 0x4424a1
push str._____BEGIN_CERTIFICATE_____
push edi
call fcn.00511a30
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4424a1
mov al, byte [esi + 0x1b]
cmp al, 0xd
je 0x442321
cmp al, 0xa
jne 0x4424a1
push str._n_____END_CERTIFICATE_____
push esi
call fcn.00511a30
add esp, 8
cmp eax, ebx
je 0x4423fd
lea ecx, [esp + 0x14]
push ecx
push ebx
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
push ebx
push ebx
sub eax, esi
push 0xe
lea edi, [eax + 0x1a]
push 2
lea eax, [esp + 0x4c]
push eax
push 2
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], edi
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x442421
mov eax, dword [esp + 0x18]
add edi, esi
cmp eax, 1
jne 0x44245c
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x13c]
push ebx
push 4
push ecx
push edx
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp esi, ebx
je 0x44247b
inc dword [esp + 0x20]
jmp 0x4422f2
mov eax, dword [esp + 0x1c]
mov edi, esi
jmp 0x4422eb
push 0x100
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
mov edx, dword [esp + 0x14c]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.schannel:_failed_to_read_from_CA_file__s:__s
push eax
call fcn.004100a0
add esp, 0x1c
mov ebp, 0x4d
jmp 0x4424e0
mov ecx, dword [esp + 0x140]
mov edx, dword [esp + 0x10]
push ecx
push str.schannel:_CA_file__s_is_not_correctly_formatted
push edx
call fcn.004100a0
add esp, 0xc
mov ebp, 0x4d
jmp 0x4424e0
push 0x100
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
mov ecx, dword [esp + 0x14c]
push eax
push ecx
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
mov edx, dword [esp + 0x28]
push edx
call fcn.004100a0
add esp, 0x1c
mov ebp, 0x4d
jmp 0x4424e0
mov ecx, dword [esp + 0x140]
mov edx, dword [esp + 0x10]
push ecx
push eax
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
push edx
call fcn.004100a0
mov ebp, 0x4d
jmp 0x4424dd
push 0x100
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00405860
mov ecx, dword [esp + 0x14c]
push eax
push ecx
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
jmp 0x442445
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x4424c5
mov eax, dword [esp + 0x140]
mov ecx, dword [esp + 0x10]
push eax
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
push ecx
call fcn.0040ffd0
add esp, 0xc
jmp 0x4424e0
mov edx, dword [esp + 0x140]
push edx
push eax
mov eax, dword [esp + 0x18]
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
push eax
call fcn.0040ffd0
add esp, 0x10
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x1c]
push edx
call dword [0x5960c0]
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x128
ret