Function at 0x42ed00
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 0x59b480
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ec
mov eax, dword [0x65ca8c]
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 [0x6614e8]
mov dword [ebp - 4], esi
cmp eax, esi
mov byte [ebp - 4], 1
jne 0x42ed4f
call fcn.0042e9c0
mov eax, dword [0x6614e8]
cmp eax, esi
je 0x42edc9
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 0x42edc9
lea eax, [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42edc9
lea ecx, [ebp - 0x164]
push ecx
push 0x636fa0
push 0x6614c8
call fcn.0057f8fb
add esp, 0xc
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.00586b33
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 0x42ef93
cmp dword [ebp - 0x1e8], 2
jne 0x42ef93
push str.shell32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x42eed2
push str.SHGetFolderPathA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x42eec0
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 0x42eeba
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, 0x660ff8
je 0x42ee7f
mov eax, 0x6384b8
lea ecx, [ebp - 0x164]
push eax
push ecx
lea edx, [ebp - 0x14]
push str._s_sIDM
push edx
call fcn.0057f8fb
mov eax, dword [ebp - 0x14]
add esp, 0x10
push eax
call fcn.0056c982
mov ecx, dword [ebp - 0x14]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42eeba
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 0x42f093
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 0x42ef93
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 0x42ef7e
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, 0x660ff8
je 0x42ef43
mov eax, 0x6384b8
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0057f8fb
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0056c982
mov eax, dword [ebp - 0x14]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42ef7e
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 0x42f093
lea edx, [ebp - 0x164]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x42f093
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, 0x660ff8
je 0x42efd7
mov eax, 0x6384b8
push eax
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x14]
push str._s_sIDM
push ecx
call fcn.0057f8fb
mov edx, dword [ebp - 0x14]
add esp, 0x10
push edx
call fcn.0056c982
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 0x42f026
lea edx, [ebp - 0x60]
push str.default_user
push edx
call fcn.0056b4da
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 0x42f03b
mov byte [ebp - 0x41], al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + eax - 0x164]
mov eax, 0x660ff8
cmp cl, 0x5c
je 0x42f054
mov eax, 0x6384b8
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.0057f8fb
mov ecx, dword [ebp - 0x14]
add esp, 0x14
push ecx
call fcn.0056c982
mov edx, dword [ebp - 0x14]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42f093
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 0x42f11c
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.0056aa30
mov edx, eax
add esp, 8
test edx, edx
je 0x42f0ee
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 0x636fa0
push ecx
call fcn.0057f8fb
mov edx, dword [ebp - 0x14]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x42f11c
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x14]
push 0x7e
push eax
call fcn.0056aa70
add esp, 8
test eax, eax
je 0x42f16d
push ecx
lea edx, [ebp - 0x14]
mov ecx, esp
mov dword [ebp - 0x1c], esp
push edx
call fcn.005868a8
lea eax, [ebp - 0x1c]
push eax
call fcn.00434f90
add esp, 8
mov ecx, dword [ebp - 0x1c]
lea edx, [ebp - 0x14]
push ecx
push 0x636fa0
push edx
mov byte [ebp - 4], 6
call fcn.0057f8fb
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.00586b33
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, 0x660ff8
je 0x42f192
mov eax, 0x6384b8
push eax
push edx
push 0x637020
push 0x6614c8
call fcn.0057f8fb
mov esi, dword [0x6614e8]
add esp, 0x10
test esi, esi
je 0x42f1d2
mov edx, dword [0x6614c8]
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.00586b33
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