Function at 0x478f04
Capabilities:
Encrypt data using rc4 via systemfunction032
Encrypt data using rc4 via systemfunction033

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
push edi
push 0x10
pop eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x18]
mov edi, 0x2800
push dword [ebp + 0x14]
lea ebx, [ebp - 0x38]
push str.SecretsNL_KMCurrVal
push dword [ebp + 0xc]
mov dword [ebp - 0x18], edi
push dword [ebp + 8]
call fcn.004798ab
add esp, 0x18
test eax, eax
je 0x47947d
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x478f60
mov eax, dword [esi]
neg eax
sbb eax, eax
and eax, 0x20006
jmp 0x478f62
xor eax, eax
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0xc]
push ecx
or eax, 0x20019
push eax
push 0
push str.Cache
push dword [ebp + 0x10]
push ebx
call fcn.0040b597
add esp, 0x18
test eax, eax
je 0x479474
cmp dword [ebp + 0x14], 0
je 0x478ff6
push 0x49ed98
call fcn.00409709
pop ecx
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 4]
push eax
push 0
push str.NL_IterationCount
push dword [ebp - 0xc]
call fcn.0040b9b1
add esp, 0x14
test eax, eax
je 0x478feb
mov ecx, dword [ebp - 4]
mov eax, ecx
cmp ecx, edi
jbe 0x478fc9
and eax, 0xfffffc00
jmp 0x478fcc
shl eax, 0xa
push eax
push ecx
push str._NL_IterationCount_is__u___u_real_iteration_s__n
mov dword [ebp - 0x18], eax
call fcn.00409709
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x478ff6
push str._DCC1_mode___n
jmp 0x478ff0
push str._Iteration_is_set_to_default__10240__n
call fcn.00409709
pop ecx
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x30]
push eax
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0xc]
mov edx, ebx
call fcn.0040b790
add esp, 0x1c
test eax, eax
je 0x479468
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea eax, [eax + eax + 2]
push eax
push 0x40
call ebx
mov dword [ebp - 8], eax
test eax, eax
je 0x479468
push dword [ebp - 0x28]
push 0x40
call ebx
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x47945f
and dword [ebp - 4], 0
cmp dword [ebp - 0x30], 0
jbe 0x479458
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0040bc47
add esp, 0x1c
test eax, eax
je 0x479449
mov edi, dword [sym.imp.msvcrt.dll__wcsnicmp]
push 0xa
push str.NL_Control
push dword [ebp - 8]
call edi
add esp, 0xc
test eax, eax
je 0x479449
push 0x11
push str.NL_IterationCount
push dword [ebp - 8]
call edi
add esp, 0xc
test eax, eax
je 0x479449
test byte [ebx + 0x30], 1
je 0x479449
push dword [ebp - 8]
push str._n__s__
call fcn.00409709
lea eax, [ebx + 0x20]
push eax
call fcn.0040f0fb
mov eax, dword [ebx + 0x10]
add esp, 0xc
push eax
push eax
push str.__nRID_______:__08x___u__n
call fcn.00409709
mov edi, dword [ebp - 0x1c]
add edi, 0xffffffa0
add esp, 0xc
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x24], edi
lea eax, [ebx + 0x40]
je 0x4792ca
push 0
push eax
push dword [ebp - 0x10]
lea ecx, [ebx + 0x60]
push edi
push ecx
call fcn.00403ad5
add esp, 0x14
test eax, eax
je 0x479449
push 0x32
mov eax, ebx
call fcn.00479485
mov ax, word [ebx]
mov word [ebp - 0x42], ax
mov word [ebp - 0x44], ax
lea eax, [ebx + 0xa8]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x2c]
pop ecx
test eax, eax
je 0x47916f
mov ecx, dword [ebx + 0x84]
test ecx, ecx
je 0x47916f
push dword [esi + 0x30]
sub edi, ecx
push eax
push ecx
lea eax, [edi + ebx + 0x60]
call fcn.00479511
add esp, 0xc
mov eax, dword [esi]
test eax, eax
je 0x479449
movzx ecx, word [ebp - 0x44]
shr ecx, 1
push ecx
push dword [ebp - 0x40]
push eax
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x479449
push str.__User_cache_replace_mode__2___n
call fcn.00409709
cmp dword [esi + 0x14], 0
pop ecx
je 0x4791c8
push dword [ebp - 0x18]
lea eax, [ebp - 0x44]
push eax
lea eax, [esi + 4]
push eax
lea eax, [ebx + 0x60]
push eax
call fcn.00403ead
xor ecx, ecx
add esp, 0x10
test eax, eax
setge cl
mov eax, ecx
jmp 0x4791df
cmp dword [esi + 0x28], 0
je 0x4791dd
add esi, 0x18
lea edi, [ebx + 0x60]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x1c]
jmp 0x4791e7
xor eax, eax
test eax, eax
je 0x4792b9
push str.__MsCacheV2_:
call fcn.00409709
pop ecx
push 0x10
lea edi, [ebx + 0x60]
push edi
xor eax, eax
call fcn.0040efba
push 0x49ed98
call fcn.00409709
add esp, 0xc
push 0x10
lea eax, [ebx + 0x50]
push eax
push dword [ebp - 0x24]
mov eax, 0x8004
push edi
push 0x10
push dword [ebp - 0x10]
call fcn.00403588
add esp, 0x18
test eax, eax
je 0x479449
push str.__Checksum__:
call fcn.00409709
pop ecx
lea eax, [ebx + 0x50]
push 0x10
push eax
xor eax, eax
call fcn.0040efba
push 0x49ed98
call fcn.00409709
add esp, 0xc
push 1
lea eax, [ebx + 0x40]
push eax
push dword [ebp - 0x10]
push dword [ebp - 0x24]
push edi
call fcn.00403ad5
add esp, 0x14
test eax, eax
je 0x479449
push dword [ebp - 0x1c]
push ebx
push dword [ebp - 0x2c]
mov ebx, dword [ebp + 8]
push dword [ebp - 8]
push dword [ebp - 0xc]
call fcn.0040ba6d
add esp, 0x14
test eax, eax
je 0x4792a0
push str.__OK__n
call fcn.00409709
mov ebx, dword [ebp - 0x20]
jmp 0x479448
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_registry_RegSetValueEx__0x_08x__n
call fcn.00409709
mov ebx, dword [ebp - 0x20]
jmp 0x479447
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache______0x_08x__n
jmp 0x479442
push 0x10
push dword [ebp - 0x48]
push 0x10
push eax
push dword [ebp - 0x38]
mov eax, 0x8003
push dword [ebp - 0x10]
call fcn.00403588
add esp, 0x18
test eax, eax
je 0x479436
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x5c], edi
lea eax, [ebp - 0x5c]
lea edi, [ebx + 0x60]
push eax
mov dword [ebp - 0x54], edi
call sub.ADVAPI32.dll_SystemFunction033
test eax, eax
jl 0x47942e
push 0x31
mov eax, ebx
call fcn.00479485
mov ax, word [ebx]
lea edx, [ebx + 0xa8]
pop ecx
mov word [ebp - 0x42], ax
mov word [ebp - 0x44], ax
mov dword [ebp - 0x40], edx
test esi, esi
je 0x479449
mov ecx, dword [esi]
test ecx, ecx
je 0x479449
movzx eax, ax
shr eax, 1
push eax
push edx
push ecx
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x479449
push str.__User_cache_replace_mode__1___n
call fcn.00409709
xor eax, eax
pop ecx
cmp dword [esi + 0x14], eax
je 0x47937d
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [esi + 4]
push eax
push edi
call fcn.00403ead
add esp, 0x10
jmp 0x47938c
cmp dword [esi + 0x28], eax
je 0x47938c
add esi, 0x18
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x1c]
push 0
lea eax, [ebp - 0x44]
push eax
lea eax, [esi + 4]
push eax
lea edi, [ebx + 0x60]
push edi
call fcn.00403ead
add esp, 0x10
test eax, eax
jl 0x479449
push str.__MsCacheV1_:
call fcn.00409709
pop ecx
push 0x10
push edi
xor eax, eax
call fcn.0040efba
push 0x49ed98
call fcn.00409709
add esp, 0xc
push 0x10
lea edi, [ebx + 0x50]
push edi
push dword [ebp - 0x24]
lea eax, [ebx + 0x60]
push eax
push 0x10
push dword [ebp - 0x48]
mov eax, 0x8003
call fcn.00403588
add esp, 0x18
test eax, eax
je 0x479449
push str.__Checksum__:
call fcn.00409709
pop ecx
push 0x10
push edi
xor eax, eax
call fcn.0040efba
push 0x49ed98
call fcn.00409709
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x5c]
push eax
call sub.ADVAPI32.dll_SystemFunction032
test eax, eax
jge 0x479272
push eax
push str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptData2:_0x_08x_n
jmp 0x479442
push eax
push str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___RtlEncryptDecryptRC4_:_0x_08x_n
jmp 0x479442
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kuhl_m_lsadump_getNLKMSecretAndCache___kull_m_crypto_hmac__0x_08x__n
call fcn.00409709
pop ecx
pop ecx
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x30]
jb 0x47905e
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xc]
mov eax, dword [ebp + 8]
call fcn.0040be08
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret