Function at 0x42ee40
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get session user name
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59d040
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ec
mov eax, dword [0x65ec1c]
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], eax
mov eax, dword [0x663680]
mov dword [ebp - 4], esi
cmp eax, esi
mov byte [ebp - 4], 1
jne 0x42ee8f
call fcn.0042eb00
mov eax, dword [0x663680]
cmp eax, esi
je 0x42ef09
lea ecx, [ebp - 0x20]
lea edx, [ebp - 0x164]
push ecx
push edx
push esi
push esi
push str.AppDataIDMFolder
push eax
mov dword [ebp - 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42ef09
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42ef09
lea ecx, [ebp - 0x164]
push ecx
push 0x638fa8
push 0x663660
call fcn.0058148b
add esp, 0xc
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.005886c0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x25
xor eax, eax
lea edi, [ebp - 0x1f8]
lea edx, [ebp - 0x1f8]
mov dword [ebp - 4], 0
push edx
rep stosd dword es:[edi], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x1f8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x42f0d3
cmp dword [ebp - 0x1e8], 2
jne 0x42f0d3
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x42f012
push str.SHGetFolderPathA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x42f000
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x164]
push eax
push 0
push 0
push 0x1a
push 0
call esi
test eax, eax
jne 0x42effa
lea edi, [ebp - 0x164]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov dword [ebp - 0x20], ecx
mov al, byte [ebp + ecx - 0x164]
cmp al, 0x5c
mov eax, 0x663188
je 0x42efbf
mov eax, 0x63a4cc
lea ecx, [ebp - 0x164]
push eax
push ecx
lea edx, [ebp - 0x14]
push str._s_sIDM
push edx
call fcn.0058148b
mov eax, dword [ebp - 0x14]
add esp, 0x10
push eax
call fcn.0056e502
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42effa
mov dword [ebp - 0x18], 1
call dword [sym.imp.ole32.dll_CoUninitialize]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42f1d3
lea edx, [ebp - 0x1c]
push edx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x42f0d3
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x164]
push eax
push ecx
push 0
push 0
push str.AppData
push edx
mov dword [ebp - 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x42f0be
lea edi, [ebp - 0x164]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov dword [ebp - 0x20], ecx
mov al, byte [ebp + ecx - 0x164]
cmp al, 0x5c
mov eax, 0x663188
je 0x42f083
mov eax, 0x63a4cc
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0058148b
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0056e502
mov eax, dword [ebp - 0x14]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42f0be
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x42f1d3
lea edx, [ebp - 0x164]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x42f1d3
lea edi, [ebp - 0x164]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov dword [ebp - 0x20], ecx
mov al, byte [ebp + ecx - 0x164]
cmp al, 0x5c
mov eax, 0x663188
je 0x42f117
mov eax, 0x63a4cc
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0058148b
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0056e502
add esp, 4
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x1c], 0x40
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
jne 0x42f166
lea edx, [ebp - 0x60]
push str.default_user
push edx
call fcn.0056d05a
add esp, 8
lea edi, [ebp - 0x60]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x20
jbe 0x42f17b
mov byte [ebp - 0x41], al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + eax - 0x164]
mov eax, 0x663188
cmp cl, 0x5c
je 0x42f194
mov eax, 0x63a4cc
lea ecx, [ebp - 0x60]
lea edx, [ebp - 0x164]
push ecx
push eax
push edx
lea eax, [ebp - 0x14]
push str._s_sIDM_s
push eax
call fcn.0058148b
mov ecx, dword [ebp - 0x14]
add esp, 0x14
push ecx
call fcn.0056e502
mov edx, dword [ebp - 0x14]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42f1d3
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
mov bl, 5
mov dword [ebp - 4], 0
mov byte [ebp - 4], bl
test eax, eax
jne 0x42f25c
lea eax, [ebp - 0x164]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x164]
push 0x5c
push ecx
call fcn.0056c5b0
mov edx, eax
add esp, 8
test edx, edx
je 0x42f22e
inc edx
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, edx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 0x164]
lea ecx, [ebp - 0x14]
push eax
push 0x638fa8
push ecx
call fcn.0058148b
mov edx, dword [ebp - 0x14]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42f25c
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x14]
push 0x7e
push eax
call fcn.0056c5f0
add esp, 8
test eax, eax
je 0x42f2ad
push ecx
lea edx, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push edx
call fcn.00588435
lea eax, [ebp - 0x1c]
push eax
call fcn.004350d0
add esp, 8
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x14]
push ecx
push 0x638fa8
push edx
mov byte [ebp - 4], 6
call fcn.0058148b
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.005886c0
mov edx, dword [ebp - 0x14]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
mov dword [ebp - 0x20], ecx
mov al, byte [ecx + edx]
cmp al, 0x5c
mov eax, 0x663188
je 0x42f2d2
mov eax, 0x63a4cc
push eax
push edx
push 0x639028
push 0x663660
call fcn.0058148b
mov esi, dword [0x663680]
add esp, 0x10
test esi, esi
je 0x42f312
mov edx, dword [0x663660]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push eax
push str.AppDataIDMFolder
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.005886c0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret