Function at 0x407fe0
Capabilities:
Set registry value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4d094b
push eax
mov dword fs:[0], esp
sub esp, 0x118
lea eax, [esp]
push edi
mov edi, dword [esp + 0x12c]
push eax
push edi
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x40801f
xor eax, eax
jmp 0x4082be
mov eax, dword [esp + 0x130]
push ebx
test eax, eax
push esi
je 0x408203
push ebp
call fcn.004c13ba
mov ebx, dword [eax + 8]
mov edi, 0x50d8d4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esp + 0x14]
push 0x50d8d4
push 1
push eax
push 0x515d3c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x18]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.open
push ecx
call ebp
lea edx, [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push edx
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x50d8cc
push ecx
call ebp
lea edx, [esp + 0x25]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
je 0x40811a
mov edi, str.____1_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x24], 0x22
mov esi, edi
mov edi, edx
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]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
push eax
push 1
push 0
push 0x515d3c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
lea ecx, [esp + 0x18]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push 0x50d8d4
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call esi
lea edx, [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x50d8cc
push ecx
call ebp
lea edx, [esp + 0x25]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
pop ebp
je 0x4081f0
mov edi, str.____1_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x20], 0x22
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x10]
push eax
push 1
push 0
push 0x515d3c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
jmp 0x4082b0
call fcn.004c13ba
mov eax, dword [eax + 4]
push 0
push str.oldshell
lea ecx, [esp + 0x20]
push str.Settings
push ecx
mov ecx, eax
call fcn.004c160b
mov dword [esp + 0x12c], 0
mov esi, str.mhtmlfile_shell
mov eax, edi
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40825d
test cl, cl
je 0x408259
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40825d
add eax, 2
add esi, 2
test cl, cl
jne 0x408235
xor eax, eax
jmp 0x408262
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x408274
push 0x515d3c
lea ecx, [esp + 0x1c]
call fcn.004a92f2
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
test eax, eax
je 0x408296
inc eax
push eax
mov eax, dword [esp + 0x10]
push ecx
push 1
push 0
push 0x515d3c
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [esp + 0x18]
mov dword [esp + 0x12c], 0xffffffff
call fcn.004a9169
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0xc]
push ecx
call esi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x11c]
pop edi
mov dword fs:[0], ecx
add esp, 0x124
ret 8