Function at 0x405d90
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x438
push 0
call fcn.004057e0
add esp, 4
test eax, eax
je 0x4061cc
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push esi
lea eax, [esp + 0xc]
push edi
push eax
push str.SoftwareMicrosoftProtected_Storage_System_Provider
push 0x80000001
call ebp
test eax, eax
jne 0x405e8f
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea ecx, [esp + 0x148]
push 0x100
push ecx
push eax
push edx
mov esi, 1
call edi
test eax, eax
jne 0x405e84
mov ebx, 4
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x148]
push eax
push ecx
push edx
call ebp
test eax, eax
jne 0x405e48
lea eax, [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push str.Migrate
push eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405e66
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x148]
mov eax, esi
push 0x100
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
inc esi
call edi
test eax, eax
je 0x405df8
jmp 0x405e84
lea ecx, [esp + 0x148]
push ecx
push 0x40edf4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 0x40edf4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x405eb0
push str..DEFAULT
push 0x40edf4
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call fcn.00405930
test eax, eax
je 0x4061c3
mov ecx, 9
mov esi, str.4548F87B_32C7_46c7_B2E3_7AD500166A5E
lea edi, [esp + 0x24]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor ecx, ecx
xor edx, edx
movsb byte es:[edi], byte [esi]
mov dword [esp + 0x4b], ecx
mov esi, str.185FEDF9_9905_11D1_95A9_00C04FB925D3
mov dword [esp + 0x4f], ecx
lea edi, [esp + 0x56]
mov word [esp + 0x53], cx
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov byte [esp + 0x55], cl
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0xc
mov esi, str.SYSTEMCurrentControlSetControlMediaCategories_
lea edi, [esp + 0x248]
mov dword [esp + 0x7d], edx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, 0x33
lea edi, [esp + 0x27a]
rep stosd dword es:[edi], eax
mov dword [esp + 0x81], edx
xor esi, esi
mov word [esp + 0x85], dx
mov dword [esp + 0x14], esi
mov byte [esp + 0x87], dl
stosw word es:[edi], ax
lea eax, [esi + esi*4]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x88]
lea eax, [eax + eax*4]
lea ecx, [esp + eax*2 + 0x24]
push ecx
push edx
call edi
lea eax, [esp + 0x248]
lea ecx, [esp + 0x348]
push eax
push ecx
call edi
lea edx, [esp + 0x88]
lea eax, [esp + 0x348]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor edi, edi
cmp word [esp + 0x44c], di
je 0x405f9c
xor ebx, ebx
mov dword [esp + 0x18], edi
jmp 0x405fa5
mov ebx, 2
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x10]
lea edx, [esp + 0x348]
push ecx
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4060f5
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x148]
push eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push ecx
push edx
push edi
push 0x40d8b8
push eax
mov dword [esp + 0x38], 1
mov dword [esp + 0x34], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4060e6
cmp dword [0x40f304], edi
jbe 0x40606c
xor esi, esi
mov ecx, dword [0x40f2f4]
push 0x80
lea eax, [esp + 0xcc]
lea edx, [esi + ecx + 4]
push edx
push eax
call fcn.004057a0
add esp, 0xc
lea ecx, [esp + 0xc8]
lea edx, [esp + 0x148]
push ecx
push edx
call ebp
test eax, eax
je 0x406052
mov eax, dword [0x40f304]
inc edi
add esi, 0x84
cmp edi, eax
jb 0x40600a
jmp 0x40606c
mov ecx, dword [0x40f2f4]
mov eax, edi
shl eax, 5
add eax, edi
mov dword [ecx + eax*4], ebx
mov dword [0x40f30c], 1
cmp dword [esp + 0x14], 1
jne 0x4060e6
mov eax, dword [0x40f308]
xor edi, edi
test eax, eax
jbe 0x4060e6
xor esi, esi
mov edx, dword [0x40edf0]
push 0x80
lea ecx, [esp + 0xcc]
lea eax, [esi + edx + 4]
push eax
push ecx
call fcn.004057a0
add esp, 0xc
lea edx, [esp + 0xc8]
lea eax, [esp + 0x148]
push edx
push eax
call ebp
test eax, eax
je 0x4060c8
mov eax, dword [0x40f308]
inc edi
add esi, 0x84
cmp edi, eax
jb 0x406080
jmp 0x4060e6
mov edx, dword [0x40edf0]
mov eax, dword [esp + 0x18]
mov ecx, edi
shl ecx, 5
add ecx, edi
mov dword [edx + ecx*4], eax
mov dword [0x40f310], 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x14]
inc esi
cmp esi, 2
mov dword [esp + 0x14], esi
jl 0x405f45
mov eax, dword [0x40f30c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x406169
lea edx, [esp + 0x10]
push edx
push 0x40e8b0
push 0x80000003
call edi
test eax, eax
jne 0x40615f
mov eax, dword [0x40f304]
mov edx, dword [0x40f2f4]
mov ecx, eax
shl ecx, 5
add ecx, eax
mov eax, dword [esp + 0x10]
shl ecx, 2
push ecx
push edx
push 3
push 0
push str.LineStates
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x40f30c], 0
mov eax, dword [0x40f310]
test eax, eax
je 0x4061c3
lea edx, [esp + 0x10]
push edx
push 0x40e3b0
push 0x80000003
call edi
test eax, eax
jne 0x4061b9
mov eax, dword [0x40f308]
mov edx, dword [0x40edf0]
mov ecx, eax
shl ecx, 5
add ecx, eax
mov eax, dword [esp + 0x10]
shl ecx, 2
push ecx
push edx
push 3
push 0
push str.LineStates
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x40f310], 0
call fcn.00405900
pop edi
pop esi
pop ebp
pop ebx
mov eax, dword [0x40f2f4]
test eax, eax
je 0x4061de
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40edf0]
test eax, eax
je 0x4061f0
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40e2f4]
test eax, eax
je 0x406202
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40e2d0]
test eax, eax
je 0x406214
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40e2f0]
test eax, eax
je 0x406226
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40f2f8]
test eax, eax
je 0x406238
push eax
call fcn.00407eb4
add esp, 4
mov eax, dword [0x40e3ac]
test eax, eax
je 0x40624a
push eax
call fcn.00407eb4
add esp, 4
add esp, 0x438
ret