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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cab09
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30c
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x34], ecx
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0
call fcn.00411ab0
mov esi, dword [ebx + 4]
mov eax, 0x2aaaaaab
sub esi, dword [ebx]
mov edi, 0
imul esi
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
mov dword [ebp - 0x30], esi
je 0x40f8b5
xor ebx, ebx
jmp 0x40f790
xor eax, eax
mov dword [ebp - 0x18], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x2c], ax
lea ecx, [ebp - 0x2c]
lea eax, [ebp + 8]
mov dword [ebp - 0x1c], 0
push eax
call fcn.00414690
mov byte [ebp - 4], 1
xor ecx, ecx
mov eax, dword [ebp - 0x14]
push 0xffffffffffffffff
push ecx
mov word [ebp - 0x64], cx
lea ecx, [ebp - 0x64]
mov eax, dword [eax]
add eax, ebx
mov dword [ebp - 0x50], 7
push eax
mov dword [ebp - 0x54], 0
call fcn.00414690
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x1c]
cmp edx, 1
jbe 0x40f870
mov ecx, dword [ebp - 0x54]
cmp ecx, 1
jbe 0x40f870
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
cmp word [eax + edx*2 - 2], 0x5c
je 0x40f81b
push 1
push 0x500050
lea ecx, [ebp - 0x2c]
call fcn.00415ae0
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x50]
lea eax, [ebp - 0x64]
mov esi, dword [ebp - 0x64]
cmp edx, 8
cmovae eax, esi
cmp word [eax + ecx*2 - 2], 0x5c
je 0x40f847
push 1
push 0x500050
lea ecx, [ebp - 0x64]
call fcn.00415ae0
mov edx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x64]
cmp edx, 8
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x2c]
cmovae ecx, esi
cmp dword [ebp - 0x18], 8
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.00420235
add esp, 8
test eax, eax
je 0x40f927
mov esi, dword [ebp - 0x30]
cmp dword [ebp - 0x50], 8
jb 0x40f881
push dword [ebp - 0x64]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x50], 7
mov byte [ebp - 4], al
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], ax
jb 0x40f8a9
push dword [ebp - 0x2c]
call fcn.00422587
add esp, 4
inc edi
add ebx, 0x18
cmp edi, esi
jb 0x40f790
xor eax, eax
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], 0
mov word [ebp - 0x7c], ax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x4c]
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x4c], ax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x38], 7
call fcn.00414690
mov byte [ebp - 4], 4
lea eax, [ebp - 0x4c]
cmp dword [ebp - 0x38], 8
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
cmovae eax, dword [ebp - 0x4c]
push eax
call ebx
mov edx, eax
mov dword [ebp - 0x80], 7
xor eax, eax
mov dword [ebp - 0x84], 0
mov word [ebp - 0x94], ax
cmp word [edx], ax
jne 0x40f966
xor ecx, ecx
jmp 0x40f97f
cmp dword [ebp - 0x50], 8
jb 0x40f938
push dword [ebp - 0x64]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x50], 7
cmp dword [ebp - 0x18], 8
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], ax
jb 0x4100ea
push dword [ebp - 0x2c]
call fcn.00422587
add esp, 4
jmp 0x4100ea
mov ecx, edx
lea esi, [ecx + 2]
jmp 0x40f970
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f970
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x94]
call fcn.00415c10
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4c]
mov eax, dword [ebp - 0x3c]
sub eax, dword [ebp - 0x84]
push eax
push 0
lea eax, [ebp - 0x2c]
push eax
call fcn.00413520
mov esi, eax
lea eax, [ebp - 0x4c]
cmp eax, esi
je 0x40fa1e
cmp dword [ebp - 0x38], 8
jb 0x40f9c2
push dword [ebp - 0x4c]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
cmp dword [esi + 0x14], 8
jae 0x40f9f4
mov eax, dword [esi + 0x10]
inc eax
je 0x40f9ff
add eax, eax
push eax
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.004205a0
add esp, 0xc
jmp 0x40f9ff
mov eax, dword [esi]
mov dword [ebp - 0x4c], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x18], 8
jb 0x40fa2f
push dword [ebp - 0x2c]
call fcn.00422587
add esp, 4
xor edi, edi
cmp dword [ebp - 0x3c], 0
jne 0x40fa44
cmp dword [ebp - 0x84], 0
je 0x40fb28
inc edi
lea eax, [ebp - 0x4c]
cmp dword [ebp - 0x38], 8
cmovae eax, dword [ebp - 0x4c]
push eax
call ebx
mov edx, eax
cmp word [edx], 0
jne 0x40fa5f
xor ecx, ecx
jmp 0x40fa73
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fa64
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x94]
call fcn.00415c10
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x4c]
sub eax, dword [ebp - 0x84]
push eax
push 0
lea eax, [ebp - 0x2c]
push eax
call fcn.00413520
mov esi, eax
lea eax, [ebp - 0x4c]
cmp eax, esi
je 0x40fb0e
cmp dword [ebp - 0x38], 8
jb 0x40fab2
push dword [ebp - 0x4c]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
cmp dword [esi + 0x14], 8
jae 0x40fae4
mov eax, dword [esi + 0x10]
inc eax
je 0x40faef
add eax, eax
push eax
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.004205a0
add esp, 0xc
jmp 0x40faef
mov eax, dword [esi]
mov dword [ebp - 0x4c], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x18], 8
jb 0x40fa31
push dword [ebp - 0x2c]
call fcn.00422587
add esp, 4
jmp 0x40fa31
cmp edi, 3
jg 0x40fcf0
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00414690
call fcn.0040f310
add esp, 0x18
test al, al
jne 0x40fcf0
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x7c]
call fcn.00414690
mov eax, dword [ebp - 0x6c]
lea ecx, [ebp - 0x58]
add eax, 0x400
push eax
call fcn.00413a90
mov byte [ebp - 4], 6
xor ecx, ecx
mov eax, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x58]
test eax, eax
je 0x40fbbb
jmp 0x40fba0
cmp dword [ebp - 0x68], 8
lea eax, [ebp - 0x7c]
cmovae eax, dword [ebp - 0x7c]
mov ax, word [eax + ecx*2]
mov word [esi + ecx*2], ax
inc ecx
mov eax, dword [ebp - 0x6c]
cmp ecx, eax
jb 0x40fba0
mov ebx, dword [ebp - 0x34]
xor ecx, ecx
mov word [esi + eax*2 + 2], cx
lea eax, [ebx + 0x820]
cmp dword [eax + 0x14], 8
jb 0x40fbd3
mov eax, dword [eax]
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x18], 7
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
push esi
mov word [ebp - 0x2c], ax
call fcn.00418400
cmp dword [ebp - 0x68], 8
jb 0x40fc0f
push dword [ebp - 0x7c]
call fcn.00422587
add esp, 4
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], 0
mov word [ebp - 0x7c], ax
cmp ecx, 8
jae 0x40fc49
mov eax, dword [ebp - 0x1c]
inc eax
je 0x40fc4f
add eax, eax
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.004205a0
mov ecx, dword [ebp - 0x18]
add esp, 0xc
jmp 0x40fc4f
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x1c]
cmp ecx, 8
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x7c]
cmovae eax, dword [ebp - 0x7c]
push eax
mov dword [ebp - 0x68], ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fcdf
push 0x7d00
call fcn.00420c62
lea ecx, [ebx + 0x838]
add esp, 4
cmp dword [ecx + 0x14], 8
mov edi, eax
jb 0x40fc8a
mov ecx, dword [ecx]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [ebx + 0x864], 8
lea eax, [ebx + 0x850]
jb 0x40fca3
mov eax, dword [eax]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x7c]
push eax
call fcn.00414690
mov ecx, edi
call fcn.0040f0e0
push edi
call fcn.00420bed
add esp, 0x1c
mov byte [ebp - 4], 5
test esi, esi
je 0x40fcf0
push esi
call fcn.00422587
add esp, 4
push 0x500224
lea edx, [ebp + 8]
lea ecx, [ebp - 0x64]
call fcn.00417140
add esp, 4
cmp dword [eax + 0x14], 8
jb 0x40fd0b
mov eax, dword [eax]
lea ecx, [ebp - 0x318]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp dword [ebp - 0x50], 8
mov dword [ebp - 0x30], eax
jb 0x40fd30
push dword [ebp - 0x64]
call fcn.00422587
mov eax, dword [ebp - 0x30]
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x50], 7
xor ebx, ebx
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], cx
mov dword [ebp - 0x14], ebx
cmp eax, 0xffffffff
je 0x410072
mov esi, dword [ebp - 0x30]
jmp 0x40fd60
mov ecx, 0x500228
lea eax, [ebp - 0x2ec]
jmp 0x40fd70
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40fd96
test dx, dx
je 0x40fd92
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40fd96
add eax, 4
add ecx, 4
test dx, dx
jne 0x40fd70
xor eax, eax
jmp 0x40fd9b
sbb eax, eax
or eax, 1
test eax, eax
je 0x410052
mov ecx, 0x50022c
lea eax, [ebp - 0x2ec]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40fdd6
test dx, dx
je 0x40fdd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40fdd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40fdb0
xor eax, eax
jmp 0x40fddb
sbb eax, eax
or eax, 1
test eax, eax
je 0x410052
test byte [ebp - 0x318], 0x10
je 0x40fec2
lea eax, [ebp - 0x2ec]
push eax
lea edx, [ebp + 8]
lea ecx, [ebp - 0xc8]
call fcn.00417140
add esp, 4
push 1
push 0x500050
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 7
call fcn.00415ae0
xor eax, eax
mov dword [ebp - 0x9c], 7
mov dword [ebp - 0xa0], 0
mov word [ebp - 0xb0], ax
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0xc8]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0xb0]
call fcn.00414690
mov ecx, dword [ebp + 0x20]
lea eax, [ebp - 0xb0]
push eax
mov byte [ebp - 0x98], 0
call fcn.00413b70
cmp dword [ebp - 0x9c], 8
jb 0x40fe81
push dword [ebp - 0xb0]
call fcn.00422587
add esp, 4
xor eax, eax
mov byte [ebp - 4], 5
cmp dword [ebp - 0xb4], 8
mov dword [ebp - 0x9c], 7
mov dword [ebp - 0xa0], 0
mov word [ebp - 0xb0], ax
jb 0x410052
push dword [ebp - 0xc8]
call fcn.00422587
add esp, 4
jmp 0x410052
inc ebx
mov dword [ebp - 0x14], ebx
cmp ebx, 0x400
jl 0x40feda
mov dword [ebp - 0x14], 0
call fcn.00411ab0
cmp byte [ebp + 0x24], 0
je 0x410052
xor eax, eax
mov dword [ebp - 0x18], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x2c], ax
lea ecx, [ebp - 0x2c]
lea eax, [ebp + 8]
mov dword [ebp - 0x1c], 0
push eax
call fcn.00414690
mov byte [ebp - 4], 9
cmp word [ebp - 0x2ec], 0
jne 0x40ff19
xor ecx, ecx
jmp 0x40ff31
lea ecx, [ebp - 0x2ec]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ff22
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x2ec]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00415ae0
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov ebx, eax
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 0x34]
mov esi, dword [eax + 0x88c]
mov edi, dword [eax + 0x890]
cmp esi, edi
je 0x40ff9a
lea esp, [esp]
cmp dword [esi + 0x14], 8
jb 0x40ff7a
mov eax, dword [esi]
jmp 0x40ff7c
mov eax, esi
push ebx
push eax
call fcn.00421c02
add esp, 8
test eax, eax
jne 0x40ff93
add esi, 0x18
cmp esi, edi
jne 0x40ff70
jmp 0x40ff97
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x34]
mov esi, dword [eax + 0x898]
mov edi, dword [eax + 0x89c]
cmp esi, edi
je 0x40ffda
lea ebx, [ebx]
cmp dword [esi + 0x14], 8
jb 0x40ffba
mov eax, dword [esi]
jmp 0x40ffbc
mov eax, esi
lea ecx, [ebp - 0x2ec]
push ecx
push eax
call fcn.00421c02
add esp, 8
test eax, eax
jne 0x41003a
add esi, 0x18
cmp esi, edi
jne 0x40ffb0
mov eax, dword [ebp - 0x34]
cmp byte [ebp - 0xd], 0
jne 0x41003a
add eax, 0x868
cmp dword [eax + 0x14], 8
jb 0x40ffed
mov eax, dword [eax]
push ebx
push eax
call fcn.00421c02
add esp, 8
test eax, eax
jne 0x41003a
mov ebx, dword [ebp - 0x34]
cmp dword [ebx + 0x834], 8
lea ecx, [ebx + 0x820]
jb 0x41000f
mov ecx, dword [ecx]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push ecx
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.00421c02
add esp, 8
test eax, eax
jne 0x41003a
cmp dword [ebp - 0x18], 8
lea edx, [ebp - 0x2c]
mov ecx, ebx
cmovae edx, dword [ebp - 0x2c]
call fcn.004111c0
mov byte [ebp - 4], 5
cmp dword [ebp - 0x18], 8
jb 0x41004f
push dword [ebp - 0x2c]
call fcn.00422587
add esp, 4
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x318]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ebx, dword [ebp - 0x14]
test eax, eax
jne 0x40fd60
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x80], 8
jb 0x410086
push dword [ebp - 0x94]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x80], 7
cmp dword [ebp - 0x38], 8
mov dword [ebp - 0x84], 0
mov word [ebp - 0x94], ax
jb 0x4100b1
push dword [ebp - 0x4c]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], 7
cmp dword [ebp - 0x68], 8
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x4c], ax
jb 0x4100d6
push dword [ebp - 0x7c]
call fcn.00422587
add esp, 4
xor eax, eax
mov dword [ebp - 0x68], 7
mov dword [ebp - 0x6c], 0
mov word [ebp - 0x7c], ax
cmp dword [ebp + 0x1c], 8
jb 0x4100fb
push dword [ebp + 8]
call fcn.00422587
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret