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

Disassembly:
sub esp, 0xb4
mov eax, dword [0x1007b430]
xor eax, esp
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0xb8]
push ebx
push ebp
mov ebp, dword [esp + 0xc4]
push esi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xcc]
xor ebx, ebx
push edi
mov edi, dword [eax]
xor esi, esi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
cmp ebp, ebx
jne 0x100487ee
push 0x80
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push edi
call fcn.100149a0
add esp, 0x1c
mov dword [esp + 0x10], 0x4d
jmp 0x10048ad9
push ebx
push 0x80
push 3
push ebx
push ebx
push bind
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x1004882c
push 0x80
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
push eax
push ebp
push str.schannel:_failed_to_open_CA_file__s:__s
jmp 0x100487d8
lea ecx, [esp + 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1004886f
push 0x80
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
push eax
push ebp
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
push edi
call fcn.100149a0
add esp, 0x1c
mov dword [esp + 0x10], 0x4d
jmp 0x10048ace
cmp dword [esp + 0x3c], ebx
mov edi, dword [esp + 0x38]
jl 0x100488a7
jg 0x10048883
cmp edi, 0x100000
jbe 0x100488a7
mov eax, dword [esp + 0x14]
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push eax
call fcn.100149a0
add esp, 0xc
mov dword [esp + 0x10], 0x4d
jmp 0x10048ace
lea ecx, [edi + 1]
push ecx
call dword [section..data]
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebx
jne 0x100488c9
mov dword [esp + 0x10], 0x1b
jmp 0x10048ace
mov dword [esp + 0x10], ebx
cmp edi, ebx
jbe 0x10048913
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea edx, [esp + 0x20]
push edx
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esi + eax]
mov eax, dword [esp + 0x34]
push edx
push eax
mov dword [esp + 0x30], ebx
call ebp
test eax, eax
je 0x100489e7
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x100489dc
add esi, eax
mov eax, dword [esp + 0x20]
cmp esi, edi
jb 0x100488d7
mov ebp, dword [esp + 0x18]
mov byte [edi + eax], bl
mov edi, eax
cmp byte [edi], bl
je 0x10048a9e
push str._____BEGIN_CERTIFICATE_____
push edi
call fcn.1004dd20
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x10048a9e
mov al, byte [esi + 0x1b]
cmp al, 0xd
je 0x10048947
cmp al, 0xa
jne 0x10048a9e
push str._n_____END_CERTIFICATE_____
push esi
call fcn.1004dd20
add esp, 8
cmp eax, ebx
je 0x10048a22
lea ecx, [esp + 0x18]
push ecx
push ebx
push ebx
push ebx
lea edx, [esp + 0x2c]
push edx
push ebx
push ebx
sub eax, esi
add eax, 0x1a
push 0xe
mov edi, eax
push 2
lea eax, [esp + 0x54]
push eax
push 2
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], edi
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
test eax, eax
je 0x10048a42
mov eax, dword [esp + 0x1c]
add edi, esi
cmp eax, 1
jne 0x10048a61
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
push ebx
push 4
push ecx
push edx
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
mov esi, eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp esi, ebx
je 0x10048a7c
inc dword [esp + 0x24]
jmp 0x10048918
mov eax, dword [esp + 0x20]
mov edi, esi
jmp 0x1004890f
push 0x80
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
mov edx, dword [esp + 0x24]
push eax
push edx
push str.schannel:_failed_to_read_from_CA_file__s:__s
mov eax, dword [esp + 0x2c]
push eax
call fcn.100149a0
add esp, 0x1c
mov dword [esp + 0x10], 0x4d
jmp 0x10048ace
mov ecx, dword [esp + 0x14]
push ebp
push str.schannel:_CA_file__s_is_not_correctly_formatted
push ecx
call fcn.100149a0
add esp, 0xc
mov dword [esp + 0x10], 0x4d
jmp 0x10048ace
push 0x80
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
push eax
push ebp
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
jmp 0x10048a08
mov ecx, dword [esp + 0x14]
push ebp
push eax
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
push ecx
call fcn.100149a0
mov dword [esp + 0x20], 0x4d
jmp 0x10048acb
push 0x80
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003f380
push eax
push ebp
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
jmp 0x10048a08
mov eax, dword [esp + 0x24]
push ebp
cmp eax, ebx
jne 0x10048abb
mov ecx, dword [esp + 0x18]
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
push ecx
call fcn.100148c0
add esp, 0xc
jmp 0x10048ace
mov edx, dword [esp + 0x18]
push eax
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
push edx
call fcn.100148c0
add esp, 0x10
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x20]
push ecx
call dword [0x1007b004]
mov ecx, dword [esp + 0xc4]
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1004b8fc
add esp, 0xb4
ret