Function at 0x40a150
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
push edi
push str.Portc
push str.Microsoft
lea eax, [esp + 0x54]
xor ebx, ebx
push str.Software_s_s
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x40], 8
call fcn.0042dba5
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x44]
add esp, 0x10
mov byte [esp + 0x13], 1
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x38], VariantInit
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x14]
push eax
push 0x2001f
mov esi, dword [edx]
lea ecx, [esp + 0x54]
push ebx
push ecx
push esi
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40a1f7
lea edx, [esp + 0x14]
push ebx
push edx
push ebx
push 0x2001f
push ebx
push ebx
lea eax, [esp + 0x64]
push ebx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40a383
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x40a383
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
push ecx
push edx
push ebx
push ebx
push 0x472540
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebx
je 0x40a232
cmp eax, 2
jne 0x40a378
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
jmp 0x40a251
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp ecx, 1
jne 0x40a247
cmp eax, ebx
je 0x40a3af
mov edx, ecx
or edx, eax
jne 0x40a2d8
lea eax, [esp + 0x40]
push eax
call fcn.004537e0
mov ecx, dword [eax]
push ebx
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x28]
call fcn.004537f3
mov edi, dword [eax + 0xc]
push ebx
lea ecx, [esp + 0x28]
call fcn.004537f3
mov esi, dword [eax + 0x10]
push ebx
lea ecx, [esp + 0x28]
inc esi
call fcn.004537f3
mov eax, dword [eax + 0x14]
push edi
add eax, 0x76c
push esi
push eax
call fcn.0040a3d0
add esp, 0xc
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
push 8
push edx
push ebx
push ebx
push 0x472540
push eax
mov dword [esp + 0x34], ebx
call ebp
test eax, eax
jne 0x40a2ce
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x13], bl
jmp 0x40a383
mov edx, dword [esp + 0x14]
push edx
jmp 0x40a37d
cmp eax, ebx
ja 0x40a2e5
cmp ecx, 1
jbe 0x40a378
lea eax, [esp + 0x3c]
push eax
call fcn.004537e0
mov ecx, dword [eax]
push ebx
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x24]
call fcn.004537f3
mov edi, dword [eax + 0xc]
push ebx
lea ecx, [esp + 0x24]
call fcn.004537f3
mov esi, dword [eax + 0x10]
push ebx
lea ecx, [esp + 0x24]
inc esi
call fcn.004537f3
mov eax, dword [eax + 0x14]
push edi
add eax, 0x76c
push esi
push eax
call fcn.0040a3d0
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add esp, 0xc
xor edx, edx
sub eax, esi
sbb edx, ecx
mov dword [esp + 0x48], edx
jne 0x40a357
cmp eax, 0x1e
ja 0x40a357
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x13], bl
jmp 0x40a383
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push 8
push ecx
push ebx
push ebx
push 0x472540
push edx
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], ebx
call ebp
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
inc eax
add edx, 4
cmp eax, 2
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
jl 0x40a1af
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x104
ret