Function at 0x40a325
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x427d40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push 0x20
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x24]
push esi
push eax
mov dword [ebp - 0x34], esi
call fcn.0040b2f0
push 0x20
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.0040b2f0
add esp, 0x18
cmp edi, esi
jne 0x40a381
push str.ERROR:_Invalid_file_pointer_passed._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x40a5c1
push 2
push esi
push esi
push edi
call fcn.0040fdce
add esp, 0x10
test eax, eax
je 0x40a399
push str.ERROR:_Could_not_seek_to_the_end_of_the_MAR_file._n
jmp 0x40a369
push edi
call fcn.0040fcc5
pop ecx
cmp edx, esi
jl 0x40a3b4
jg 0x40a3ad
cmp eax, 0x1f400000
jbe 0x40a3b4
push str.ERROR:_MAR_file_is_too_large_to_be_verified._n
jmp 0x40a369
push esi
push esi
push 0x10
push edi
call fcn.0040fdce
add esp, 0x10
test eax, eax
je 0x40a3cc
push str.ERROR:_Could_not_seek_to_the_signature_block._n
jmp 0x40a369
push ebx
push edi
xor ebx, ebx
inc ebx
push ebx
lea eax, [ebp - 0x28]
push 4
push eax
call fcn.0040d333
add esp, 0x10
cmp eax, ebx
je 0x40a3ee
push str.ERROR:_Could_not_read_number_of_signatures._n
jmp 0x40a591
push dword [ebp - 0x28]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x28], eax
cmp eax, 8
jbe 0x40a41c
push 8
push str.ERROR:_At_most__d_signatures_can_be_specified._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
add esp, 0xc
jmp 0x40a5bd
mov dword [ebp - 0x2c], esi
cmp eax, esi
jbe 0x40a4c1
mov esi, dword [ebp - 0x2c]
push edi
push ebx
lea esi, [ebp + esi*4 - 0x24]
push 4
push esi
call fcn.0040d333
add esp, 0x10
cmp eax, ebx
jne 0x40a510
push dword [esi]
call dword [sym.imp.WSOCK32.dll_ntohl]
push edi
push ebx
mov dword [esi], eax
lea eax, [ebp - 0x30]
push 4
push eax
call fcn.0040d333
add esp, 0x10
cmp eax, ebx
jne 0x40a517
push dword [ebp - 0x30]
call dword [sym.imp.WSOCK32.dll_ntohl]
mov dword [ebp - 0x30], eax
cmp eax, 0x800
ja 0x40a51e
push eax
call fcn.0040b5b2
pop ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp + ecx*4 - 0x58], eax
test eax, eax
je 0x40a525
push edi
push ebx
push dword [ebp - 0x30]
push eax
call fcn.0040d333
add esp, 0x10
cmp eax, ebx
jne 0x40a52c
cmp dword [esi], ebx
jne 0x40a55a
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x28]
jb 0x40a427
xor esi, esi
push edi
call fcn.0040fcc5
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x38]
push dword [ebp + 0xc]
push edi
call fcn.0040a094
add esp, 0x1c
xor edi, edi
cmp dword [ebp - 0x28], esi
jbe 0x40a4f8
push dword [ebp + edi*4 - 0x58]
call fcn.0040b0b8
inc edi
pop ecx
cmp edi, dword [ebp - 0x28]
jb 0x40a4e8
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x28]
jne 0x40a588
cmp dword [ebp + 0x14], eax
jne 0x40a588
xor eax, eax
jmp 0x40a5c0
push str.ERROR:_Could_not_read_signatures_algorithm_ID._n
jmp 0x40a591
push str.ERROR:_Could_not_read_signatures_length._n
jmp 0x40a591
push str.ERROR:_Signature_length_is_too_large_to_verify._n
jmp 0x40a591
push str.ERROR:_Could_allocate_buffer_for_signature._n
jmp 0x40a591
push str.ERROR:_Could_not_read_extracted_signature._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
xor esi, esi
pop ecx
pop ecx
cmp dword [ebp - 0x28], esi
jbe 0x40a5bd
push dword [ebp + esi*4 - 0x58]
call fcn.0040b0b8
inc esi
pop ecx
cmp esi, dword [ebp - 0x28]
jb 0x40a548
jmp 0x40a5bd
push str.ERROR:_Unknown_signature_algorithm_ID._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
xor esi, esi
pop ecx
pop ecx
cmp dword [ebp - 0x28], esi
jbe 0x40a5bd
push dword [ebp + esi*4 - 0x58]
call fcn.0040b0b8
inc esi
pop ecx
cmp esi, dword [ebp - 0x28]
jb 0x40a576
jmp 0x40a5bd
cmp eax, esi
jne 0x40a5a3
push str.ERROR:_Not_all_signatures_were_verified._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
pop ecx
pop ecx
jmp 0x40a5bd
push dword [ebp - 0x28]
push eax
push str.ERROR:_Only__d_of__d_signatures_were_verified._n
call fcn.0040e9f4
add eax, 0x40
push eax
call fcn.0040e8e8
add esp, 0x10
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040b2d4
leave
ret