Function at 0x413d90
Capabilities:
Encrypt data using dpapi
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1004c
call fcn.00429120
mov eax, dword [0x47a42c]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10028], ecx
mov dword [ebp - 0x1002c], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
test ecx, ecx
je 0x413e4b
mov dword [ecx], 0
test eax, eax
je 0x413dda
mov dword [eax], 0
lea eax, [ebp - 0x10024]
push eax
push 0
lea eax, [ebp - 0x1003c]
push eax
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x413e4b
mov ecx, dword [ebp - 0x10024]
test ecx, ecx
je 0x413e4b
mov eax, dword [ebp - 0x1003c]
cmp eax, 1
je 0x413e12
cmp eax, 2
jne 0x413e4b
lea eax, [ecx + 2]
push eax
call fcn.0043b175
mov ebx, eax
add esp, 4
mov dword [ebp - 0x10038], ebx
test ebx, ebx
je 0x413e4b
lea eax, [ebp - 0x10024]
push eax
push ebx
push 0
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x413e5e
push ebx
call fcn.0043b170
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10024]
xor ecx, ecx
push 4
push str.Enc
push ebx
mov word [ebx + eax], cx
call fcn.0043b1c5
add esp, 0xc
test eax, eax
jne 0x413fdd
mov ecx, ebx
mov dword [ebp - 0x10020], 0x8000
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413e91
sub ecx, edx
lea eax, [ebp - 0x10020]
push eax
sar ecx, 1
lea eax, [ebp - 0x10004]
push eax
lea eax, [ecx - 4]
push eax
lea eax, [ebx + 8]
push eax
call fcn.00403860
add esp, 0x10
test eax, eax
jne 0x413fba
push 0x4597d0
lea eax, [ebp - 0x10030]
mov dword [ebp - 0x10030], 0x8000
push eax
lea eax, [ebp - 0x8004]
push eax
push dword [ebp - 0x10020]
lea eax, [ebp - 0x10004]
push eax
call fcn.00403320
add esp, 0x14
test eax, eax
jne 0x413fba
mov eax, dword [ebp - 0x10030]
cmp eax, 0x8000
jae 0x414222
push 0
push 0
push 0xffffffffffffffff
mov byte [ebp + eax - 0x8004], 0
lea eax, [ebp - 0x8004]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
push 2
test edi, edi
jle 0x413f5e
push edi
call fcn.0043b5af
mov esi, eax
add esp, 8
test esi, esi
je 0x413f73
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x8004]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
jmp 0x413f73
push 1
call fcn.0043b5af
mov esi, eax
add esp, 8
test esi, esi
je 0x413f73
xor eax, eax
mov word [esi], ax
mov ecx, dword [ebp - 0x10028]
mov dword [ecx], esi
test esi, esi
je 0x413f96
mov edi, dword [ebp - 0x1002c]
test edi, edi
je 0x413f94
mov eax, dword [ebp - 0x10030]
inc eax
mov dword [edi], eax
mov esi, dword [ecx]
test esi, esi
push dword [ebp - 0x10038]
setne bl
call fcn.0043b170
add esp, 4
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
xor bl, bl
push dword [ebp - 0x10038]
call fcn.0043b170
add esp, 4
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428a27
mov esp, ebp
pop ebp
ret
push 5
push str.Enc2
push ebx
call fcn.0043b1c5
add esp, 0xc
test eax, eax
jne 0x4141f3
mov ecx, ebx
mov dword [ebp - 0x10008], 7
xor esi, esi
mov word [ebp - 0x1001c], ax
mov dword [ebp - 0x1000c], esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414013
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x1001c]
call fcn.0040cfe0
cmp dword [ebp - 0x10008], 8
lea eax, [ebp - 0x1001c]
mov ecx, dword [ebp - 0x1000c]
cmovae eax, dword [ebp - 0x1001c]
mov dword [ebp - 0x10020], eax
cmp ecx, 5
jb 0x414078
add ecx, 0xfffffffc
lea ebx, [eax + ecx*2]
mov ecx, eax
nop dword [eax]
mov eax, ebx
sub eax, ecx
sar eax, 1
je 0x414076
cmp word [ecx], 0x45
je 0x4140e0
add ecx, 2
sub eax, 1
jne 0x414068
xor esi, esi
xor bl, bl
lea ecx, [ebp - 0x1001c]
call fcn.0040c360
test bl, bl
je 0x413fba
push esi
call fcn.0043b1ff
mov ebx, dword [ebp - 0x10028]
add esp, 4
push esi
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebx]
mov eax, ecx
test ecx, ecx
je 0x4140d6
mov edi, dword [ebp - 0x1002c]
test edi, edi
je 0x4140d6
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4140c0
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
mov dword [edi], eax
mov eax, dword [ebx]
test eax, eax
setne bl
jmp 0x413fbc
test ecx, ecx
je 0x414076
mov edx, str.Enc2
mov edi, ecx
mov esi, 5
sub edi, edx
mov ax, word [edi + edx]
cmp ax, word [edx]
jne 0x4141d0
add edx, 2
sub esi, 1
jne 0x4140f2
sub ecx, dword [ebp - 0x10020]
cmp ecx, 2
jae 0x414076
mov eax, dword [ebp - 0x1000c]
inc eax
shr eax, 1
push 1
push eax
mov dword [ebp - 0x10020], eax
call fcn.0043b5af
mov esi, eax
add esp, 8
test esi, esi
je 0x4141d8
cmp dword [ebp - 0x10008], 8
lea eax, [ebp - 0x10020]
push eax
mov eax, dword [ebp - 0x1000c]
lea ecx, [ebp - 0x1001c]
cmovae ecx, dword [ebp - 0x1001c]
add eax, 0xfffffffb
push esi
push eax
lea eax, [ecx + 0xa]
push eax
call fcn.00403860
add esp, 0x10
test eax, eax
jne 0x4141d8
mov eax, dword [ebp - 0x10020]
xorps xmm0, xmm0
mov dword [ebp - 0x10044], eax
lea eax, [ebp - 0x1004c]
push eax
push 1
push 0
push 0
lea eax, [ebp - 0x10034]
mov dword [ebp - 0x10040], esi
push eax
push 0
lea eax, [ebp - 0x10044]
mov dword [ebp - 0x10030], 0x479510
push eax
mov dword [ebp - 0x10034], 0x40
movlpd qword [ebp - 0x1004c], xmm0
call sub.CRYPT32.dll_CryptUnprotectData
cmp eax, 1
jne 0x4141d8
mov esi, dword [ebp - 0x10048]
jmp 0x4141dc
add ecx, 2
jmp 0x414060
xor esi, esi
xor eax, eax
test eax, eax
je 0x414078
test esi, esi
je 0x414078
mov bl, 1
jmp 0x41407a
mov ecx, dword [ebp - 0x10028]
mov edi, dword [ebp - 0x1002c]
mov dword [ecx], ebx
test edi, edi
je 0x41420f
mov eax, dword [ebp - 0x10024]
shr eax, 1
mov dword [edi], eax
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428a27
mov esp, ebp
pop ebp
ret
call fcn.00428d6b
int3