Function at 0x40b170
Capabilities:
Create new key via cryptacquirecontext
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 0x49909d
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x4db064]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov esi, ecx
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
test eax, eax
je 0x40b4c9
cmp eax, 0xc800
jg 0x40b4c9
push 0
push 1
push 0
push dword [ebx]
lea eax, [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40b1f8
push 8
push 1
push eax
push dword [ebx]
lea eax, [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40b1f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
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 - 0x10]
push eax
push 0
push 0
push 0x8003
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40b23e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov esi, eax
test ecx, ecx
je 0x40b22a
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
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 eax, dword [esi + 4]
test eax, eax
jle 0x40b4e0
push 0
push eax
push dword [esi]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x40b295
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov esi, eax
test ecx, ecx
je 0x40b271
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x40b22a
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
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 dword [ebp - 0x10]
push 0x6801
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
jne 0x40b2ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x10]
mov esi, eax
test ecx, ecx
je 0x40b2c6
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x40b22a
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
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 eax, dword [ebp - 0x10]
test eax, eax
je 0x40b2fc
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [edi + 4]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x40b35b
push 1
push eax
call fcn.004808f7
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40b35b
mov eax, dword [edi + 4]
xor esi, esi
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x40b35b
test esi, esi
js 0x40b4e0
cmp esi, eax
jge 0x40b4e0
mov eax, dword [edi]
lea ecx, [ebp - 0x24]
add eax, esi
push eax
call fcn.0040bcd0
mov eax, dword [edi + 4]
inc esi
cmp esi, eax
jl 0x40b336
mov dword [ebp - 4], 0
cmp dword [ebp - 0x20], 0
mov eax, dword [edi + 4]
mov dword [ebp - 0x18], eax
jle 0x40b4e0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x24]
push 0
push 1
push 0
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x40b3bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40b3a2
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp + 8]
test eax, eax
je 0x40b489
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40b489
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x20]
mov ebx, dword [edi + 4]
cmp ebx, eax
je 0x40b407
mov ecx, dword [edi]
test ecx, ecx
je 0x40b3e0
push ecx
call fcn.00480864
mov eax, dword [ebp - 0x20]
add esp, 4
mov dword [edi], 0
push 1
push eax
mov dword [edi + 4], 0
mov dword [edi + 8], 0
call fcn.004808f7
add esp, 8
mov dword [edi], eax
test eax, eax
mov eax, dword [ebp - 0x20]
je 0x40b44c
mov dword [edi + 8], eax
jmp 0x40b44c
test ebx, ebx
jle 0x40b44c
lea esi, [ebx - 1]
nop
test esi, esi
js 0x40b443
mov edx, dword [edi + 4]
cmp esi, edx
jge 0x40b443
lea eax, [edx - 1]
cmp esi, eax
je 0x40b43d
mov ecx, dword [edi]
sub edx, esi
add ecx, ebx
lea eax, [edx - 1]
push eax
push ecx
push edx
lea eax, [ecx - 1]
push eax
call fcn.0040a0e0
mov edx, dword [edi + 4]
add esp, 0x10
lea eax, [edx - 1]
mov dword [edi + 4], eax
dec ebx
dec esi
test ebx, ebx
jg 0x40b410
mov eax, dword [ebp - 0x20]
xor esi, esi
test eax, eax
jle 0x40b477
test esi, esi
js 0x40b4e0
cmp esi, eax
jge 0x40b4e0
mov eax, dword [ebp - 0x24]
mov ecx, edi
add eax, esi
push eax
call fcn.0040bcd0
mov eax, dword [ebp - 0x20]
inc esi
cmp esi, eax
jl 0x40b452
mov eax, dword [ebp + 8]
test eax, eax
je 0x40b487
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor esi, esi
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x40b4a7
push ecx
call fcn.00480864
add esp, 4
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov eax, esi
mov dword [ebp - 0x1c], 0
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 eax, 0xd
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 1
push 0xc000008c
call fcn.00408700
int3