Function at 0x418540
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
mov eax, dword [0x4cf06c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x26c], eax
mov eax, dword [edi + 0xc2c]
lea ebx, [edi + 0xc40]
mov dword [edi + 0xc34], 0
mov dword [edi + 0xc58], 0
mov dword [edi + 0xc48], 0
push dword [edi + 0x89c]
mov edx, dword [edi + 0x898]
mov ecx, dword [edi + 0x838]
sub esp, 8
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x25c]
push eax
call fcn.0045a430
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4187e4
cmp esi, 0xffffffff
je 0x4187e4
nop dword [eax + eax]
cmp word [ebp - 0x230], 0x2e
jne 0x4185fe
mov ax, word [ebp - 0x22e]
test ax, ax
je 0x418750
cmp ax, 0x2e
jne 0x4185fe
cmp word [ebp - 0x22c], 0
je 0x418750
test byte [edi + 0x6ac], 8
je 0x41861a
push str.dir_d_
lea eax, [ebp - 0x25c]
mov ecx, edi
push eax
call fcn.0041da90
lea eax, [ebp - 0x25c]
push eax
call fcn.0041da60
mov edx, dword [ebx + 0x18]
mov dword [ebp - 0x264], edx
lea eax, [edx + 1]
cmp eax, edx
jbe 0x418674
shl eax, 2
mov dword [ebp - 0x268], eax
cmp eax, dword [ebx + 4]
jbe 0x41866b
cmp eax, dword [ebx + 0xc]
ja 0x418775
push dword [ebx + 0x14]
mov ecx, ebx
call fcn.004594d0
test eax, eax
je 0x418775
mov eax, dword [ebp - 0x268]
mov edx, dword [ebp - 0x264]
mov dword [ebx + 8], eax
lea eax, [edx + 1]
mov dword [ebx + 0x18], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x260]
mov dword [eax + edx*4], ecx
mov eax, dword [edi + 0x690]
and eax, 0x4000
or eax, 0
je 0x4186e1
mov eax, dword [ebp - 0x25c]
and eax, 0x410
cmp eax, 0x400
jne 0x4186e1
cmp dword [ebp - 0x238], 0xa000000c
jne 0x4186e1
mov eax, dword [edi + 0x838]
lea edx, [ebp - 0x230]
mov ecx, dword [ebp - 0x26c]
lea ecx, [eax + ecx*2]
call fcn.0041ae30
push dword [edi + 0x888]
mov ecx, dword [edi + 0x838]
lea edx, [ebp - 0x25c]
call fcn.00418460
add esp, 4
push 0
push 1
push dword [ebp - 0x260]
lea eax, [ebp - 0x25c]
mov ecx, edi
push eax
call fcn.00419260
mov edx, dword [edi + 0xc30]
mov ecx, eax
mov eax, dword [edi + 0xc34]
mov dword [ebp - 0x264], ecx
add ecx, eax
cmp ecx, edx
jbe 0x418714
int3
add eax, dword [ebp - 0x264]
sub edx, eax
mov dword [edi + 0xc34], eax
cmp edx, dword [edi + 0x868]
ja 0x41873e
push 0x40000
lea ecx, [edi + 0xc2c]
call fcn.004594d0
test eax, eax
je 0x418780
mov eax, dword [edi + 0xc34]
add eax, dword [edi + 0xc2c]
mov dword [ebp - 0x260], eax
cmp dword [edi + 0xff4], 0
jne 0x418866
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4185d0
jmp 0x418790
push 1
push 0
push str.Cant_alloc_memory_dstStatIdxVec_
jmp 0x418789
push 1
push 0
push str.Cant_alloc_memory_dstStatBuf_
mov ecx, edi
call fcn.00419420
cmp dword [edi + 0xff4], 0
jne 0x418866
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x418866
mov eax, dword [edi + 0xb50]
add dword [eax + 0xe0], 1
adc dword [eax + 0xe4], 0
xor ebx, ebx
mov ecx, dword [edi + 0x84c]
mov eax, dword [edi + 0x838]
push ebx
lea eax, [eax + ecx*2]
mov ecx, edi
push eax
push str.FindNextFile_stat_
call fcn.00419420
jmp 0x418887
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x418866
mov ecx, dword [edi + 0x844]
mov edx, 0x4b0510
mov eax, dword [edi + 0x838]
lea eax, [eax + ecx*2]
mov cx, word [eax]
cmp cx, word [edx]
jne 0x418829
test cx, cx
je 0x418825
mov cx, word [eax + 2]
cmp cx, word [edx + 2]
jne 0x418829
add eax, 4
add edx, 4
test cx, cx
jne 0x418803
xor eax, eax
jmp 0x41882e
sbb eax, eax
or eax, 1
test eax, eax
jne 0x418866
mov eax, dword [edi + 0xb50]
xor ebx, ebx
push ebx
add dword [eax + 0xd8], 1
adc dword [eax + 0xdc], ebx
mov ecx, dword [edi + 0x84c]
mov eax, dword [edi + 0x838]
lea eax, [eax + ecx*2]
mov ecx, edi
push eax
push 0x4b0514
call fcn.00419420
jmp 0x418887
push ebx
lea ecx, [edi + 0x7a8]
call fcn.004188b0
mov ebx, eax
test ebx, ebx
jne 0x418887
push 1
push eax
push 0x4b0600
mov ecx, edi
call fcn.00419420
test esi, esi
je 0x418897
cmp esi, 0xffffffff
je 0x418897
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047d39f
mov esp, ebp
pop ebp
ret 4