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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x4f7f44]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov edi, dword [eax]
xor esi, esi
push ebx
mov dword [ebp - 0x90], ebx
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x98], esi
mov dword [ebp - 0x9c], esi
call fcn.0049f050
add esp, 4
mov dword [ebp - 0xa4], eax
test eax, eax
jne 0x4a4625
push 0x80
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push edi
call fcn.0046f330
add esp, 0x1c
mov esi, 0x4d
jmp 0x4a49a9
push 0
push 0x80
push 3
push 0
push 0
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa0], eax
cmp eax, 0xffffffff
jne 0x4a4680
push 0x80
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
push eax
push ebx
push str.schannel:_failed_to_open_CA_file__s:__s
push edi
call fcn.0046f330
add esp, 0x1c
mov dword [ebp - 0x88], 0x4d
jmp 0x4a49a3
lea ecx, [ebp - 0xb8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4a46c9
push 0x80
lea edx, [ebp - 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
push eax
push ebx
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push edi
call fcn.0046f330
add esp, 0x1c
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4996
mov edi, dword [ebp - 0xb8]
cmp dword [ebp - 0xb4], esi
jl 0x4a4709
jg 0x4a46e1
cmp edi, 0x100000
jbe 0x4a4709
mov eax, dword [ebp - 0x8c]
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push eax
call fcn.0046f330
add esp, 0xc
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4996
lea ecx, [edi + 1]
push ecx
call dword [0x4f7cd8]
add esp, 4
mov dword [ebp - 0x98], eax
test eax, eax
jne 0x4a472f
mov dword [ebp - 0x88], 0x1b
jmp 0x4a4996
mov dword [ebp - 0x88], esi
test edi, edi
je 0x4a478d
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
nop
push 0
lea edx, [ebp - 0x94]
push edx
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esi + eax]
mov eax, dword [ebp - 0xa0]
push edx
push eax
mov dword [ebp - 0x94], 0
call ebx
test eax, eax
je 0x4a487f
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x4a4872
add esi, eax
mov eax, dword [ebp - 0x98]
cmp esi, edi
jb 0x4a4740
mov ebx, dword [ebp - 0x90]
mov byte [edi + eax], 0
mov edi, eax
cmp byte [edi], 0
je 0x4a4960
push str._____BEGIN_CERTIFICATE_____
push edi
call fcn.004ad900
mov esi, eax
add esp, 8
test esi, esi
je 0x4a4960
mov al, byte [esi + 0x1b]
call fcn.004a4580
test eax, eax
je 0x4a4960
push str._n_____END_CERTIFICATE_____
push esi
call fcn.004ad900
xor ecx, ecx
add esp, 8
cmp eax, ecx
je 0x4a48c2
lea edx, [ebp - 0x90]
push edx
push ecx
push ecx
push ecx
sub eax, esi
lea edi, [eax + 0x1a]
lea eax, [ebp - 0x94]
push eax
push ecx
push ecx
push 0xe
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x94], ecx
push 2
lea ecx, [ebp - 0xb0]
push ecx
push 2
mov dword [ebp - 0xac], esi
mov dword [ebp - 0xb0], edi
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x4a48e6
mov eax, dword [ebp - 0x94]
add edi, esi
cmp eax, 1
jne 0x4a4920
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 0xa8]
push 0
push 4
push edx
push eax
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov ecx, dword [ebp - 0x90]
push ecx
mov esi, eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
test esi, esi
je 0x4a493f
inc dword [ebp - 0x9c]
jmp 0x4a4793
mov eax, dword [ebp - 0x98]
mov edi, esi
jmp 0x4a4787
push 0x80
lea ecx, [ebp - 0x84]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
mov edx, dword [ebp - 0x90]
push eax
mov eax, dword [ebp - 0x8c]
push edx
push str.schannel:_failed_to_read_from_CA_file__s:__s
push eax
call fcn.0046f330
add esp, 0x1c
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4996
mov edx, dword [ebp - 0x8c]
push ebx
push str.schannel:_CA_file__s_is_not_correctly_formatted
push edx
call fcn.0046f330
add esp, 0xc
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4996
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
push eax
push ebx
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
mov ecx, dword [ebp - 0x8c]
push ecx
call fcn.0046f330
add esp, 0x1c
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4996
mov edx, dword [ebp - 0x8c]
push ebx
push eax
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
push edx
call fcn.0046f330
mov dword [ebp - 0x88], 0x4d
jmp 0x4a4993
push 0x80
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0049b060
push eax
push ebx
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
jmp 0x4a4905
mov eax, dword [ebp - 0x9c]
push ebx
test eax, eax
jne 0x4a4981
mov edx, dword [ebp - 0x8c]
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
push edx
call fcn.0046f260
add esp, 0xc
jmp 0x4a4996
push eax
mov eax, dword [ebp - 0x8c]
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
push eax
call fcn.0046f260
add esp, 0x10
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x88]
mov edx, dword [ebp - 0x98]
push edx
call dword [0x4f7cdc]
mov eax, dword [ebp - 0xa4]
add esp, 4
test eax, eax
je 0x4a49cd
push eax
call dword [0x4f7cdc]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a79cb
mov esp, ebp
pop ebp
ret