Function at 0x52e700
Capabilities:
Encrypt data using rc4 via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x20
push edi
mov edi, dword [esp + 0x28]
mov ecx, edi
call fcn.0051d090
cmp eax, 0x1c
jae 0x52e72b
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
push str.Not_enough_bytes_to_be_a_PVK
call edx
xor al, al
pop edi
add esp, 0x20
ret
mov ecx, dword [esp + 0x30]
push ebx
push ebp
push esi
call fcn.00446f40
mov ecx, edi
call fcn.00446f60
mov esi, eax
mov eax, dword [esi + 0xc]
mov ebp, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
mov ecx, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ebp
call fcn.0051d090
sub eax, 0x18
cmp eax, ebx
jae 0x52e779
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Not_enough_bytes_for_PVK_salt
call eax
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
add esi, 0x18
mov dword [esp + 0x24], esi
add esi, ebx
sub eax, ebx
mov dword [esp + 0x2c], esi
cmp eax, ebp
jae 0x52e7a6
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Not_enough_bytes_for_PVK_key
call eax
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
xor ebp, ebp
push ebp
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
lea ecx, [esp + 0x1c]
push ebp
push ecx
mov dword [esp + 0x24], ebp
call fcn.004359a0
mov esi, dword [esp + 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x14
test eax, eax
jne 0x52e85d
call edi
cmp eax, 0x80090016
jne 0x52e802
push 8
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
lea edx, [esp + 0x1c]
push ebp
push edx
call fcn.004359a0
add esp, 0x14
test eax, eax
jne 0x52e85d
call edi
push eax
push str.errorCode2
jmp 0x52e856
cmp eax, 2
jne 0x52e850
push 0x20
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
lea eax, [esp + 0x1c]
push ebp
push eax
call fcn.004359a0
add esp, 0x14
test eax, eax
jne 0x52e85d
call edi
cmp eax, 0x80090016
jne 0x52e85d
push 0x28
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
lea ecx, [esp + 0x1c]
push ebp
push ecx
call fcn.004359a0
add esp, 0x14
test eax, eax
jne 0x52e85d
call edi
push eax
push str.errorCode3
jmp 0x52e856
push eax
push str.errorCode
mov ecx, esi
call fcn.00437500
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x52e87d
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_acquire_context_for_PVK_session_key
mov ecx, esi
call eax
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x20], ebp
je 0x52e9b9
lea ecx, [esp + 0x14]
push ecx
push ebp
push ebp
push 0x8004
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x52e8ca
mov edx, dword [esp + 0x10]
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_create_SHA1_hash_for_PVK_session_key
mov ecx, esi
call edx
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
cmp ebx, ebp
je 0x52e915
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
push ebp
push ebx
push eax
push ecx
call edi
test eax, eax
jne 0x52e915
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_hash_salt.
mov ecx, esi
call eax
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov ebx, dword [esp + 0x38]
push ebp
mov ecx, ebx
call fcn.0040fe60
push eax
mov ecx, ebx
call fcn.0040ef50
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call edi
mov edx, dword [esp + 0x14]
test eax, eax
jne 0x52e964
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Failed_to_hash_password.
mov ecx, esi
call eax
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push 1
push edx
push 0x6801
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x52e9af
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esp + 0x10]
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_derive_session_key_for_PVK.
mov ecx, esi
call edx
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x2c]
push 1
push edx
mov edx, dword [esp + 0x38]
push ecx
push edx
push eax
mov dword [esp + 0x34], ebp
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x52ea27
call edi
push eax
push str.errorCode
mov ecx, esi
call fcn.00437500
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov edx, dword [esp + 0x10]
push ebp
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [esi]
mov edx, dword [eax + 0x14]
push str.Failed_to_import_private_key.
mov ecx, esi
call edx
pop esi
pop ebp
pop ebx
xor al, al
pop edi
add esp, 0x20
ret
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
push esi
push eax
push ecx
push edx
call fcn.0052e370
mov esi, dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov bl, al
mov eax, dword [esp + 0x2c]
add esp, 0x10
push eax
call esi
cmp dword [esp + 0x20], ebp
je 0x52ea66
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [esp + 0x10]
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
pop ebp
mov al, bl
pop ebx
pop edi
add esp, 0x20
ret