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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
xor ebx, ebx
cmp dword [ebp + 8], 0x41
mov dword [ebp - 0x28], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
jbe 0x479859
push esi
push edi
push 2
pop ecx
mov edi, str.SuppData
mov esi, eax
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x479550
lea ecx, [eax + 0x18]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x18], ecx
sub eax, 0x40
jmp 0x479559
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
add eax, 0xffffffc0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push 0x8004
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x479857
mov esi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
push ebx
push 0x20
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_CryptSignHashW]
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x47983b
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x47984e
lea ecx, [ebp - 8]
push ecx
push eax
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x14]
call edi
test eax, eax
je 0x47981d
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push 0x8004
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x479830
push ebx
push dword [ebp - 8]
push dword [ebp - 0x24]
push dword [ebp - 0x10]
call esi
mov edi, dword [ebp - 0x18]
push ebx
push 0x20
lea eax, [edi + 0x20]
push eax
push dword [ebp - 0x10]
call esi
lea eax, [ebp - 0x20]
push eax
push ebx
push dword [ebp - 0x10]
push 0x6801
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
test eax, eax
je 0x4797ff
lea eax, [ebp - 0x1c]
push eax
lea eax, [edi + 0x40]
push eax
push ebx
push 1
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x4797e1
mov ecx, dword [ebp - 0x1c]
push 0x40e8b7
lea eax, [ebp - 4]
push eax
add edi, 0x58
add ecx, 0xffffffe8
push edi
call fcn.0040ced3
add esp, 0xc
test eax, eax
je 0x4797f4
mov eax, dword [ebp - 4]
mov dword [ebp + 8], ebx
cmp dword [eax], ebx
jbe 0x4797d1
lea eax, [ebx + eax + 4]
push eax
push dword [ebp + 8]
push str.____u___wZ
call fcn.00409709
mov eax, dword [ebp - 4]
add esp, 0xc
push 1
lea eax, [ebx + eax + 4]
push eax
push 0x4a0eac
call sub.ntdll.dll_RtlEqualUnicodeString
test al, al
mov eax, dword [ebp - 4]
je 0x479722
mov esi, dword [ebx + eax + 0x10]
mov eax, dword [esi]
test eax, eax
je 0x4796e9
cmp eax, 4
je 0x4796c8
push eax
push str._nUnknown_version:__u_n
call fcn.00409709
jmp 0x47978c
test byte [esi + 4], 2
je 0x4797b2
push str._n__NTLM:
call fcn.00409709
add esi, 0xc
push 0x10
push esi
xor eax, eax
jmp 0x4797aa
test byte [esi + 4], 1
je 0x479709
push str._n____LM:
call fcn.00409709
lea eax, [esi + 8]
push 0x10
push eax
xor eax, eax
call fcn.0040efba
add esp, 0xc
test byte [esi + 4], 2
je 0x4797b2
push str._n__NTLM:
call fcn.00409709
add esi, 0x18
jmp 0x4796df
push 1
lea eax, [ebx + eax + 4]
push eax
push 0x4a0ecc
call sub.ntdll.dll_RtlEqualUnicodeString
test al, al
je 0x479790
mov eax, dword [ebp - 4]
push 0x40e45e
lea ecx, [ebp - 0xc]
add eax, ebx
push ecx
push dword [eax + 0x10]
mov ecx, dword [eax + 0xc]
call fcn.0040ced3
add esp, 0xc
test eax, eax
je 0x4797b2
mov eax, dword [ebp - 0xc]
xor esi, esi
mov dword [ebp - 0x18], esi
cmp dword [eax], esi
jbe 0x47977e
lea edi, [esi + eax + 4]
xor eax, eax
call fcn.00493f44
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x18]
add esi, 0x10
cmp ecx, dword [eax]
jb 0x479763
lea eax, [ebp - 0xc]
push 0x40e47b
push eax
call fcn.0040cfaa
pop ecx
pop ecx
jmp 0x4797b2
push 0x49ed98
call fcn.00409709
mov eax, dword [ebp - 4]
add eax, ebx
push dword [eax + 0xc]
push dword [eax + 0x10]
mov eax, 0x100001
call fcn.0040efba
add esp, 0xc
push 0x49ed98
call fcn.00409709
inc dword [ebp + 8]
mov eax, dword [ebp - 4]
pop ecx
mov ecx, dword [ebp + 8]
add ebx, 0x10
cmp ecx, dword [eax]
jb 0x479679
lea eax, [ebp - 4]
push 0x40e8d4
push eax
call fcn.0040cfaa
jmp 0x4797f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_decryptSCCache___CryptDecrypt__0x_08x__n
call fcn.00409709
pop ecx
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
jmp 0x479812
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_decryptSCCache___CryptDeriveKey_RC4___0x_08x__n
call fcn.00409709
pop ecx
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
jmp 0x479830
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_decryptSCCache___CryptSignHash_data___0x_08x__n
call fcn.00409709
pop ecx
pop ecx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x47984e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_decryptSCCache___CryptSignHash_init___0x_08x__n
call fcn.00409709
pop ecx
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
pop edi
pop esi
mov eax, dword [ebp - 0x28]
pop ebx
leave
ret