Function at 0x46f770
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x408c
call fcn.004b81c0
mov eax, dword [0x4ff94c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
push esi
push 0x4000
mov dword [ebp - 0x4088], eax
lea eax, [ebp - 0x4014]
push 1
push eax
mov dword [ebp - 0x408c], ecx
mov dword [ebp - 0x4084], edx
mov dword [ebp - 0x4078], ebx
mov dword [ebp - 0x4074], 0
mov dword [ebx], 0
call dword [sym.imp.MSVCR100.dll_fread]
push esi
mov edi, eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 0x14
test edi, edi
js 0x46fb3e
cmp edi, 0x4000
je 0x46fb3e
mov dword [ebx], str.file_format_error
cmp edi, 1
jl 0x46fb44
cmp byte [ebp - 0x4014], 0
jne 0x46fb44
lea ecx, [edi - 1]
cmp ecx, 1
jl 0x46fb44
movzx eax, byte [ebp - 0x4013]
mov dword [ebp - 0x4080], eax
test eax, eax
je 0x46f832
cmp eax, 3
jne 0x46fb44
lea edx, [edi - 2]
cmp edx, 4
jl 0x46fb44
cmp byte [ebp - 0x4012], 0
jne 0x46fb44
cmp byte [ebp - 0x4011], 0
jne 0x46fb44
cmp byte [ebp - 0x4010], 0
jne 0x46fb44
cmp byte [ebp - 0x400f], 0
jne 0x46fb44
mov eax, dword [ebp - 0x4088]
push 1
push 0
push eax
lea ecx, [ebp - 0x400e]
push edi
push ecx
call fcn.00471870
mov esi, eax
add esp, 0x14
add esi, 6
js 0x46fb44
movzx ebx, byte [ebp + esi - 0x4014]
movzx edx, byte [ebp + esi - 0x4013]
movzx eax, byte [ebp + esi - 0x4012]
movzx ecx, byte [ebp + esi - 0x4011]
shl ebx, 8
or ebx, edx
shl ebx, 8
or ebx, eax
shl ebx, 8
add esi, 4
mov edx, edi
or ebx, ecx
sub edx, esi
cmp edx, ebx
jl 0x46fb44
lea eax, [ebx + 1]
push 1
push eax
call fcn.00454380
add esp, 8
mov dword [ebp - 0x407c], eax
test eax, eax
je 0x46f90c
push ebx
lea ecx, [ebp + esi - 0x4014]
push ecx
push eax
call sub.MSVCR100.dll_memcpy
mov edx, dword [ebp - 0x407c]
add esp, 0xc
mov byte [edx + ebx], 0
mov eax, edx
add esi, ebx
mov ebx, dword [ebp - 0x408c]
test ebx, ebx
je 0x46f929
push eax
call fcn.00454630
mov dword [ebx], eax
mov eax, dword [ebp - 0x407c]
add esp, 4
mov ebx, dword [ebp - 0x4088]
test ebx, ebx
je 0x46f938
mov dword [ebx + 0x20], eax
jmp 0x46f941
push eax
call fcn.004544e0
add esp, 4
cmp dword [ebp + 0x10], 0
je 0x46f968
pop edi
mov dword [ebp - 0x4074], 1
mov eax, dword [ebp - 0x4074]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7f56
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x46f996
mov ecx, dword [ebp - 0x4078]
xor eax, eax
cmp dword [ebp - 0x4080], eax
pop edi
setne al
pop esi
mov dword [ecx], ebx
pop ebx
mov dword [ebp - 0x4074], eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7f56
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x4080], 0
je 0x46fa11
lea edx, [ebp - 0x4070]
push edx
call fcn.0046f150
mov eax, dword [ebp - 0x4084]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46f9b7
sub eax, edx
push eax
mov eax, dword [ebp - 0x4084]
push eax
lea ecx, [ebp - 0x4070]
push ecx
call fcn.0046f170
lea edx, [ebp - 0x4070]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.0046f2f0
mov ecx, edi
sub ecx, esi
add ecx, 7
and ecx, 0xfffffff8
push ecx
lea edx, [ebp + esi - 0x4014]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.0046cef0
add esp, 0x20
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov ecx, edi
sub ecx, esi
cmp ecx, 4
jl 0x46fb44
mov dl, byte [ebp + esi - 0x4014]
cmp dl, byte [ebp + esi - 0x4012]
jne 0x46fb11
mov al, byte [ebp + esi - 0x4013]
cmp al, byte [ebp + esi - 0x4011]
jne 0x46fb11
add esi, 4
mov ecx, edi
push ebx
sub ecx, esi
push ecx
lea edx, [ebp + esi - 0x4014]
push edx
call fcn.00471970
add esp, 0xc
test eax, eax
js 0x46fb44
add esi, eax
lea eax, [ebx + 0x1c]
push eax
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [ebp + esi - 0x4014]
push edx
call fcn.0046a3b0
add esp, 0xc
test eax, eax
js 0x46fb44
add esi, eax
lea eax, [ebx + 0x18]
push eax
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [ebp + esi - 0x4014]
push edx
call fcn.0046a3b0
add esp, 0xc
test eax, eax
js 0x46fb44
add esi, eax
lea eax, [ebx + 0x14]
push eax
sub edi, esi
lea ecx, [ebp + esi - 0x4014]
push edi
push ecx
call fcn.0046a3b0
add esp, 0xc
test eax, eax
js 0x46fb44
push ebx
call fcn.00472070
add esp, 4
test eax, eax
jne 0x46f947
mov edx, dword [ebp - 0x4078]
push ebx
mov dword [edx], str.rsa_verify_failed
call fcn.00472200
add esp, 4
pop edi
mov dword [ebp - 0x4074], 0
mov eax, dword [ebp - 0x4074]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7f56
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4078]
pop edi
mov dword [ebp - 0x4074], 0xffffffff
pop esi
mov dword [eax], str.wrong_passphrase
mov eax, dword [ebp - 0x4074]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b7f56
mov esp, ebp
pop ebp
ret
mov dword [ebx], str.error_reading_file
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x4074]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b7f56
mov esp, ebp
pop ebp
ret