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

Disassembly:
sub esp, 0x31c
push ebx
push ebp
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_SHGetValueA]
lea eax, [esp + 0xc]
push edi
xor ebx, ebx
push eax
lea ecx, [esp + 0x20]
push ebx
push ecx
push str.path
push str.Environment
push closesocket
mov dword [esp + 0x34], 1
mov dword [esp + 0x28], ebx
call esi
test eax, eax
je 0x40e812
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x10]
add edx, 0x208
push edx
call fcn.0041b540
mov ebp, eax
mov eax, dword [esp + 0x14]
mov edi, ebp
add esp, 4
lea ecx, [eax + 0x208]
xor eax, eax
mov edx, ecx
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 + 0x10]
cmp eax, ebx
jbe 0x40e873
mov edx, eax
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ebp
push ecx
push str.path
add edx, 0x208
push str.Environment
push closesocket
mov dword [esp + 0x28], edx
call esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x104
lea edx, [esp + 0x22c]
push 0x4665ec
push edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call esi
push 0x104
lea eax, [esp + 0x128]
push 0x4664e8
push eax
call esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashA]
lea ecx, [esp + 0x228]
push ecx
call esi
lea edx, [esp + 0x124]
push edx
call esi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
xor esi, esi
test eax, eax
jbe 0x40e95e
mov al, byte [ebx + ebp]
test al, al
je 0x40e8f4
cmp al, 0x3b
je 0x40e8f4
mov byte [esp + esi + 0x20], al
inc esi
jmp 0x40e955
mov al, byte [esp + 0x20]
test al, al
je 0x40e95e
cmp byte [esp + esi + 0x20], 0x5c
jne 0x40e908
mov byte [esp + esi + 0x20], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [esp + 0x228]
lea ecx, [esp + 0x20]
push eax
push ecx
call edi
test eax, eax
jne 0x40e99e
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40e93d
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40ea4a
mov ecx, esi
xor eax, eax
mov edx, ecx
lea edi, [esp + 0x20]
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor esi, esi
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
inc ebx
cmp ebx, eax
jb 0x40e8e2
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, ebp
cmp esi, ebp
jbe 0x40e97d
mov al, byte [esi - 1]
cmp al, 0x3b
je 0x40e978
cmp al, 0x5c
jne 0x40e97d
dec esi
cmp esi, ebp
ja 0x40e96d
mov ebx, dword [esp + 0x18]
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
test ebx, ebx
jne 0x40e9dc
cmp esi, ebp
jne 0x40e9c2
lea eax, [esp + 0x124]
push eax
push 0x453d48
jmp 0x40e9cf
lea edx, [esp + 0x124]
lea eax, [esp + 0x20]
push edx
push eax
call edi
test eax, eax
jne 0x40e929
mov dword [esp + 0x18], 1
jmp 0x40e931
lea ecx, [esp + 0x124]
push ecx
push 0x453d44
push 0x104
push esi
call edi
add esp, 0x10
add esi, eax
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40e9fe
lea edx, [esp + 0x228]
push edx
push 0x453d44
push 0x104
push esi
call edi
add esp, 0x10
jmp 0x40ea02
test ebx, ebx
jne 0x40ea4a
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push ebp
push 2
push str.PATH
push str.Environment
push closesocket
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0x1388
push 2
push str.Environment
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
push ebp
call fcn.0041da60
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret