Function at 0x4229b0
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 0x54b9e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ec
mov eax, dword [0x5b5ecc]
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 [0x5ba8bc]
mov dword [ebp - 4], esi
cmp eax, esi
mov byte [ebp - 4], 1
jne 0x4229ff
call fcn.004227e0
mov eax, dword [0x5ba8bc]
cmp eax, esi
je 0x422a79
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 0x422a79
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x422a79
lea ecx, [ebp - 0x164]
push ecx
push 0x597ddc
push 0x5ba8a4
call fcn.0053091a
add esp, 0xc
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00537b04
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 0x422c43
cmp dword [ebp - 0x1e8], 2
jne 0x422c43
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x422b82
push str.SHGetFolderPathA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x422b70
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 0x422b6a
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, 0x5ba440
je 0x422b2f
mov eax, 0x598f5c
lea ecx, [ebp - 0x164]
push eax
push ecx
lea edx, [ebp - 0x14]
push str._s_sIDM
push edx
call fcn.0053091a
mov eax, dword [ebp - 0x14]
add esp, 0x10
push eax
call fcn.0051e372
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x422b6a
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 0x422d43
lea edx, [ebp - 0x1c]
push edx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x422c43
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 0x422c2e
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, 0x5ba440
je 0x422bf3
mov eax, 0x598f5c
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0053091a
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0051e372
mov eax, dword [ebp - 0x14]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x422c2e
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 0x422d43
lea edx, [ebp - 0x164]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x422d43
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, 0x5ba440
je 0x422c87
mov eax, 0x598f5c
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0053091a
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0051e372
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 0x422cd6
lea edx, [ebp - 0x60]
push str.default_user
push edx
call fcn.0051d0e8
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 0x422ceb
mov byte [ebp - 0x41], al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + eax - 0x164]
mov eax, 0x5ba440
cmp cl, 0x5c
je 0x422d04
mov eax, 0x598f5c
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.0053091a
mov ecx, dword [ebp - 0x14]
add esp, 0x14
push ecx
call fcn.0051e372
mov edx, dword [ebp - 0x14]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x422d43
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 0x422dcc
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.0051c7b0
mov edx, eax
add esp, 8
test edx, edx
je 0x422d9e
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 0x597ddc
push ecx
call fcn.0053091a
mov edx, dword [ebp - 0x14]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x422dcc
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x14]
push 0x7e
push eax
call fcn.0051c7f0
add esp, 8
test eax, eax
je 0x422e1d
push ecx
lea edx, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push edx
call fcn.00537879
lea eax, [ebp - 0x1c]
push eax
call fcn.00426b90
add esp, 8
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x14]
push ecx
push 0x597ddc
push edx
mov byte [ebp - 4], 6
call fcn.0053091a
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.00537b04
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, 0x5ba440
je 0x422e42
mov eax, 0x598f5c
push eax
push edx
push 0x598a7c
push 0x5ba8a4
call fcn.0053091a
mov esi, dword [0x5ba8bc]
add esp, 0x10
test esi, esi
je 0x422e82
mov edx, dword [0x5ba8a4]
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.00537b04
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