Function at 0x401970
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x120
push ebx
push ebp
push esi
push edi
xor edi, edi
cmp eax, edi
je 0x401bbe
push 0x104
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [esp + 0x2c]
push ecx
call fcn.00403844
add esp, 4
lea edx, [esp + 0x28]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edi
push edx
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push str.SYSTEMCurrentControlSetControlSession_Manager
push 0x80000002
mov dword [esp + 0x40], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401baf
mov eax, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edi
push edx
push edi
push str.PendingFileRenameOperations
push eax
call ebx
test eax, eax
jne 0x401baf
cmp dword [esp + 0x1c], 7
jne 0x401baf
mov eax, dword [esp + 0x14]
cmp eax, edi
jbe 0x401baf
push eax
call fcn.004037d0
mov esi, eax
add esp, 4
cmp esi, edi
mov dword [esp + 0x20], esi
je 0x401baf
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
push eax
call fcn.004037d0
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x18], ebp
je 0x401ba4
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push esi
push 0
push 0
push str.PendingFileRenameOperations
push ecx
call ebx
test eax, eax
jne 0x401b9b
mov al, byte [esi]
xor ebx, ebx
test al, al
mov ebp, esi
je 0x401b3f
mov eax, dword [esp + 0x14]
mov edx, ebp
sub edx, esi
cmp edx, eax
jae 0x401b3b
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
mov esi, ebp
call edi
lea ebp, [eax + ebp + 1]
mov al, byte [ebp]
test al, al
jne 0x401ad9
push esi
inc ebp
call fcn.00403844
lea eax, [esp + 0x30]
push eax
push esi
jmp 0x401af9
cmp al, 0x21
jne 0x401b07
inc ebp
push ebp
mov dword [esp + 0x28], ebp
call edi
mov edi, dword [esp + 0x24]
lea ebp, [eax + ebp + 1]
push edi
call fcn.00403844
lea eax, [esp + 0x30]
push eax
push edi
call fcn.00403750
add esp, 0xc
test eax, eax
jne 0x401b2c
jmp 0x401b0f
inc ebp
push ebp
call edi
lea ebp, [eax + ebp + 1]
mov edx, dword [esp + 0x18]
mov eax, ebp
sub eax, esi
mov ecx, eax
lea edi, [edx + ebx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add ebx, eax
rep movsb byte es:[edi], byte [esi]
mov al, byte [ebp]
mov esi, dword [esp + 0x20]
test al, al
jne 0x401aa4
test ebx, ebx
ja 0x401b51
mov eax, dword [esp + 0x10]
push str.PendingFileRenameOperations
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x401b6c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
inc ebx
push ebx
push ecx
push 7
push 0
push str.PendingFileRenameOperations
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
call fcn.00403719
mov eax, dword [esp + 0x1c]
push eax
call fcn.00403719
mov eax, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x401b8e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
push ebp
call fcn.00403719
add esp, 4
push esi
call fcn.00403719
add esp, 4
xor edi, edi
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x401bbe
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x120
ret