Function at 0x42f870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x40c4
call fcn.00444bf0
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 4]
mov ecx, 1
mov dword [ebp - 8], esi
mov esi, 0x4000
mov ebx, eax
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0x14]
xor edi, edi
mov dword [ebp - 0x408c], edx
lea edx, [ebp - 0x4018]
mov dword [eax], 0
mov dword [ebp - 0x4098], edi
mov dword [esp], edx
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp + 0xc], ebx
call sub.msvcrt.dll_fread
mov dword [esp], ebx
mov esi, eax
call sub.msvcrt.dll_fclose
mov edx, esi
xor eax, eax
shr edx, 0x1f
cmp esi, 0x4000
sete al
or edx, eax
jne 0x42fb40
mov edi, dword [ebp + 0x14]
test esi, esi
mov dword [edi], str.file_format_error
jle 0x42fb10
cmp byte [ebp - 0x4018], 0
jne 0x42fb10
lea eax, [esi - 1]
test eax, eax
jle 0x42fb10
movzx ebx, byte [ebp - 0x4017]
test ebx, ebx
setne al
xor edx, edx
cmp ebx, 3
setne dl
test eax, edx
jne 0x42fb10
lea eax, [esi - 2]
cmp eax, 3
jle 0x42fb10
cmp byte [ebp - 0x4016], 0
jne 0x42fb10
cmp byte [ebp - 0x4015], 0
jne 0x42fb10
cmp byte [ebp - 0x4014], 0
jne 0x42fb10
cmp byte [ebp - 0x4013], 0
jne 0x42fb10
mov dword [esp + 4], esi
xor eax, eax
mov edx, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x408c]
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x4012]
mov dword [esp], eax
call fcn.004323c0
mov ecx, eax
mov edx, eax
add ecx, 6
mov dword [ebp - 0x4090], ecx
js 0x42fb10
movzx edi, byte [ecx + ebp - 0x4018]
add edx, 0xa
shl edi, 0x18
mov dword [ebp - 0x4094], edi
movzx eax, byte [ebp + ecx - 0x4017]
shl eax, 0x10
or edi, eax
mov dword [ebp - 0x4094], edi
movzx eax, byte [ebp + ecx - 0x4016]
shl eax, 8
or edi, eax
mov dword [ebp - 0x4094], edi
movzx eax, byte [ebp + ecx - 0x4015]
mov dword [ebp - 0x4090], edx
or edi, eax
mov eax, esi
mov dword [ebp - 0x4094], edi
sub eax, edx
cmp eax, edi
jl 0x42fb10
mov eax, 1
mov dword [esp + 4], eax
mov eax, edi
inc eax
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x409c], eax
test eax, eax
je 0x42fa53
mov dword [esp + 8], edi
mov edx, dword [ebp - 0x4090]
mov ecx, dword [ebp - 0x409c]
lea eax, [edx + ebp - 0x4018]
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x409c]
mov byte [edi + eax], 0
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x4094]
add dword [ebp - 0x4090], edx
test eax, eax
je 0x42fa79
mov ecx, dword [ebp - 0x409c]
mov dword [esp], ecx
call fcn.00403ca0
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
mov eax, dword [ebp - 0x408c]
test eax, eax
je 0x42fbd6
mov edx, dword [ebp - 0x409c]
mov eax, dword [ebp - 0x408c]
mov dword [eax + 0x20], edx
mov eax, dword [ebp + 8]
test eax, eax
jne 0x42fb4b
mov edi, dword [ebp - 0x408c]
test edi, edi
je 0x42fbe9
test ebx, ebx
jne 0x42fb58
mov edi, dword [ebp - 0x4090]
mov eax, esi
sub eax, edi
cmp eax, 3
jle 0x42fb10
mov edx, dword [ebp - 0x4090]
movzx eax, byte [edx + ebp - 0x4016]
cmp byte [edx + ebp - 0x4018], al
jne 0x42faf2
movzx eax, byte [edx + ebp - 0x4015]
cmp byte [edx + ebp - 0x4017], al
je 0x42fc04
mov ecx, dword [ebp + 0x14]
mov esi, 0xffffffff
mov dword [ebp - 0x4098], esi
mov dword [ecx], str.wrong_passphrase
lea esi, [esi]
lea edi, [edi]
mov edx, 0x4000
xor eax, eax
mov dword [esp + 8], edx
lea edx, [ebp - 0x4018]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x4098]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x14]
mov dword [ecx], str.error_reading_file
jmp 0x42fb10
mov eax, 1
mov dword [ebp - 0x4098], eax
jmp 0x42fb10
lea ebx, [ebp - 0x4088]
mov dword [esp], ebx
call fcn.0042ea80
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
mov edx, dword [ebp + 0x10]
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.0042eac0
mov dword [esp + 4], ebx
lea ebx, [ebp - 0x4028]
mov edi, ebx
mov dword [esp], ebx
call fcn.0042f400
mov dword [esp], ebx
mov ecx, dword [ebp - 0x4090]
mov eax, esi
mov edx, dword [ebp - 0x4090]
sub eax, ecx
add eax, 7
and eax, 0xfffffff8
mov dword [esp + 8], eax
lea eax, [ebp - 0x4018]
add eax, edx
mov dword [esp + 4], eax
call fcn.0042c8a0
cld
mov eax, dword [ebp + 8]
mov ecx, 4
rep stosd dword es:[edi], eax
jmp 0x42fab7
mov ecx, dword [ebp - 0x409c]
mov dword [esp], ecx
call fcn.00403f40
jmp 0x42fa96
mov edi, dword [ebp + 0x14]
xor eax, eax
test ebx, ebx
setne al
mov dword [ebp - 0x4098], eax
mov dword [edi], 0
jmp 0x42fb10
add dword [ebp - 0x4090], 4
mov eax, esi
mov edi, dword [ebp - 0x408c]
mov ebx, dword [ebp - 0x4090]
mov ecx, dword [ebp - 0x4090]
mov dword [esp + 8], edi
sub eax, ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x4018]
add eax, ecx
mov dword [esp], eax
call fcn.00432510
mov dword [ebp - 0x4094], eax
test eax, eax
js 0x42fb10
add dword [ebp - 0x4090], eax
mov eax, edi
add eax, 0x1c
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x4090]
mov eax, esi
mov ebx, dword [ebp - 0x4090]
sub eax, edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x4018]
add eax, ebx
mov dword [esp], eax
call fcn.00429680
mov dword [ebp - 0x4094], eax
test eax, eax
js 0x42fb10
add dword [ebp - 0x4090], eax
mov eax, edi
add eax, 0x18
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x4090]
mov eax, esi
mov edx, dword [ebp - 0x4090]
sub eax, ecx
mov dword [esp + 4], eax
lea eax, [ebp - 0x4018]
add eax, edx
mov dword [esp], eax
call fcn.00429680
mov dword [ebp - 0x4094], eax
test eax, eax
js 0x42fb10
add dword [ebp - 0x4090], eax
mov eax, edi
add eax, 0x14
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4090]
sub esi, eax
mov dword [esp + 4], esi
mov esi, dword [ebp - 0x4090]
lea eax, [ebp - 0x4018]
add eax, esi
mov dword [esp], eax
call fcn.00429680
test eax, eax
js 0x42fb10
mov dword [esp], edi
call fcn.00432d90
mov ebx, 1
test eax, eax
mov dword [ebp - 0x4098], ebx
jne 0x42fb10
mov eax, dword [ebp + 0x14]
mov dword [eax], str.rsa_verify_failed
mov dword [esp], edi
call fcn.00433020
xor ecx, ecx
mov dword [ebp - 0x4098], ecx
jmp 0x42fb10