Function at 0x5b60c0
Capabilities:
Create new key via cryptacquirecontext
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 esi
mov esi, dword [esp + 0x28]
mov eax, dword [esi]
test eax, eax
push edi
je 0x5b60e8
mov ecx, dword [eax]
shr ecx, 8
test ecx, ecx
je 0x5b60e8
test eax, eax
je 0x5b60e1
lea ecx, [eax + 4]
jmp 0x5b60e3
xor ecx, ecx
cmp byte [ecx], 0
jne 0x5b60fb
mov esi, dword [esp + 0x28]
mov ecx, esi
call fcn.005149b0
pop edi
mov eax, esi
pop esi
add esp, 0x1c
ret
test eax, eax
je 0x5b6104
lea edi, [eax + 4]
jmp 0x5b6106
xor edi, edi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
shr ecx, 1
mov dword [esp + 0xc], ecx
push ecx
lea ecx, [esp + 0x18]
call fcn.00499690
lea eax, [esp + 0x14]
push esi
push eax
call fcn.005df020
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
add esp, 8
push 0
push 1
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
jne 0x5b616f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x5b62d0
push 8
push 1
push 0
push 0
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x5b62d0
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edx, dword [esp + 0x30]
mov edx, dword [edx]
test edx, edx
je 0x5b61a1
or ecx, 0xffffffff
xor eax, eax
lea edi, [edx + 4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x5b61a3
xor ecx, ecx
test edx, edx
je 0x5b61ac
lea eax, [edx + 4]
jmp 0x5b61ae
xor eax, eax
push 0
push ecx
push eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov edx, dword [esp + 8]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push ecx
push 0
push edx
push 0x6602
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push edx
push 0
push 1
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ecx, dword [esp + 0x2c]
push 0
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test esi, esi
je 0x5b62c3
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0xc]
not ecx
dec ecx
cmp ecx, eax
ja 0x5b62c3
push ebp
lea ecx, [esp + 0x20]
call fcn.005149b0
mov edx, dword [esp + 0x1c]
push edx
lea ecx, [esp + 0x24]
call fcn.005149d0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call fcn.004d6d20
mov ebp, dword [esp + 0x34]
mov eax, dword [esp + 0x2c]
add esp, 8
test eax, eax
mov dword [ebp + 4], 0
mov dword [ebp], 0
mov ecx, ebp
jne 0x5b6280
call fcn.00499750
mov dword [ebp], 0
mov dword [ebp + 4], 0
jmp 0x5b62a8
mov edx, dword [esp + 0x20]
push 0
push edx
call fcn.00499780
test eax, eax
jne 0x5b62a8
mov ecx, dword [ebp]
mov esi, dword [esp + 0x24]
mov edi, dword [ebp + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
call fcn.005149c0
lea ecx, [esp + 0x18]
call fcn.004996f0
mov eax, ebp
pop ebp
pop edi
pop esi
add esp, 0x1c
ret
push str.decryption_failed_n
call fcn.005a2410
add esp, 4
mov esi, dword [esp + 0x28]
mov ecx, esi
call fcn.005149b0
lea ecx, [esp + 0x14]
call fcn.004996f0
pop edi
mov eax, esi
pop esi
add esp, 0x1c
ret