Function at 0x5b50d0
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, 0x128
mov ebx, edx
mov dword [esp + 0x10], ecx
mov edi, dword [ebp + 8]
mov eax, dword [0x7c3824]
xor eax, ebp
mov dword [esp + 0x120], eax
push edx
call fcn.0057a1d0
add esp, 4
test eax, eax
je 0x5b518b
mov esi, eax
mov dword [esp + 8], ebx
sub esp, 0x1c
movaps xmm0, xmmword [0x64e550]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x5b51c9
mov ebx, eax
lea eax, [esp + 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x5b520a
mov dword [esp], esi
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp esi, 0x100001
sbb eax, 0
jl 0x5b5248
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
push edi
call fcn.0051ed60
add esp, 0xc
mov edi, 0x4d
jmp 0x5b52b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x20]
push 0x100
push ecx
push eax
call fcn.0058a180
add esp, 0xc
push eax
push ebx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
push edi
call fcn.0051ed60
add esp, 0x10
push 0
call dword [0x7c3880]
add esp, 4
mov edi, 0x4d
jmp 0x5b5336
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x20]
push 0x100
push ecx
push eax
call fcn.0058a180
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_open_CA_file__s:__s
push edi
call fcn.0051ed60
add esp, 0x10
push 0
call dword [0x7c3880]
add esp, 4
mov edi, 0x4d
jmp 0x5b532d
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x20]
push 0x100
push ecx
push eax
call fcn.0058a180
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.0051ed60
add esp, 0x10
mov edi, 0x4d
mov dword [esp + 4], 0
jmp 0x5b5319
lea eax, [esi + 1]
push eax
call dword [0x7c387c]
add esp, 4
test eax, eax
je 0x5b52ad
test esi, esi
mov dword [esp + 0xc], ebx
mov dword [esp + 4], eax
je 0x5b52bf
xor edi, edi
nop word [eax + eax]
mov edx, esi
sub edx, edi
mov dword [esp + 0x14], 0
mov ebx, eax
lea ecx, [eax + edi]
push 0
lea eax, [esp + 0x18]
push eax
push edx
push ecx
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b52df
mov eax, dword [esp + 0x14]
test eax, eax
cmove esi, edi
add eax, edi
mov edi, eax
cmp esi, eax
mov eax, ebx
ja 0x5b5270
jmp 0x5b52c1
mov edi, 0x1b
mov dword [esp + 4], 0
mov esi, dword [esp]
jmp 0x5b5319
xor esi, esi
mov byte [eax + esi], 0
mov ecx, dword [esp + 0x10]
mov edx, eax
push dword [ebp + 8]
push dword [esp + 0xc]
push esi
call fcn.005b4e40
add esp, 0xc
mov edi, eax
jmp 0x5b5312
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [esp + 0x20]
push 0x100
push ecx
push eax
call fcn.0058a180
add esp, 0xc
push eax
push dword [esp + 0xc]
push str.schannel:_failed_to_read_from_CA_file__s:__s
push dword [ebp + 8]
call fcn.0051ed60
add esp, 0x10
mov edi, 0x4d
mov esi, dword [esp]
mov ebx, dword [esp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 4]
call dword [0x7c3880]
add esp, 4
push esi
call fcn.005fd8d5
add esp, 4
mov ecx, dword [esp + 0x120]
xor ecx, ebp
call fcn.005db451
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret