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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6b4
push esi
push edi
lea edi, [ebp - 0x6b4]
mov ecx, 0x1ad
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x7a3104]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x31], 0
mov dword [ebp - 0x38], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x6017de
push 0x100
lea ecx, [ebp - 0x140]
push ecx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_invalid_path_name_for_CA_file__s:__s
mov eax, dword [ebp + 0x10]
push eax
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x601c9d
mov esi, esp
push 0
push 0x80
push 3
push 0
push 1
push connect
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x601852
push 0x100
lea edx, [ebp - 0x248]
push edx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov eax, dword [ebp + 0xc]
push eax
push str.schannel:_failed_to_open_CA_file__s:__s
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x601c9d
mov esi, esp
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp esi, esp
call fcn.00516fe7
test eax, eax
jne 0x6018b3
push 0x100
lea ecx, [ebp - 0x350]
push ecx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_failed_to_determine_size_of_CA_file__s:__s
mov eax, dword [ebp + 0x10]
push eax
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x601c9d
cmp dword [ebp - 0x14], 0
jl 0x6018e6
jg 0x6018c4
cmp dword [ebp - 0x18], 0x100000
jbe 0x6018e6
push 0x100000
push str.schannel:_CA_file_exceeds_max_size_of__u_bytes
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00518f9a
add esp, 0xc
mov dword [ebp - 8], 0x4d
jmp 0x601c9d
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, 1
mov esi, esp
push eax
call dword [0x79402c]
add esp, 4
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x60191a
mov dword [ebp - 8], 0x1b
jmp 0x601c9d
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x30]
cmp ecx, dword [ebp - 0x2c]
jae 0x6019d9
mov edx, dword [ebp - 0x2c]
sub edx, dword [ebp - 0x30]
mov dword [ebp - 0x358], edx
mov dword [ebp - 0x360], 0
mov esi, esp
push 0
lea eax, [ebp - 0x360]
push eax
mov ecx, dword [ebp - 0x358]
push ecx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp esi, esp
call fcn.00516fe7
test eax, eax
jne 0x6019b7
push 0x100
lea ecx, [ebp - 0x468]
push ecx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_failed_to_read_from_CA_file__s:__s
mov eax, dword [ebp + 0x10]
push eax
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
jmp 0x601c9d
cmp dword [ebp - 0x360], 0
jne 0x6019c8
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
jmp 0x6019d4
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x360]
mov dword [ebp - 0x30], edx
jmp 0x601921
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x2c]
mov byte [eax], 0
cmp dword [ebp - 8], 0
je 0x6019ed
jmp 0x601c9d
push 0x7a1748
call fcn.00519bbb
add esp, 4
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x31], 1
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x24], ecx
movzx edx, byte [ebp - 0x31]
test edx, edx
je 0x601c61
mov eax, dword [ebp - 0x24]
movsx ecx, byte [eax]
test ecx, ecx
je 0x601c61
push 0x7a1764
mov edx, dword [ebp - 0x24]
push edx
call fcn.00516eed
add esp, 8
mov dword [ebp - 0x470], eax
cmp dword [ebp - 0x470], 0
je 0x601a67
push 0x7a1780
call fcn.00519bbb
add esp, 4
mov ecx, dword [ebp - 0x470]
mov dl, byte [ecx + eax]
movzx eax, dl
push eax
call fcn.006016f0
add esp, 4
test eax, eax
jne 0x601a70
mov byte [ebp - 0x31], 0
jmp 0x601c5c
push str._n_____END_CERTIFICATE_____
mov ecx, dword [ebp - 0x470]
push ecx
call fcn.00516eed
add esp, 8
mov dword [ebp - 0x474], eax
cmp dword [ebp - 0x474], 0
jne 0x601ab8
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_CA_file__s_is_not_correctly_formatted
mov eax, dword [ebp + 0x10]
push eax
call fcn.00518f9a
add esp, 0xc
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x31], 0
jmp 0x601c5c
mov dword [ebp - 0x48c], 0
mov dword [ebp - 0x494], 0
mov dword [ebp - 0x49c], 0
mov ecx, dword [ebp - 0x474]
add ecx, dword [ebp - 0x3c]
sub ecx, dword [ebp - 0x470]
mov dword [ebp - 0x4a4], ecx
mov edx, dword [ebp - 0x470]
mov dword [ebp - 0x47c], edx
mov eax, dword [ebp - 0x4a4]
mov dword [ebp - 0x480], eax
mov esi, esp
lea ecx, [ebp - 0x48c]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 0x49c]
push edx
push 0
push 0
push 0xe
push 2
lea eax, [ebp - 0x480]
push eax
push 2
call dword [sym.imp.CRYPT32.dll_CryptQueryObject]
cmp esi, esp
call fcn.00516fe7
test eax, eax
jne 0x601b85
push 0x100
lea ecx, [ebp - 0x5a8]
push ecx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov edx, dword [ebp + 0xc]
push edx
push str.schannel:_failed_to_extract_certificate_from_CA_file__s:__s
mov eax, dword [ebp + 0x10]
push eax
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x31], 0
jmp 0x601c5c
mov ecx, dword [ebp - 0x470]
add ecx, dword [ebp - 0x4a4]
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x49c], 1
je 0x601bc9
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x49c]
push eax
push str.schannel:_unexpected_content_type__d_when_extracting_certificate_from_CA_file__s
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x31], 0
jmp 0x601c5c
mov esi, esp
push 0
push 4
mov edx, dword [ebp - 0x48c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0x494], eax
mov esi, esp
mov ecx, dword [ebp - 0x48c]
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
cmp esi, esp
call fcn.00516fe7
cmp dword [ebp - 0x494], 0
jne 0x601c53
push 0x100
lea edx, [ebp - 0x6b0]
push edx
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00516fe7
push eax
call fcn.0051a043
add esp, 0xc
push eax
mov eax, dword [ebp + 0xc]
push eax
push str.schannel:_failed_to_add_certificate_from_CA_file__s_to_certificate_store:__s
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00518f9a
add esp, 0x10
mov dword [ebp - 8], 0x4d
mov byte [ebp - 0x31], 0
jmp 0x601c5c
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x601a07
cmp dword [ebp - 8], 0
jne 0x601c9d
cmp dword [ebp - 0x38], 0
jne 0x601c84
mov eax, dword [ebp + 0xc]
push eax
push str.schannel:_did_not_add_any_certificates_from_CA_file__s_n
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00514800
add esp, 0xc
jmp 0x601c9d
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x38]
push eax
push str.schannel:_added__d_certificate_s__from_CA_file__s_n
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00514800
add esp, 0x10
cmp dword [ebp - 0xc], 0xffffffff
je 0x601cb6
mov esi, esp
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00516fe7
mov esi, esp
mov eax, dword [ebp - 0x20]
push eax
call dword [0x794030]
add esp, 4
cmp esi, esp
call fcn.00516fe7
mov dword [ebp - 0x20], 0
xor ecx, ecx
jne 0x601cb6
mov dword [ebp - 0x28], 0
xor edx, edx
jne 0x601cd7
mov eax, dword [ebp - 8]
push edx
mov ecx, ebp
push eax
lea edx, [0x601d14]
call fcn.005163b2
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005150f7
add esp, 0x6b4
cmp ebp, esp
call fcn.00516fe7
mov esp, ebp
pop ebp
ret