Function at 0x405895
Capabilities:
Create process on windows
Enumerate files on windows
Enumerate files recursively
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x85c
push ebx
push esi
push edi
lea eax, [ebp - 0x758]
push 0xff
push eax
push 0x4028ec
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
or ebx, 0xffffffff
lea edi, [ebp - 0x758]
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x554]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp - 0x554]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4028dc
mov ecx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x554]
mov ecx, edx
push eax
and ecx, 3
lea eax, [ebp - 0x85c]
push 0x40264c
rep movsb byte es:[edi], byte [esi]
push eax
call sub.MSVCRT.dll_sprintf
and byte [ebp - 0x34c], 0
add esp, 0xc
xor eax, eax
lea edi, [ebp - 0x34b]
push 0x40
pop ecx
rep stosd dword es:[edi], eax
push dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x34c]
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x34c]
push 0x402298
push eax
call esi
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40598b
xor eax, eax
jmp 0x405b24
lea ecx, [ebp - 0x248]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x405b18
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpA]
cmp byte [ebp - 0x21c], 0x2e
je 0x405b00
test byte [ebp - 0x248], 0x10
push dword [ebp + 8]
je 0x4059f9
lea eax, [ebp - 0x450]
push eax
call edi
lea eax, [ebp - 0x450]
push 0x402294
push eax
call esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x450]
push eax
call esi
lea eax, [ebp - 0x450]
push eax
call fcn.00405895
pop ecx
jmp 0x405b00
lea eax, [ebp - 0x108]
push eax
call edi
lea eax, [ebp - 0x108]
push 0x402294
push eax
call esi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x108]
push eax
call esi
lea eax, [ebp - 0x108]
push 0x4028d8
push eax
call fcn.00403e33
pop ecx
push eax
call ebx
test eax, eax
je 0x405a9d
lea eax, [ebp - 0x108]
push 0x4028d4
push eax
call fcn.00403e33
pop ecx
push eax
call ebx
test eax, eax
je 0x405a9d
lea eax, [ebp - 0x108]
push 0x4028d0
push eax
call fcn.00403e33
pop ecx
push eax
call ebx
test eax, eax
je 0x405a9d
lea eax, [ebp - 0x108]
push 0x4028cc
push eax
call fcn.00403e33
pop ecx
push eax
call ebx
test eax, eax
je 0x405a9d
lea eax, [ebp - 0x108]
push 0x4028c8
push eax
call fcn.00403e33
pop ecx
push eax
call ebx
test eax, eax
jne 0x405b00
lea eax, [ebp - 0x108]
push eax
push 0x402260
call sub.MSVCRT.dll_printf
lea eax, [ebp - 0x108]
push 0x407ad0
push eax
lea eax, [ebp - 0x554]
push eax
lea eax, [ebp - 0x658]
push 0x4028b4
push eax
call sub.MSVCRT.dll_sprintf
lea eax, [ebp - 0x658]
push eax
push 0x402670
call sub.MSVCRT.dll_printf
add esp, 0x24
lea eax, [ebp - 0x658]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
push 0xdac
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x248]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4059a7
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret