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

Disassembly:
sub esp, 0xac
mov eax, dword [esp + 0xb8]
push ebx
push ebp
mov ebp, dword [esp + 0xbc]
xor ebx, ebx
push esi
push edi
mov edi, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
test ebp, ebp
jne 0x1005470c
push 0x80
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push edi
call fcn.100293e3
add esp, 0x1c
push 0x4d
pop ebx
jmp 0x100549b1
push ebx
mov esi, 0x80
push esi
push 3
push ebx
push ebx
push connect
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x10054747
push esi
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebp
push str.schannel:_failed_to_open_CA_file__s:__s
jmp 0x100546fb
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10054781
push esi
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebp
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push edi
call fcn.100293e3
add esp, 0x1c
push 0x4d
pop ebx
jmp 0x100549a7
mov esi, dword [esp + 0x2c]
cmp dword [esp + 0x30], ebx
jl 0x100547a7
mov eax, 0x100000
jg 0x10054796
cmp esi, eax
jbe 0x100547a7
push eax
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push edi
call fcn.100293e3
add esp, 0xc
jmp 0x10054779
lea eax, [esi + 1]
push eax
call dword [0x1008d098]
mov edx, eax
pop ecx
mov dword [esp + 0x18], edx
test edx, edx
jne 0x100547c0
push 0x1b
jmp 0x1005477b
test esi, esi
je 0x10054809
mov ecx, ebx
push ebx
lea eax, [esp + 0x18]
push eax
mov eax, esi
sub eax, ecx
push eax
lea eax, [ecx + edx]
push eax
push dword [esp + 0x38]
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100548e3
mov edx, dword [esp + 0x18]
cmp dword [esp + 0x14], ebx
je 0x100548da
mov ecx, dword [esp + 0x10]
add ecx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
cmp ecx, esi
jb 0x100547c6
xor ecx, ecx
inc ecx
mov eax, edx
mov byte [esi + edx], bl
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], eax
cmp byte [eax], bl
je 0x1005497f
push 0x10097e28
push eax
call fcn.1005a6d0
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10054905
mov al, byte [esi + 0x1b]
cmp al, 0xd
je 0x10054847
cmp al, 0xa
jne 0x10054905
push str._n_____END_CERTIFICATE_____
push esi
call fcn.1005a6d0
pop ecx
pop ecx
test eax, eax
je 0x10054974
sub eax, esi
add eax, 0x1a
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push 0xe
push 2
lea eax, [esp + 0x58]
push eax
push 2
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x64], esi
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x10054952
add dword [esp + 0x1c], esi
cmp dword [esp + 0x14], 1
jne 0x1005493a
push ebx
push 4
push dword [esp + 0x18]
push dword [esp + 0xcc]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
push dword [esp + 0x10]
mov esi, eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test esi, esi
je 0x10054918
inc dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
jmp 0x1005490b
mov esi, dword [esp + 0x10]
jmp 0x10054809
push 0x80
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebp
push str.schannel:_failed_to_read_from_CA_file__s:__s
jmp 0x10054770
mov ecx, ebx
mov dword [esp + 0x24], ecx
test ecx, ecx
je 0x1005497f
mov eax, dword [esp + 0x1c]
jmp 0x10054819
push 0x80
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebp
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
jmp 0x10054770
push ebp
push dword [esp + 0x18]
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
push edi
call fcn.100293e3
add esp, 0x10
jmp 0x10054779
push 0x80
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1004de15
push eax
push ebp
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
jmp 0x10054770
push ebp
push str.schannel:_CA_file__s_is_not_correctly_formatted
jmp 0x1005479c
mov eax, dword [esp + 0x20]
push ebp
test eax, eax
jne 0x10054998
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
push edi
call fcn.10029490
add esp, 0xc
jmp 0x100549a7
push eax
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
push edi
call fcn.10029490
add esp, 0x10
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x18]
call dword [0x1008d09c]
pop ecx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xac
ret