Function at 0x5b5e60
Capabilities:
Encrypt or decrypt via wincrypt
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x1c
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov ecx, ebp
call fcn.00514a50
test al, al
jne 0x5b6087
mov edi, dword [esp + 0x34]
mov eax, dword [edi]
test eax, eax
je 0x5b6087
mov ecx, dword [eax]
shr ecx, 8
test ecx, ecx
je 0x5b6087
test eax, eax
je 0x5b5e9d
add eax, 4
jmp 0x5b5e9f
xor eax, eax
cmp byte [eax], 0
je 0x5b6087
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push 0xf0000000
push 1
push 0
push 0
lea eax, [esp + 0x20]
push eax
call esi
test eax, eax
jne 0x5b5eef
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x5b6087
push 0xf0000008
push 1
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
call esi
test eax, eax
je 0x5b6087
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0x8004
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edx, dword [edi]
test edx, edx
je 0x5b5f1d
or ecx, 0xffffffff
xor eax, eax
lea edi, [edx + 4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x5b5f1f
xor ecx, ecx
test edx, edx
je 0x5b5f28
lea eax, [edx + 4]
jmp 0x5b5f2a
xor eax, eax
push 0
push ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push 0
push eax
push 0x6602
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
mov ecx, ebp
call fcn.00514a70
mov esi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push 0
lea edx, [esp + 0x10]
push edx
push 0
push 0
inc eax
push 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
push 0
push eax
call esi
mov ecx, dword [esp + 0xc]
push ecx
lea ecx, [esp + 0x24]
call fcn.00499690
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x24]
push edx
mov ecx, ebp
call fcn.00514a40
push eax
push edi
call fcn.00489040
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x30]
add esp, 0xc
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push edx
push 0
push 1
push 0
push eax
call esi
mov ecx, dword [esp + 0x10]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea edx, [esp + 0x30]
push edx
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x38], 0
call fcn.005df240
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
add esp, 8
test eax, eax
mov dword [ebp], eax
je 0x5b606d
mov ecx, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and ecx, 0xff
cmp ecx, 0x80
jae 0x5b6018
push eax
call edi
mov eax, dword [esp + 0x30]
test eax, eax
je 0x5b606d
mov edx, dword [eax]
and edx, 0xff
cmp edx, 0x80
mov esi, eax
jae 0x5b606d
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x7f
jne 0x5b605c
mov eax, dword [esi]
and eax, 0xff
cmp eax, 0x80
jae 0x5b6057
push esi
call edi
and eax, 0xff
jmp 0x5b605c
mov eax, 0xff
test eax, eax
jne 0x5b606d
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00499410
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], 0
call fcn.004996f0
pop edi
pop esi
mov eax, ebp
pop ebp
add esp, 0x1c
ret
mov esi, dword [esp + 0x2c]
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x6b6e10
mov dword [esi], eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, esi
push 0x6b6e10
call fcn.0049d9d0
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x1c
ret