Function at 0x41d100
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, 0x24
push ebx
mov ebx, dword [esp + 0x30]
cmp dword [ebx], 0
push ebp
push esi
push edi
mov edi, eax
je 0x41d30a
mov eax, dword [ebx + 4]
cmp byte [eax], 0
je 0x41d30a
mov eax, dword [edi]
test eax, eax
je 0x41d30a
test dword [eax], 0xffffff00
je 0x41d30a
cmp byte [eax + 4], 0
je 0x41d30a
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push 0xf0000000
push 1
push 0
push 0
lea ecx, [esp + 0x28]
push ecx
call esi
test eax, eax
jne 0x41d189
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x41d30a
push 0xf0000008
push 1
push 0
push 0
lea edx, [esp + 0x28]
push edx
call esi
test eax, eax
je 0x41d30a
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edx, dword [edi]
test edx, edx
je 0x41d1cd
test dword [edx], 0xffffff00
je 0x41d1cd
cmp byte [edx + 4], 0
je 0x41d1cd
lea eax, [edx + 4]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41d1c0
sub eax, esi
jmp 0x41d1cf
xor eax, eax
test edx, edx
je 0x41d1d8
add edx, 4
jmp 0x41d1da
xor edx, edx
push 0
push eax
push edx
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
push 0
push ecx
push 0x6602
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
cmp dword [ebx], 0
jne 0x41d20e
xor eax, eax
jmp 0x41d21f
mov eax, dword [ebx + 4]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41d214
sub eax, edx
mov ecx, dword [esp + 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
add eax, 1
push 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
push 1
push 0
push ecx
call edi
mov eax, dword [esp + 0x14]
test eax, eax
mov ebp, eax
jne 0x41d256
xor esi, esi
xor ebx, ebx
jmp 0x41d26d
push eax
call fcn.0044ce70
mov esi, eax
mov eax, dword [esp + 0x18]
add esp, 4
mov ebx, esi
neg ebx
sbb ebx, ebx
and ebx, ebp
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [edx + 4]
push eax
push esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], esi
call fcn.0052f110
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
add esp, 0xc
push ecx
lea edx, [esp + 0x28]
push edx
push esi
push 0
push 1
push 0
push eax
call edi
mov ecx, dword [esp + 0x18]
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x2c]
mov dword [esp + 0x40], 0
call fcn.0046ffe0
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x3c]
add esp, 4
test eax, eax
mov dword [ebp], eax
je 0x41d2e6
movzx ecx, byte [eax]
cmp ecx, 0x80
jae 0x41d2e6
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea edi, [esp + 0x3c]
call fcn.00401070
test ebx, ebx
je 0x41d300
test esi, esi
je 0x41d300
push esi
call fcn.0044d390
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edi, dword [esp + 0x38]
push 0x543bb1
xor eax, eax
mov dword [edi], 0
call fcn.0044a090
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret