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

Disassembly:
sub esp, 0x20
mov eax, dword [0x40e924]
push ebx
mov dword [esp + 0x14], eax
mov eax, dword [0x40e928]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x20], ebx
jbe 0x40235f
push ebp
push esi
push edi
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x20]
mov ebp, dword [ecx]
mov edi, dword [ebp]
cmp byte [edi], 0x2e
jne 0x40204e
mov edi, dword [0x40e8fc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x40e900]
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 [ebp]
cmp byte [eax + 1], 0x5c
jne 0x40206f
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 [0x40e900]
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
jmp 0x40206a
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [0x40e900]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
cmp byte [ecx], bl
je 0x4022f2
mov edx, dword [0x40e900]
push edx
call fcn.004012a0
mov edi, dword [ebp + 4]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x40e900]
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 al, byte [ebp + 8]
mov edi, 1
test al, 1
je 0x4021d3
lea eax, [esp + 0x14]
xor esi, esi
push eax
push 0xf003f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionSharedDLLs
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402157
mov eax, 4
lea ecx, [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [0x40e900]
lea eax, [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push eax
push ebx
mov esi, edi
push ecx
push edx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402157
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x40212e
dec eax
mov dword [esp + 0x10], eax
cmp eax, ebx
je 0x402132
xor edi, edi
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x10]
push eax
mov eax, dword [0x40e900]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp edi, ebx
je 0x4021c0
lea edx, [esp + 0x18]
push edx
push 0x400
call fcn.00401360
add esp, 8
test eax, eax
je 0x4021a2
mov eax, dword [0x40e900]
mov ecx, dword [esp + 0x18]
push eax
push 0xa
push ecx
call fcn.00401aa0
mov edx, dword [esp + 0x24]
push 0x24
push edx
call fcn.00401a70
add esp, 0x14
cmp eax, 6
je 0x402195
xor edi, edi
lea eax, [esp + 0x18]
push eax
call fcn.004013e0
add esp, 4
cmp edi, ebx
je 0x4021bc
cmp esi, ebx
je 0x4021cb
mov ecx, dword [0x40e900]
mov edx, dword [esp + 0x14]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp esi, ebx
je 0x4021cb
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x402314
test byte [ebp + 8], 2
je 0x4021e8
mov ecx, dword [0x40e900]
push ecx
call fcn.00401760
add esp, 4
test byte [ebp + 8], 4
je 0x40221b
mov edx, dword [0x40e900]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, 0x20
jb 0x40221b
push str.DllUnregisterServer
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x402214
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [0x40e900]
push eax
call fcn.0040498a
add esp, 4
test eax, eax
je 0x402314
mov eax, dword [0x40e958]
mov esi, 0xd
cmp eax, esi
jne 0x402314
mov ecx, dword [0x40e900]
push 2
push ecx
call fcn.004042d1
add esp, 8
test eax, eax
je 0x402314
cmp dword [0x40e958], esi
jne 0x402314
cmp dword [0x40c0ac], 0xffffffff
jne 0x4022c8
mov edx, dword [0x40e900]
push edx
call fcn.00401e20
add esp, 4
sub eax, 6
jne 0x4022aa
mov eax, dword [0x40e900]
push 0x80
push eax
call fcn.00404190
mov ecx, dword [0x40e900]
push ecx
call fcn.0040498a
add esp, 0xc
test eax, eax
je 0x402314
jmp 0x402231
sub eax, 0x3e3
je 0x4022bc
dec eax
jne 0x4022c8
mov dword [0x40c0ac], ebx
jmp 0x402314
mov dword [0x40c0ac], 1
jmp 0x4022d1
cmp dword [0x40c0ac], 1
jne 0x402314
mov edx, dword [0x40e900]
push 0x80
push edx
call fcn.00404190
mov eax, dword [0x40e900]
push eax
call fcn.0040498a
add esp, 0xc
jmp 0x402314
mov ecx, dword [0x40e900]
push ecx
call fcn.004026d0
add esp, 4
test eax, eax
jne 0x402314
mov edx, dword [0x40e900]
push edx
call fcn.00404960
add esp, 4
mov ecx, dword [0x40e938]
cmp ecx, ebx
je 0x40232f
mov eax, dword [esp + 0x1c]
xor edx, edx
div ecx
push eax
call fcn.00401d20
add esp, 4
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, dword [0x40e928]
inc eax
add esi, 0x64
add edx, 4
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edx
jb 0x401fe7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret