Function at 0x40e590
Capabilities:
Delete registry value
Persist via path registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x320
push ebx
push ebp
mov ebx, dword [sym.imp.SHLWAPI.dll_SHGetValueA]
push esi
lea eax, [esp + 0xc]
push edi
xor ebp, ebp
push eax
lea ecx, [esp + 0x20]
push ebp
push ecx
push str.path
push str.Environment
push closesocket
mov dword [esp + 0x34], 1
mov dword [esp + 0x28], ebp
call ebx
test eax, eax
jne 0x40e7b7
mov eax, dword [esp + 0x10]
inc eax
push eax
mov dword [esp + 0x14], eax
call fcn.0041b540
mov ecx, dword [esp + 0x14]
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x20], esi
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x10]
lea ecx, [esp + 0x1c]
push eax
push esi
push ecx
push str.path
push str.Environment
push closesocket
call ebx
test eax, eax
jne 0x40e7b7
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x104
lea edx, [esp + 0x12c]
push 0x4665ec
push edx
call edi
push 0x104
lea eax, [esp + 0x230]
push 0x4664e8
push eax
call edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
lea ecx, [esp + 0x128]
push ecx
call edi
lea edx, [esp + 0x22c]
push edx
call edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x25]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
xor ecx, ecx
test eax, eax
mov ebx, esi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ecx
jbe 0x40e799
mov al, byte [ecx + esi]
test al, al
je 0x40e6ae
cmp al, 0x3b
je 0x40e6ae
mov byte [esp + ebp + 0x24], al
inc ebp
jmp 0x40e73a
mov al, byte [esp + 0x24]
test al, al
je 0x40e74d
cmp byte [esp + ebp + 0x24], 0x5c
jne 0x40e6c6
mov byte [esp + ebp + 0x24], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0x128]
lea ecx, [esp + 0x24]
push eax
push ecx
call edi
test eax, eax
je 0x40e716
lea edx, [esp + 0x22c]
lea eax, [esp + 0x24]
push edx
push eax
call edi
test eax, eax
je 0x40e716
mov ecx, ebp
lea esi, [esp + 0x24]
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov byte [ebx + ebp], 0x3b
lea ebx, [ebx + ebp + 1]
jmp 0x40e71e
mov dword [esp + 0x14], 1
mov ecx, ebp
xor eax, eax
mov edx, ecx
lea edi, [esp + 0x24]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor ebp, ebp
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
inc ecx
cmp ecx, eax
mov dword [esp + 0x18], ecx
jb 0x40e699
jmp 0x40e74e
dec ebx
cmp ebx, esi
je 0x40e799
mov al, byte [ebx - 1]
dec ebx
cmp al, 0x3b
jne 0x40e75d
mov byte [ebx], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40e7ae
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push 2
push str.PATH
push str.Environment
push closesocket
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
push esi
call fcn.0041da60
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x320
ret
push str.PATH
push str.Environment
push closesocket
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueA]
push esi
call fcn.0041da60
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x320
ret