Function at 0x4050c6
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4275c2
mov eax, dword fs:[0]
push eax
sub esp, 0xca8
mov eax, dword [0x4362ec]
xor eax, esp
mov dword [esp + 0xca0], eax
push ebx
push esi
push edi
mov eax, dword [0x4362ec]
xor eax, esp
push eax
lea eax, [esp + 0xcb8]
mov dword fs:[0], eax
lea eax, [esp + 0xa9c]
push eax
xor ebx, ebx
push ebx
push ebx
push 0x28
mov esi, ecx
push ebx
mov dword [esp + 0x3c], esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x405360
lea eax, [esp + 0xa9c]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], ebx
call fcn.00407ade
mov dword [esp + 0xcc0], ebx
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
mov dword [esp + 0x28], ebx
call fcn.0040cf32
push dword [esp + 0x20]
lea edi, [esp + 0x24]
push dword [esp + 0x18]
call fcn.0040746a
mov eax, dword [eax]
mov dword [esp + 0x18], eax
mov byte [esp + 0xcc0], 1
lea eax, [esp + 0x27c]
push eax
call fcn.004061c1
mov byte [esp + 0xcc0], 2
push dword [esp + 0x18]
lea ecx, [esp + 0x280]
push str._s
call fcn.0040999a
pop ecx
pop ecx
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x280]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4051ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40531e
mov dword [esp + 0x20], 0xa
test byte [esp + 0x2c], 0x10
je 0x405263
mov eax, 0x42bf9c
lea ecx, [esp + 0x58]
call fcn.00407380
test al, al
jne 0x405263
mov eax, 0x42bfa0
lea ecx, [esp + 0x58]
call fcn.00407380
test al, al
jne 0x405263
lea eax, [esp + 0x68c]
push eax
call fcn.004061c1
mov byte [esp + 0xcc0], 3
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x1c]
lea ecx, [esp + 0x694]
push str._s_s_
call fcn.0040999a
add esp, 0xc
lea eax, [esp + 0x1f]
push eax
push dword [esp + 0x690]
mov ecx, esi
mov byte [esp + 0x27], bl
call fcn.00405386
test al, al
jne 0x4052b5
mov byte [esp + 0xcc0], 2
lea eax, [esp + 0x68c]
push eax
call fcn.0040e135
inc dword [esp + 0x20]
push dword [esp + 0x20]
add esi, 0x14
call fcn.00406b39
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4052a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
mov dword [esp + 0x24], eax
je 0x4052a6
mov esi, dword [esp + 0x28]
push eax
push str.FindNextFile_failed__Error___d
add esi, 0x3c
call fcn.00406a13
pop ecx
pop ecx
cmp dword [esp + 0x24], ebx
jne 0x405317
mov esi, dword [esp + 0x28]
jmp 0x4051d2
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov byte [esp + 0xcc0], 2
lea eax, [esp + 0x68c]
push eax
call fcn.0040e135
mov byte [esp + 0xcc0], 1
lea eax, [esp + 0x27c]
push eax
call fcn.0040e135
mov byte [esp + 0xcc0], bl
cmp dword [esp + 0x18], ebx
je 0x4052fc
lea ecx, [esp + 0x18]
call fcn.00407c65
or dword [esp + 0xcc0], 0xffffffff
cmp dword [esp + 0x14], ebx
je 0x405313
lea ecx, [esp + 0x14]
call fcn.00407c65
xor al, al
jmp 0x405362
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov byte [esp + 0xcc0], 1
lea eax, [esp + 0x27c]
push eax
call fcn.0040e135
mov byte [esp + 0xcc0], bl
cmp dword [esp + 0x18], ebx
je 0x405349
lea ecx, [esp + 0x18]
call fcn.00407c65
or dword [esp + 0xcc0], 0xffffffff
cmp dword [esp + 0x14], ebx
je 0x405360
lea ecx, [esp + 0x14]
call fcn.00407c65
mov al, 1
mov ecx, dword [esp + 0xcb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xca0]
xor ecx, esp
call fcn.004147b8
mov esp, ebp
pop ebp
ret