Function at 0x6117b655
Capabilities:
Encrypt data using rc4 via winapi
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
xor edi, edi
mov esi, edx
mov dword [ebp - 0x20], esi
mov ebx, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
test ecx, ecx
je 0x6117b8c6
cmp dword [ebp + 0x18], ebx
je 0x6117b8c6
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea edx, [ebp - 0x1c]
call fcn.6117b4f6
add esp, 0xc
test eax, eax
jne 0x6117b6be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x6117b7f4
xor eax, eax
mov ecx, edi
inc eax
cmp dword [ebp - 0x14], 0x661e
cmove ecx, eax
lea eax, [ebp - 8]
push eax
mov eax, 0x800e
mov dword [ebp - 0x30], ecx
push edi
test ecx, ecx
push edi
lea edx, [eax + 0x14]
cmovne eax, edx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x6117b6b1
push edi
lea eax, [ebp - 0x10]
push eax
push edi
push 2
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x6117b6b1
push dword [ebp - 0x10]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x2c], esi
test esi, esi
jne 0x6117b722
mov ebx, 0x8009000e
jmp 0x6117b7f4
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 1
push dword [ebp - 0x1c]
push dword [ebp + 8]
push dword [ebp - 0x20]
call dword [ebp - 0x24]
add esp, 0x24
test eax, eax
je 0x6117b6b1
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
sub eax, ecx
push eax
push edi
lea eax, [esi + ecx]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push edi
push esi
push 2
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
je 0x6117b6b1
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x14]
shl eax, 0x13
cmp esi, 0x6602
je 0x6117b78d
cmp esi, 0x6801
jne 0x6117b790
or eax, 0x10
lea ecx, [ebp - 4]
or eax, 1
push ecx
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x6117b6b1
cmp dword [ebp - 0x30], ebx
je 0x6117b837
mov esi, dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
push edi
push str.1.2.643.2.2.31.1
push 0x68
push dword [ebp - 4]
call esi
test eax, eax
je 0x6117b6b1
cmp dword [ebp + 0x10], ebx
je 0x6117b7e9
push edi
push dword [ebp + 0x10]
push 1
push dword [ebp - 4]
call esi
test eax, eax
je 0x6117b6b1
mov ecx, dword [ebp + 0x18]
xor edi, edi
mov eax, dword [ebp - 4]
inc edi
mov dword [ecx], eax
push dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push dword [ebp - 0x2c]
call esi
cmp dword [ebp - 8], 0
je 0x6117b813
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test edi, edi
jne 0x6117b830
cmp dword [ebp - 4], edi
je 0x6117b825
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test ebx, ebx
je 0x6117b830
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x6117b8d0
cmp esi, 0x6801
je 0x6117b7e9
push edi
lea eax, [ebp - 0x30]
xor esi, esi
push eax
push 4
push dword [ebp - 4]
inc esi
mov dword [ebp - 0x30], esi
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
test eax, eax
je 0x6117b6b1
push edi
lea eax, [ebp - 0x18]
push eax
push edi
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetKeyParam]
test eax, eax
je 0x6117b6b1
push dword [ebp - 0x18]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x6117b718
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 2
push dword [ebp - 0x1c]
push dword [ebp + 8]
push dword [ebp - 0x20]
call dword [ebp - 0x24]
add esp, 0x24
test eax, eax
je 0x6117b6b1
push edi
push esi
push 1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptSetKeyParam]
jmp 0x6117b7e1
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret