Function at 0x46a220
Capabilities:
Encrypt or decrypt via wincrypt
Get file size
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485ae0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x4b700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], edx
cmp dword [ecx + 0x14], 8
jb 0x46a253
mov ecx, dword [ecx]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46a2bf
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 0
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_open_input_file.
call fcn.0045d100
mov byte [ebp - 4], 1
mov dword [ebp - 4], ebx
or ecx, ebx
call fcn.0045f800
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.0046e565
add esp, 4
mov edi, eax
lea eax, [ebp - 0x1c]
push 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46a349
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 2
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_read_input_file.
call fcn.0045d100
mov byte [ebp - 4], 3
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0046e56e
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x46a3c3
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 4
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.CryptAcquireContext_failed.
call fcn.0045d100
mov byte [ebp - 4], 5
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
push edi
call fcn.0046e56e
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x8004
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x46a442
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 6
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.CryptCreateHash_failed.
call fcn.0045d100
mov byte [ebp - 4], 7
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
add esp, 8
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call fcn.0046e56e
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x14], 8
mov eax, dword [ecx + 0x10]
jb 0x46a450
mov ecx, dword [ecx]
push 0
add eax, eax
push eax
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x46a4d1
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 8
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.CryptHashData_failed.
call fcn.0045d100
mov byte [ebp - 4], 9
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
add esp, 8
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call fcn.0046e56e
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18]
push eax
push 1
push dword [ebp - 0x14]
push 0x6602
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x46a51c
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 0xa
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.CryptDeriveKey_failed.
call fcn.0045d100
mov byte [ebp - 4], 0xb
jmp 0x46a48e
lea eax, [ebp - 0x1c]
push eax
push edi
push 0
push 1
push 0
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x46a57f
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 0xc
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.CryptDecrypt_failed.
call fcn.0045d100
mov byte [ebp - 4], 0xd
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
add esp, 8
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x46a4a0
mov ebx, dword [ebp - 0x20]
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x46a58c
mov eax, dword [ebx]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
jne 0x46a5da
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 0xe
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_create_output_file.
call fcn.0045d100
mov byte [ebp - 4], 0xf
jmp 0x46a55f
mov eax, dword [ebp - 0x1c]
xor esi, esi
test eax, eax
je 0x46a609
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isprint]
nop dword [eax]
movzx eax, byte [esi + edi]
push eax
call ebx
add esp, 4
test eax, eax
mov eax, dword [ebp - 0x1c]
jne 0x46a606
inc esi
cmp esi, eax
jb 0x46a5f0
mov ebx, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 0x28]
sub eax, esi
push ecx
push eax
lea eax, [esi + edi]
mov esi, dword [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x46a677
push ecx
mov ecx, esp
mov dword [ebp - 0x24], esp
push 0x488924
call fcn.0045d100
mov dword [ebp - 4], 0x10
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_write_to_output_file.
call fcn.0045d100
mov byte [ebp - 4], 0x11
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
push esi
call eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x46a4a0
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call fcn.0046e56e
add esp, 4
mov edx, ebx
mov ecx, ebx
call fcn.00469bd0
push ecx
mov dword [ebp - 0x24], esp
mov ecx, esp
push 0x488924
test al, al
je 0x46a6df
call fcn.0045d100
mov dword [ebp - 4], 0x12
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.File_converted_to_UTF_8_and_saved_successfully.
call fcn.0045d100
mov byte [ebp - 4], 0x13
jmp 0x46a6ff
call fcn.0045d100
mov dword [ebp - 4], 0x14
push ecx
mov ecx, esp
mov dword [ebp - 0x20], esp
push str.Failed_to_convert_and_save_the_file.
call fcn.0045d100
mov byte [ebp - 4], 0x15
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
call fcn.0045f800
add esp, 8
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret