Function at 0x41d330
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, 0x24
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
push edi
mov edi, eax
mov eax, dword [edi]
xor ebx, ebx
cmp eax, ebx
je 0x41d352
test dword [eax], 0xffffff00
je 0x41d352
cmp byte [eax + 4], bl
jne 0x41d362
mov dword [ebp + 4], ebx
mov dword [ebp], ebx
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
test dword [eax], 0xffffff00
je 0x41d382
cmp byte [eax + 4], bl
je 0x41d382
add eax, 4
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x41d375
sub eax, edx
jmp 0x41d384
xor eax, eax
shr eax, 1
mov dword [esp + 0x18], eax
mov esi, eax
jne 0x41d398
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
jmp 0x41d3af
push eax
call fcn.0044ce70
mov dword [esp + 0x28], eax
add esp, 4
neg eax
sbb eax, eax
and eax, esi
mov dword [esp + 0x20], eax
push edi
lea eax, [esp + 0x24]
call fcn.0046fec0
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
add esp, 4
push ebx
push 1
push ebx
push ebx
lea eax, [esp + 0x20]
push eax
call esi
test eax, eax
jne 0x41d438
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x41d409
push 8
push 1
push ebx
push ebx
lea ecx, [esp + 0x20]
push ecx
call esi
test eax, eax
jne 0x41d438
lea esi, [esp + 0x20]
mov dword [ebp + 4], ebx
mov dword [ebp], ebx
call fcn.00469930
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [esp + 0x20], ebx
mov dword [ebp + 4], ebx
mov dword [ebp], ebx
je 0x41d552
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x41d552
push eax
call fcn.0044d390
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push ebx
push ebx
push 0x8004
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx]
cmp edx, ebx
je 0x41d47d
test dword [edx], 0xffffff00
je 0x41d47d
cmp byte [edx + 4], bl
je 0x41d47d
lea eax, [edx + 4]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x41d470
sub eax, esi
jmp 0x41d47f
xor eax, eax
cmp edx, ebx
je 0x41d488
lea ecx, [edx + 4]
jmp 0x41d48a
xor ecx, ecx
mov edx, dword [esp + 0x14]
push ebx
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ebx
push ecx
push 0x6602
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
push edi
push ebx
push 1
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov edx, dword [esp + 0x10]
push ebx
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp esi, ebx
je 0x41d539
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x41d4e3
sub eax, edx
cmp eax, dword [esp + 0x18]
ja 0x41d539
push edi
lea esi, [esp + 0x2c]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
call fcn.0046f8f0
mov ecx, dword [esp + 0x20]
mov eax, edi
call fcn.0046f9c0
mov eax, esi
push eax
mov eax, ebp
mov dword [ebp + 4], ebx
mov dword [ebp], ebx
call fcn.004188b0
call fcn.0046f8b0
lea esi, [esp + 0x20]
call fcn.00469930
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp dword [esp + 0x20], ebx
mov dword [ebp + 4], ebx
mov dword [ebp], ebx
je 0x41d552
cmp edi, ebx
je 0x41d552
push edi
call fcn.0044d390
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret