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

Disassembly:
sub esp, 0x20
mov eax, dword [0x410c84]
mov edx, dword [0x410c80]
xor ecx, ecx
lea edx, [edx + eax*4 - 4]
cmp eax, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], edx
jbe 0x402bf0
push ebx
push ebp
push esi
mov dword [esp + 0x18], ecx
push edi
mov eax, dword [esp + 0x20]
mov edx, dword [0x410c54]
mov ebx, dword [eax]
mov ecx, dword [ebx]
cmp byte [ecx], 0x2e
jne 0x4028c5
mov ecx, dword [0x410c50]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x402885
mov eax, dword [ebx]
cmp byte [eax + 1], 0x5c
jne 0x4028cf
lea edi, [eax + 2]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x410c54]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4028cf
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x4028c5
mov eax, dword [ebx + 4]
cmp byte [eax], 0
je 0x402b83
mov ecx, dword [0x410c54]
push ecx
call fcn.00401800
mov edi, dword [ebx + 4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x410c54]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x410c54]
push eax
call fcn.004016b0
mov esi, eax
add esp, 8
test esi, esi
mov ebp, 1
je 0x40292e
xor ebp, ebp
test byte [ebx + 8], 1
je 0x402a55
lea ecx, [esp + 0x14]
xor edi, edi
push ecx
push 0xf003f
push edi
push str.SoftwareMicrosoftWindowsCurrentVersionSharedDLLs
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4029d4
mov eax, 4
lea edx, [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x10]
push edx
mov edx, dword [0x410c54]
lea ecx, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push 0
mov edi, 1
push edx
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4029d4
mov eax, dword [esp + 0x10]
test eax, eax
jbe 0x4029a5
dec eax
mov dword [esp + 0x10], eax
test eax, eax
je 0x4029a9
xor ebp, ebp
test esi, esi
je 0x4029b1
test eax, eax
je 0x4029d4
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [0x410c54]
push edx
mov edx, dword [esp + 0x1c]
push eax
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test ebp, ebp
je 0x402a46
lea eax, [esp + 0x18]
push eax
push 0x400
call fcn.004018b0
add esp, 8
test eax, eax
je 0x402a2c
mov ecx, dword [0x410c54]
mov edx, dword [esp + 0x18]
push ecx
push 0xa
push edx
call fcn.004020e0
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp byte [eax], 0
je 0x402a1f
push 0x24
push eax
call fcn.004020b0
add esp, 8
cmp eax, 6
je 0x402a1f
xor ebp, ebp
lea eax, [esp + 0x18]
push eax
call fcn.00401930
add esp, 4
test ebp, ebp
je 0x402a46
test edi, edi
je 0x402a55
mov ecx, dword [0x410c54]
mov edx, dword [esp + 0x14]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test edi, edi
je 0x402a55
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebp, ebp
je 0x402ba4
test byte [ebx + 8], 2
je 0x402a72
mov ecx, dword [0x410c54]
push ecx
call fcn.00401d00
add esp, 4
test byte [ebx + 8], 4
je 0x402a7d
call fcn.004025f0
mov edx, dword [0x410c54]
push edx
call fcn.00405f0c
add esp, 4
test eax, eax
je 0x402ba4
mov eax, dword [0x410cb8]
mov esi, 0xd
cmp eax, esi
jne 0x402ba4
mov eax, dword [0x410c54]
push 2
push eax
call fcn.0040547d
add esp, 8
test eax, eax
je 0x402ba4
cmp dword [0x410cb8], esi
jne 0x402ba4
test byte [ebx + 8], 6
jne 0x402b49
cmp dword [0x40e10c], 0xffffffff
jne 0x402b1f
mov ecx, dword [0x410c54]
push ecx
call fcn.00402450
add esp, 4
sub eax, 6
jne 0x402b15
mov edx, dword [0x410c54]
push 0x80
push edx
call fcn.0040533c
mov eax, dword [0x410c54]
push eax
call fcn.00405f0c
add esp, 0xc
test eax, eax
jne 0x402a94
jmp 0x402ba4
sub eax, 0x3e3
je 0x402b77
dec eax
je 0x402b6b
cmp dword [0x40e10c], 1
jne 0x402ba4
mov eax, dword [0x410c54]
push 0x80
push eax
call fcn.0040533c
mov ecx, dword [0x410c54]
push ecx
call fcn.00405f0c
add esp, 0xc
jmp 0x402ba4
mov ecx, dword [0x410c54]
push 0x80
push ecx
call fcn.0040533c
mov edx, dword [0x410c54]
push edx
call fcn.00405f0c
add esp, 0xc
jmp 0x402ba4
mov dword [0x40e10c], 0
jmp 0x402ba4
mov dword [0x40e10c], 1
jmp 0x402b28
mov edx, dword [0x410c54]
push edx
call fcn.00401070
add esp, 4
test eax, eax
jne 0x402ba4
mov eax, dword [0x410c54]
push eax
call fcn.00405ee2
add esp, 4
mov ecx, dword [0x410c98]
test ecx, ecx
je 0x402bbf
mov eax, dword [esp + 0x1c]
xor edx, edx
div ecx
push eax
call fcn.00402340
add esp, 4
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, dword [0x410c84]
inc eax
add esi, 0x64
sub edx, 4
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edx
jb 0x40286c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret