Function at 0x409894
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc94
mov eax, dword [0x708c34]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, str.o6806642kbM7c5
mov eax, dword [ebp + 0xc]
lea edi, [ebp - 0x14]
mov ebx, dword [ebp + 8]
push 9
pop ecx
movsd dword es:[edi], dword [esi]
push ebx
mov dword [ebp - 0xc94], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, str.72905C47_F4FD_4CF7_A489_4E8121A155BD
lea edi, [ebp - 0x3c]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, str.DecryptEMClientPassword
mov byte [eax], 0
push edi
push str._n_n_s_Entered_with_enc_password__s
call fcn.00449974
add esp, 0xc
lea eax, [ebp - 0xc58]
mov esi, 0x3e8
push esi
push 0x20
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00631510
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00631510
pop ecx
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00410563
add esp, 0x1c
test eax, eax
jne 0x409940
push edi
push str._s:_Generate_Pkcs5_Pbkdf2_Key_failed_to_generate_pass_key
call fcn.00449974
pop ecx
pop ecx
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005fe955
leave
ret
push 0x20
push str.___Success__Final_Pass_Key_is__d
call fcn.00449974
push str.u00
push ebx
call fcn.00627320
add esp, 0x10
test eax, eax
je 0x40997b
push ebx
call fcn.00449c72
pop ecx
push ebx
push ebx
call fcn.00631510
pop ecx
push eax
push str.After_replacing_unicode__len_d___text_s
call fcn.00449974
add esp, 0xc
push esi
lea eax, [ebp - 0x488]
push eax
push ebx
call fcn.00445e29
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4099a3
push ebx
push edi
push str._s:_DecodeBase64Data_failed_to_decode_input_data__s
call fcn.00449974
add esp, 0xc
jmp 0x40992f
push esi
push ebx
call fcn.00631510
pop ecx
push eax
push edi
push str._s:_DecodeBase64Data_Success___Input_Pass_length__d__Decoded_Pass_Length_d
call fcn.00449974
add esp, 0x10
push 0x10
pop ebx
cmp dword [ebp - 0x488], ebx
je 0x4099d3
push dword [ebp - 0x488]
push edi
push str._s:_Decoded_IV_Size___d__is_not_16_..returning_now
jmp 0x409999
push ebx
push str.__Input_IV_size___d__IV_data___n
call fcn.00449974
push ebx
lea eax, [ebp - 0x484]
push eax
lea eax, [ebp - 0xa0]
push eax
call fcn.006269d0
lea eax, [ebp - 0xa0]
push ebx
push eax
call fcn.004498ca
add esi, 0xffffffec
lea eax, [ebp - 0x474]
push esi
push eax
lea eax, [ebp - 0x870]
push eax
call fcn.006269d0
push esi
push str.___Encrypted_Password__size__d__Password_data_n
call fcn.00449974
lea eax, [ebp - 0x870]
push esi
push eax
call fcn.004498ca
push 0x20
pop eax
push eax
mov dword [ebp - 0xc7c], eax
lea eax, [ebp - 0xc58]
push eax
lea eax, [ebp - 0xc78]
mov dword [ebp - 0xc84], 0x208
push eax
mov dword [ebp - 0xc80], 0x6610
call fcn.006269d0
add esp, 0x44
lea eax, [ebp - 0xc8c]
xor ebx, ebx
push 0xf0000000
push 0x18
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x409a90
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._s:_CryptAcquireContext_failed__Error0x_.8x
jmp 0x409999
lea eax, [ebp - 0xc88]
push eax
push ebx
push ebx
push 0x2c
lea eax, [ebp - 0xc84]
push eax
push dword [ebp - 0xc8c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x409ac4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._s:_CryptImportKey_failed__Error0x_.8x
jmp 0x409999
push ebx
lea eax, [ebp - 0xa0]
push eax
push 1
push dword [ebp - 0xc88]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
jne 0x409af0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str._s:_CryptSetKeyParam_failed__Error0x_.8x
jmp 0x409999
lea eax, [ebp - 0xc90]
mov dword [ebp - 0xc90], esi
push eax
lea eax, [ebp - 0x870]
push eax
push ebx
push 1
push ebx
push dword [ebp - 0xc88]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x409b65
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0xc90]
push edi
push str._s:_CryptDecrypt_failed___returning___length_d___Error0x_.8x_n
call fcn.00449974
add esp, 0x10
cmp dword [ebp - 0xc88], ebx
je 0x409b47
push dword [ebp - 0xc88]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0xc8c], ebx
je 0x40992f
push ebx
push dword [ebp - 0xc8c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40992f
push dword [ebp - 0xc90]
push edi
push str._s:_Successfully_decrypted_the_password_of_size__d
call fcn.00449974
mov eax, dword [ebp - 0xc90]
mov ecx, 0x3e8
add esp, 0xc
cmp eax, ecx
jae 0x409be3
mov esi, dword [ebp - 0xc94]
mov byte [ebp + eax - 0x870], bl
lea eax, [ebp - 0x870]
push eax
push ecx
push esi
call fcn.006311ec
push esi
push edi
push str._s:___Decrypted_Password___s__n
call fcn.00449974
add esp, 0x18
cmp dword [ebp - 0xc88], ebx
je 0x409bc6
push dword [ebp - 0xc88]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0xc8c], ebx
je 0x409bdb
push ebx
push dword [ebp - 0xc8c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor eax, eax
inc eax
jmp 0x409931
call fcn.005fe87a
int3