Function at 0x408820
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a5d9d
mov eax, dword fs:[0]
push eax
sub esp, 0xbc0
mov eax, dword [0x4cd00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov eax, dword [ebp + 8]
push 0x250
mov dword [ebp - 0xbc0], eax
lea eax, [ebp - 0x4cc]
push 0
push eax
call fcn.00445940
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 8
jb 0x40887b
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea ecx, [ebp - 0x4cc]
push ecx
push eax
call ebx
push 0x250
mov dword [ebp - 0xbc4], eax
lea eax, [ebp - 0x27c]
push 0
push eax
call fcn.00445940
add esp, 0xc
mov ecx, esi
cmp dword [esi + 0x14], 8
jb 0x4088b1
mov ecx, dword [esi]
lea eax, [ebp - 0x27c]
push eax
push ecx
call ebx
push 0x250
mov ebx, eax
lea eax, [ebp - 0x71c]
push 0
push eax
call fcn.00445940
mov eax, dword [ebp - 0xbc0]
add esp, 0xc
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x4088e3
mov ecx, dword [eax]
lea eax, [ebp - 0x71c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp dword [ebp - 0xbc4], 0xffffffff
mov ecx, eax
jne 0x408925
cmp ebx, 0xffffffff
jne 0x408925
cmp ecx, ebx
jne 0x408928
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00443db6
mov esp, ebp
pop ebp
ret 4
cmp ecx, 0xffffffff
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
je 0x408a92
push ecx
call eax
cmp ebx, 0xffffffff
jne 0x408a8d
push 0x250
lea eax, [ebp - 0x96c]
push 0
push eax
call fcn.00445940
add esp, 0xc
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x40895f
mov eax, dword [esi]
lea ecx, [ebp - 0x96c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push 0x250
mov dword [ebp - 0xbc8], eax
lea eax, [ebp - 0xbbc]
push 0
push eax
call fcn.00445940
mov ebx, dword [ebp - 0xbc0]
add esp, 0xc
mov ecx, ebx
cmp dword [ebx + 0x14], 8
jb 0x408999
mov ecx, dword [ebx]
lea eax, [ebp - 0xbbc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xbc0], eax
cmp eax, 0xffffffff
je 0x408905
mov eax, dword [ebp - 0xbc8]
cmp eax, 0xffffffff
je 0x4089c8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0xbc0]
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040a840
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 8
jb 0x4089ec
mov ebx, dword [ebx]
sub esp, 8
lea edx, [ebp - 0x2c]
mov ecx, ebx
call fcn.0041f660
add esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x408a06
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x408ac3
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x408a56
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408a4c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408ba6
push edx
push ecx
call fcn.0044434d
add esp, 8
xor eax, eax
mov dword [ebp - 0x1c], 0
cmp dword [esi + 0x14], 8
mov word [ebp - 0x2c], ax
mov eax, esi
mov dword [ebp - 0x18], 7
jb 0x408a74
mov eax, dword [esi]
lea ecx, [ebp - 0x27c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x408905
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0xbc4]
cmp ecx, 0xffffffff
jne 0x408b06
cmp ebx, ecx
je 0x408aa4
push ebx
call eax
cmp dword [edi + 0x14], 8
jb 0x408aac
mov edi, dword [edi]
cmp dword [esi + 0x14], 8
jb 0x408ab4
mov esi, dword [esi]
push ecx
mov edx, edi
mov ecx, esi
call fcn.00416470
jmp 0x408907
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x408905
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408af7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408ba6
push edx
push ecx
call fcn.0044434d
add esp, 8
jmp 0x408905
push ecx
call eax
cmp ebx, 0xffffffff
jne 0x408b2d
cmp dword [esi + 0x14], 8
jb 0x408b16
mov esi, dword [esi]
cmp dword [edi + 0x14], 8
jb 0x408b1e
mov edi, dword [edi]
push ecx
mov edx, esi
mov ecx, edi
call fcn.00416470
jmp 0x408907
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edx, dword [ebp - 0x4b8]
mov ebx, dword [ebp - 0x268]
mov eax, dword [ebp - 0x4b4]
mov ecx, dword [ebp - 0x264]
cmp edx, ebx
jne 0x408b5e
cmp eax, ecx
jne 0x408b60
mov eax, 1
jmp 0x408907
cmp eax, ecx
jb 0x408b87
ja 0x408b68
cmp edx, ebx
jbe 0x408b87
cmp dword [esi + 0x14], 8
jb 0x408b70
mov esi, dword [esi]
cmp dword [edi + 0x14], 8
jb 0x408b78
mov edi, dword [edi]
push ecx
mov edx, esi
mov ecx, edi
call fcn.004165e0
jmp 0x408907
cmp dword [edi + 0x14], 8
jb 0x408b8f
mov edi, dword [edi]
cmp dword [esi + 0x14], 8
jb 0x408b97
mov esi, dword [esi]
push ecx
mov edx, edi
mov ecx, esi
call fcn.004165e0
jmp 0x408907
call fcn.00447297
int3