Function at 0x401030
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt
Generate random numbers via winapi
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x41e380]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], str.C:Usersh4ckl4bDesktop_test.docx
mov dword [ebp - 0x38], str.C:Usersh4ckl4bDesktop_test_encrypted.docx
mov eax, dword [ebp - 0x30]
push eax
push str.Intentando_abrir_el_archivo_original:__s_n
call fcn.00401340
add esp, 8
push 0x41e098
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0040474f
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x401086
push str.No_se_pudo_abrir_el_archivo_original
call fcn.00401000
add esp, 4
push str.Archivo_abierto_exitosamente._Leyendo_el_contenido..._n
call fcn.00401340
add esp, 4
push 2
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.00404d63
add esp, 0xc
mov eax, dword [ebp - 0x18]
push eax
call fcn.004053c2
add esp, 4
mov dword [ebp - 0x28], eax
push 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00404d63
add esp, 0xc
mov edx, dword [ebp - 0x28]
add edx, 0x10
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
push eax
call fcn.0040775d
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4010ed
push str.No_se_pudo_asignar_memoria_para_el_contenido_del_archivo
call fcn.00401000
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x28]
push edx
push 1
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040493f
add esp, 0x10
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00404668
add esp, 4
mov dword [ebp - 0x24], 0
push 0xf0000000
push 0x18
push 0
push 0
lea edx, [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40113c
push str.No_se_pudo_adquirir_el_contexto_criptogrfico
call fcn.00401000
add esp, 4
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x20]
push eax
push 1
push 0x6610
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x401169
push str.No_se_pudo_generar_la_clave_de_cifrado
call fcn.00401000
add esp, 4
lea edx, [ebp - 0x14]
push edx
push 0x10
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x40118a
push str.No_se_pudo_generar_el_vector_de_inicializacin
call fcn.00401000
add esp, 4
push 0
lea ecx, [ebp - 0x14]
push ecx
push 1
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x4011ad
push str.No_se_pudo_establecer_el_vector_de_inicializacin_en_la_clave
call fcn.00401000
add esp, 4
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x34]
push ecx
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 1
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x4011e0
push str.No_se_pudo_cifrar_el_archivo
call fcn.00401000
add esp, 4
mov edx, dword [ebp - 0x38]
push edx
push str.Cifrado_exitoso._Guardando_el_archivo_cifrado_en:__s_n
call fcn.00401340
add esp, 8
push 0x41e258
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040474f
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x401218
push str.No_se_pudo_abrir_el_archivo_cifrado_para_escribir
call fcn.00401000
add esp, 4
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push 1
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004056b7
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00404668
add esp, 4
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.00407742
add esp, 4
push str.Archivo_cifrado_guardado_correctamente._Eliminando_el_archivo_original..._n
call fcn.00401340
add esp, 4
mov edx, dword [ebp - 0x30]
push edx
call fcn.00405a63
add esp, 4
test eax, eax
je 0x401286
push str.No_se_pudo_eliminar_el_archivo_original
call fcn.00401000
add esp, 4
push str.Archivo_original_eliminado._Operacin_completada._n
call fcn.00401340
add esp, 4
push str.Presiona_Enter_para_salir..._n
call fcn.00401340
add esp, 4
call fcn.00405856
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040137a
mov esp, ebp
pop ebp
ret