Function at 0x402690
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a0
mov eax, dword [0x4054c4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x29c], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll__wcsdup]
add esp, 4
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x2f
je 0x402702
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 8]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x5c
jne 0x402719
mov edx, dword [ebp - 0x3c]
sub edx, 1
mov dword [ebp - 0x3c], edx
xor eax, eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp + 8]
mov word [edx + ecx*2], ax
jmp 0x4026e2
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll__wstat64i32]
add esp, 8
test eax, eax
je 0x402742
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
xor eax, eax
jmp 0x402989
mov eax, dword [ebp + 0xc]
mov dword [0x405510], eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov dword [0x405514], eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
lea ecx, [esi + eax + 1]
lea edx, [ecx + ecx + 6]
push edx
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp + 0xc]
push eax
movzx ecx, word [0x4054ac]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x405470
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.MSVCR100.dll__swprintf]
add esp, 0x14
lea ecx, [ebp - 0x290]
push ecx
mov edx, dword [ebp - 0x29c]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x298], eax
cmp dword [ebp - 0x298], 0xffffffff
je 0x4028df
lea eax, [ebp - 0x264]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402d60
add esp, 8
push eax
lea edx, [ebp - 0x264]
push edx
call fcn.00402c00
add esp, 8
test eax, eax
je 0x402819
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.MSVCR100.dll__wcsdup]
add esp, 4
mov dword [ebp - 0x2a0], eax
lea ecx, [ebp - 0x290]
push ecx
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x4028d2
lea eax, [ebp - 0x264]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00402d60
add esp, 8
push eax
lea edx, [ebp - 0x264]
push edx
call fcn.00402c00
add esp, 8
test eax, eax
je 0x4028cd
cmp dword [ebp - 0x2a0], 0
jne 0x40287d
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.MSVCR100.dll__wcsdup]
add esp, 4
mov dword [ebp - 0x2a0], eax
jmp 0x4028cd
mov ecx, dword [0x405514]
lea edx, [ebp + ecx*2 - 0x262]
push edx
mov eax, dword [0x405514]
mov ecx, dword [ebp - 0x2a0]
lea edx, [ecx + eax*2 + 2]
push edx
call fcn.004029a0
add esp, 8
test eax, eax
jge 0x4028cd
mov eax, dword [ebp - 0x2a0]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
lea ecx, [ebp - 0x264]
push ecx
call dword [sym.imp.MSVCR100.dll__wcsdup]
add esp, 4
mov dword [ebp - 0x2a0], eax
jmp 0x402819
mov edx, dword [ebp - 0x298]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x2a0], 0
je 0x402976
mov eax, dword [ebp - 0x2a0]
push eax
call dword [sym.imp.MSVCR100.dll_wcslen]
add esp, 4
mov ecx, dword [ebp - 0x3c]
lea edx, [ecx + eax + 1]
lea eax, [edx + edx + 2]
push eax
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp - 0x294], eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x294]
push edx
call dword [sym.imp.MSVCR100.dll_wcscpy]
add esp, 8
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x294]
mov dx, word [0x4054ac]
mov word [ecx + eax*2], dx
xor eax, eax
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x294]
mov word [edx + ecx*2 + 2], ax
mov eax, dword [ebp - 0x2a0]
push eax
mov ecx, dword [ebp - 0x294]
push ecx
call dword [sym.imp.MSVCR100.dll_wcscat]
add esp, 8
mov edx, dword [ebp - 0x2a0]
push edx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
mov eax, dword [ebp - 0x294]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004034c6
mov esp, ebp
pop ebp
ret