Function at 0x10001640
Capabilities:
Encrypt data using rc4 via winapi
Encrypt or decrypt via wincrypt
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10035a00
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x10051070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x74], ecx
cmp dword [ebp + 0xc], 0
jle 0x10001680
mov ecx, dword [ebp - 0x74]
call fcn.10001550
test eax, eax
jne 0x10001685
jmp 0x10001924
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x68], 0
mov eax, dword [ebp - 0x74]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 0x10], 0
je 0x100017ae
lea ecx, [ebp - 0x68]
push ecx
push 0
push 0
push 0x8003
mov edx, dword [ebp - 0x74]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x100016fc
mov dword [ebp - 0x9c], 0
push str.CryptCreateHash_error
lea ecx, [ebp - 0xa8]
call fcn.100011a0
push 0x1004fd9c
lea ecx, [ebp - 0xa8]
push ecx
call fcn.10023357
push 0
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x68]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x10001735
push str.CryptHashData_error
lea ecx, [ebp - 0xb4]
call fcn.100011a0
push 0x1004fd9c
lea edx, [ebp - 0xb4]
push edx
call fcn.10023357
lea eax, [ebp - 0x84]
push eax
push 0
mov ecx, dword [ebp - 0x68]
push ecx
push 0x6801
mov edx, dword [ebp - 0x74]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x10001778
push str.CryptDeriveKey_error
lea ecx, [ebp - 0xc0]
call fcn.100011a0
push 0x1004fd9c
lea ecx, [ebp - 0xc0]
push ecx
call fcn.10023357
mov edx, dword [ebp - 0x68]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test eax, eax
jne 0x100017a7
push str.CryptDestroyHash_error
lea ecx, [ebp - 0xcc]
call fcn.100011a0
push 0x1004fd9c
lea eax, [ebp - 0xcc]
push eax
call fcn.10023357
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x78], 0x3e8
mov edx, dword [ebp + 8]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x6c], 0
mov ecx, dword [ebp - 0x80]
sub ecx, dword [ebp - 0x64]
cmp ecx, dword [ebp - 0x78]
jbe 0x100017f2
mov edx, dword [ebp - 0x64]
add edx, dword [ebp - 0x78]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x70], 0
jmp 0x1000180b
mov ecx, dword [ebp - 0x80]
sub ecx, dword [ebp - 0x64]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x64]
add edx, dword [ebp - 0x6c]
mov dword [ebp - 0x64], edx
mov dword [ebp - 0x70], 1
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x7c]
push ecx
push 0
mov edx, dword [ebp - 0x70]
push edx
push 0
mov eax, dword [ebp - 0x84]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x100018fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x8c], eax
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
push str.Error_Code:
lea ecx, [ebp - 0x60]
call fcn.10001c90
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x90], edx
mov dword [ebp - 4], 0
push 0xa
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x8c]
push ecx
call fcn.1002a0f6
add esp, 0xc
push eax
mov edx, dword [ebp - 0x90]
push edx
lea eax, [ebp - 0x48]
push eax
call fcn.10002a00
add esp, 0xc
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x98], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x98]
call fcn.100019c0
push eax
lea ecx, [ebp - 0xd8]
call fcn.100011a0
push 0x1004fd9c
lea edx, [ebp - 0xd8]
push edx
call fcn.10023357
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.10001ad0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.10001ad0
cmp dword [ebp - 0x70], 0
jne 0x1000190d
mov eax, dword [ebp - 0x7c]
add eax, dword [ebp - 0x6c]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x70], 0
je 0x100017cf
mov ecx, dword [ebp - 0x74]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1000afc9
mov esp, ebp
pop ebp
ret 0x10