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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3b8
push esi
push edi
lea edi, [ebp - 0x3b8]
mov ecx, 0xee
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x35], 0
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x2c], 0
jne 0x478086
push 0x80
lea eax, [ebp - 0xc4]
push eax
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x478545
mov esi, esp
push 0
push 0x80
push 3
push 0
push 0
push accept
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4780fa
push 0x80
lea ecx, [ebp - 0x14c]
push ecx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_failed_to_open_CA_file__s:__s
mov eax, dword [ebp - 0xc]
push eax
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x478545
mov esi, esp
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x47815b
push 0x80
lea eax, [ebp - 0x1d4]
push eax
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x478545
cmp dword [ebp - 0x18], 0
jl 0x47818e
jg 0x47816c
cmp dword [ebp - 0x1c], 0x100000
jbe 0x47818e
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov eax, dword [ebp - 0xc]
push eax
call fcn.0042abc0
add esp, 0xc
mov dword [ebp - 8], 0x4d
jmp 0x478545
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
add edx, 1
mov esi, esp
push edx
call dword [section..data]
add esp, 4
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4781c2
mov dword [ebp - 8], 0x1b
jmp 0x478545
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x30]
jae 0x478281
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x34]
mov dword [ebp - 0x1dc], ecx
mov dword [ebp - 0x1e4], 0
mov esi, esp
push 0
lea edx, [ebp - 0x1e4]
push edx
mov eax, dword [ebp - 0x1dc]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x47825f
push 0x80
lea eax, [ebp - 0x26c]
push eax
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.schannel:_failed_to_read_from_CA_file__s:__s
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x478545
cmp dword [ebp - 0x1e4], 0
jne 0x478270
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
jmp 0x47827c
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x1e4]
mov dword [ebp - 0x34], ecx
jmp 0x4781c9
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x30]
mov byte [edx], 0
cmp dword [ebp - 8], 0
je 0x478295
jmp 0x478545
push 0x4c6a90
call fcn.0048f060
add esp, 4
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x35], 1
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
movzx ecx, byte [ebp - 0x35]
test ecx, ecx
je 0x478509
mov edx, dword [ebp - 0x28]
movsx eax, byte [edx]
test eax, eax
je 0x478509
push 0x4c6aac
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00489520
add esp, 8
mov dword [ebp - 0x274], eax
cmp dword [ebp - 0x274], 0
je 0x47830f
push 0x4c6ac8
call fcn.0048f060
add esp, 4
mov edx, dword [ebp - 0x274]
mov al, byte [edx + eax]
movzx ecx, al
push ecx
call fcn.00477f90
add esp, 4
test eax, eax
jne 0x478318
mov byte [ebp - 0x35], 0
jmp 0x478504
push str._n_____END_CERTIFICATE_____
mov edx, dword [ebp - 0x274]
push edx
call fcn.00489520
add esp, 8
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
jne 0x478360
mov eax, dword [ebp + 0xc]
push eax
push str.schannel:_CA_file__s_is_not_correctly_formatted
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0042abc0
add esp, 0xc
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x35], 0
jmp 0x478504
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x2a0], 0
mov edx, dword [ebp - 0x278]
add edx, dword [ebp - 0x40]
sub edx, dword [ebp - 0x274]
mov dword [ebp - 0x2a8], edx
mov eax, dword [ebp - 0x274]
mov dword [ebp - 0x280], eax
mov ecx, dword [ebp - 0x2a8]
mov dword [ebp - 0x284], ecx
mov esi, esp
lea edx, [ebp - 0x290]
push edx
push 0
push 0
push 0
lea eax, [ebp - 0x2a0]
push eax
push 0
push 0
push 0xe
push 2
lea ecx, [ebp - 0x284]
push ecx
push 2
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x47842d
push 0x80
lea edx, [ebp - 0x32c]
push edx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov eax, dword [ebp + 0xc]
push eax
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x35], 0
jmp 0x478504
mov edx, dword [ebp - 0x274]
add edx, dword [ebp - 0x2a8]
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x2a0], 1
je 0x478471
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x2a0]
push ecx
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x35], 0
jmp 0x478504
mov esi, esp
push 0
push 4
mov eax, dword [ebp - 0x290]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x298], eax
mov esi, esp
mov edx, dword [ebp - 0x290]
push edx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp esi, esp
call fcn.00485c0f
cmp dword [ebp - 0x298], 0
jne 0x4784fb
push 0x80
lea eax, [ebp - 0x3b4]
push eax
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00485c0f
push eax
call fcn.00471b20
add esp, 0xc
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042abc0
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x35], 0
jmp 0x478504
mov eax, dword [ebp - 0x3c]
add eax, 1
mov dword [ebp - 0x3c], eax
jmp 0x4782af
cmp dword [ebp - 8], 0
jne 0x478545
cmp dword [ebp - 0x3c], 0
jne 0x47852c
mov ecx, dword [ebp + 0xc]
push ecx
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042aa70
add esp, 0xc
jmp 0x478545
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
mov edx, dword [ebp - 0xc]
push edx
call fcn.0042aa70
add esp, 0x10
cmp dword [ebp - 0x10], 0xffffffff
je 0x47855e
mov esi, esp
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
mov ecx, dword [ebp - 0x24]
push ecx
call dword [0x4bc004]
add esp, 4
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x24], 0
xor edx, edx
jne 0x47855e
mov dword [ebp - 0x2c], 0
xor eax, eax
jne 0x47857f
mov eax, dword [ebp - 8]
push edx
mov ecx, ebp
push eax
lea edx, [0x4785bc]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0x3b8
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret