Function at 0x408140
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
sub esp, 0x6d0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x6cc], eax
mov eax, dword [esp + 0x6d4]
push ebx
push ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x6e4]
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x6f8]
push edi
mov dword [esp + 0x20], eax
xor eax, eax
push 0x206
push eax
mov word [esp + 0x4d8], ax
lea eax, [esp + 0x4da]
mov edi, ecx
mov ebx, edx
xor esi, esi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], ebx
xor ebp, ebp
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], esi
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [esp + 0x280]
push eax
test esi, esi
jne 0x40820e
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [esp + 0x14], esi
cmp esi, 0xffffffff
jne 0x408221
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4083d8
mov ebp, eax
test eax, eax
jle 0x4081f4
and ebp, 0xffff
or ebp, 0x80070000
push ebp
push str.FindFirstFile_failed__hr__error:_0x_08X_n
push 1
mov ebx, 0x415428
call fcn.00401660
add esp, 0xc
jmp 0x4083d8
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4083a2
lea eax, [esp + 0x2ac]
push eax
push dword [esp + 0x2c]
mov eax, 0x104
push str._s_s
lea edi, [esp + 0x4dc]
call fcn.00401210
mov ebp, eax
add esp, 0xc
test ebp, ebp
js 0x40839a
mov edi, dword [esp + 0x6f8]
test edi, edi
je 0x40828e
xor dl, dl
xor ecx, ecx
nop
test dl, dl
jne 0x40828e
mov eax, dword [esp + 0x6f4]
mov ax, word [eax + ecx*2]
mov edx, dword [esp + 0x6f0]
cmp ax, word [esp + edx*2 + 0x4d0]
sete dl
inc ecx
cmp ecx, edi
jb 0x408260
test dl, dl
je 0x408313
mov eax, dword [esp + 0x29c]
mov ecx, 0x94
lea esi, [esp + 0x280]
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
test eax, eax
jne 0x408362
mov eax, dword [esp + 0x2a0]
add dword [ebx], eax
adc dword [ebx + 4], 0
cmp dword [ebx + 4], 0
jg 0x408341
jl 0x4082cc
cmp dword [ebx], 0xa00000
jae 0x408341
push dword [esp + 0x6e8]
mov edi, dword [esp + 0x24]
inc dword [edi]
push 5
lea eax, [esp + 0x4d8]
push eax
push dword [esp + 0x38]
call dword [sym.imp.wer.dll_WerReportAddFile]
mov ebp, eax
mov ebx, 0x415428
test ebp, ebp
js 0x40832b
lea eax, [esp + 0x4d0]
push eax
push str.Collected_extra_file___ls._n
push 2
call fcn.00401660
mov ebx, dword [esp + 0x28]
add esp, 0xc
cmp dword [esp + 0x18], 0
mov esi, dword [esp + 0x14]
je 0x4083d4
mov edi, dword [esp + 0x24]
jmp 0x4081b5
push ebp
push str.WerReportAddfile_Extra_File_failed__error:_0x_08X_n
push 1
call fcn.00401660
mov esi, dword [esp + 0x20]
jmp 0x4083d1
push dword [ebx + 4]
push dword [ebx]
mov ebx, 0x415428
push eax
lea eax, [esp + 0x68]
push eax
push str.totalSize_has_exceeded_limit__fileName___s__fileSizeLow___d__totalSize___lld_n
push 1
call fcn.00401660
add esp, 0x18
jmp 0x408377
push eax
push str.fileSizeHigh___0__fileSizeHigh___d_n
push 1
mov ebx, 0x415428
call fcn.00401660
add esp, 0xc
mov eax, dword [esp + 0x1c]
push dword [eax + 4]
mov ebx, 0x415428
push dword [eax]
push str.Total_Size_of_Files___lld__has_exceeded_limit_n
push 1
call fcn.00401660
mov esi, dword [esp + 0x24]
add esp, 0x10
jmp 0x4083d4
push ebp
push str.StringCchPrintfW_fileToCollect__failed__error:_0x_08X_n
jmp 0x4083c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x4083d4
mov ebp, eax
test eax, eax
jle 0x4083bf
and ebp, 0xffff
or ebp, 0x80070000
push ebp
push str.FindNextFile_failed__hr__error:_0x_08X_n
push 1
mov ebx, 0x415428
call fcn.00401660
add esp, 0xc
test esi, esi
je 0x4083df
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x6dc]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.0040bb9d
add esp, 0x6d0
ret 0x1c