Function at 0x406c90
Capabilities:
Decode data using base64 via winapi
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x47c018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
push 0x8000
push 8
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [0x4802b4], eax
lea eax, [ebp - 0x14]
push eax
push 1
push 0
push 0x455c58
push bind
call edi
mov dword [ebp - 8], pe_nt_image_headers32
call ebx
push pe_nt_image_headers32
push 8
push eax
call esi
mov ebx, eax
lea eax, [ebp - 8]
push eax
push ebx
push 0
push 0
push str.pbsecGOOD
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x406f7c
lea eax, [ebp - 0x10]
push eax
push 1
push esi
push str.SoftwareMicrosoftWindowsCurrentVersion
push bind
call edi
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x8000
push eax
push dword [0x4802b4]
push esi
push esi
push str.secpbGOOD
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x10]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x406f60
mov ecx, dword [0x4802b4]
mov edi, ecx
lea edx, [edi + 1]
nop dword [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x406d70
mov esi, dword [0x47d018]
sub edi, edx
mov edx, dword [0x47d014]
mov eax, esi
sub eax, edx
push edi
push ecx
cmp edi, eax
ja 0x406db8
lea eax, [edx + edi]
cmp esi, 0x10
mov dword [0x47d014], eax
mov eax, 0x47d004
cmovae eax, dword [0x47d004]
lea esi, [eax + edx]
push esi
call fcn.00430ac0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x406dc6
push dword [ebp - 0x10]
mov ecx, 0x47d004
push edi
call fcn.00411070
mov edx, dword [0x47d018]
mov eax, edx
mov ecx, dword [0x47d014]
sub eax, ecx
cmp eax, 1
jb 0x406dfa
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [0x47d014], eax
mov eax, 0x47d004
cmovae eax, dword [0x47d004]
mov word [eax + ecx], 0x3b
jmp 0x406e10
push 1
push 0x455d18
push dword [ebp - 0x10]
mov ecx, 0x47d004
push 1
call fcn.00411070
mov edi, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x406e15
mov edx, dword [0x47d018]
sub edi, ecx
mov ecx, dword [0x47d014]
mov eax, edx
sub eax, ecx
push edi
push ebx
cmp edi, eax
ja 0x406e5c
cmp edx, 0x10
lea eax, [ecx + edi]
mov esi, 0x47d004
mov dword [0x47d014], eax
cmovae esi, dword [0x47d004]
add esi, ecx
push esi
call fcn.00430ac0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x406e6a
push dword [ebp - 0x10]
mov ecx, 0x47d004
push edi
call fcn.00411070
mov edx, dword [0x47d018]
mov eax, edx
mov ecx, dword [0x47d014]
sub eax, ecx
cmp eax, 1
jb 0x406e9e
lea eax, [ecx + 1]
cmp edx, 0x10
mov dword [0x47d014], eax
mov eax, 0x47d004
cmovae eax, dword [0x47d004]
mov word [eax + ecx], 0x3b
jmp 0x406eb4
push 1
push 0x455d1c
push dword [ebp - 0x10]
mov ecx, 0x47d004
push 1
call fcn.00411070
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0xc]
push 0
push 0
push eax
push 0
push 1
push ebx
mov dword [ebp - 0xc], 0
call esi
mov edi, dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
push eax
push ebx
call edi
test eax, eax
je 0x406f14
cmp dword [ebp - 0xc], 0x20
jne 0x406f14
push 0
push 0
lea eax, [ebp - 0xc]
push eax
push 0x4806b8
push 1
push ebx
call esi
push eax
push ebx
call edi
test eax, eax
je 0x406f14
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f19a
mov esp, ebp
pop ebp
ret
call fcn.004066d0
push ebx
test al, al
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0
je 0x406f44
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f19a
mov esp, ebp
pop ebp
ret
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f19a
mov esp, ebp
pop ebp
ret
call fcn.004066d0
test al, al
jne 0x406f2e
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042f19a
mov esp, ebp
pop ebp
ret
call fcn.004066d0
xor ecx, ecx
test al, al
pop edi
setne cl
mov eax, ecx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042f19a
mov esp, ebp
pop ebp
ret