Function at 0x40f2d0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x45d946
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x491104]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x491104]
xor eax, esp
push eax
lea eax, [esp + 0x290]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2a4]
mov dword [esp + 0x2c], eax
xor ebx, ebx
mov dword [esp + 0x298], ebx
mov eax, dword [esp + 0x2a0]
cmp dword [eax - 0xc], ebx
je 0x40f5c4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40f5c4
push 0x46c1d4
lea ecx, [esp + 0x1c]
call fcn.00406e00
mov byte [esp + 0x298], 1
push 0x46c1d8
lea ecx, [esp + 0x2c]
call fcn.00406e00
mov byte [esp + 0x298], 2
lea ecx, [esp + 0x24]
call fcn.00406fc0
mov byte [esp + 0x298], 3
lea ecx, [esp + 0x20]
call fcn.00406fc0
mov byte [esp + 0x298], 4
lea ecx, [esp + 0x1c]
call fcn.00406fc0
mov byte [esp + 0x298], 5
lea ecx, [esp + 0x2a0]
push ecx
lea ecx, [esp + 0x18]
call fcn.00406730
mov byte [esp + 0x298], 6
mov edx, dword [esp + 0x18]
push edx
push 0x46c1dc
lea ecx, [esp + 0x1c]
call fcn.0040faa0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
xor esi, esi
cmp eax, 2
jl 0x40f482
cmp eax, ebx
jge 0x40f3ea
push 0x80070057
call fcn.00406f30
movzx eax, word [ecx]
push eax
call fcn.00443800
mov ecx, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40f482
mov ebp, dword [ecx - 0xc]
cmp ebp, 1
jge 0x40f414
push 0x80070057
call fcn.00406f30
mov edi, dword [esp + 0x28]
mov eax, dword [edi - 0xc]
movzx edx, word [ecx + 2]
cmp eax, 1
jne 0x40f482
cmp eax, ebx
jge 0x40f432
push 0x80070057
call fcn.00406f30
movzx eax, word [edi]
cmp ax, dx
jne 0x40f482
cmp ebp, 2
jne 0x40f447
or esi, 0xffffffff
jmp 0x40f5e6
jge 0x40f453
push 0x80070057
call fcn.00406f30
movzx eax, word [ecx + 4]
push eax
lea eax, [esp + 0x1c]
call fcn.0040fde0
add esp, 4
test al, al
je 0x40f55f
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], 3
jne 0x40f5e6
or esi, 0xffffffff
jmp 0x40f5e6
mov ebp, dword [ecx - 0xc]
cmp ebp, 1
jl 0x40f5e6
cmp ebp, ebx
jge 0x40f49c
push 0x80070057
call fcn.00406f30
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 0xc]
movzx edx, word [ecx]
cmp eax, 1
jne 0x40f5e6
cmp eax, ebx
jge 0x40f4bd
push 0x80070057
call fcn.00406f30
movzx eax, word [edi]
cmp ax, dx
jne 0x40f5e6
cmp ebp, 1
jne 0x40f4d6
or esi, 0xffffffff
jmp 0x40f5e6
jge 0x40f4e2
push 0x80070057
call fcn.00406f30
movzx eax, word [ecx + 2]
push eax
lea eax, [esp + 0x1c]
call fcn.0040fde0
add esp, 4
test al, al
je 0x40f5e5
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x40f55f
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], ebx
jl 0x40f55f
push ecx
push eax
call fcn.0044298b
add esp, 8
cmp eax, ebx
je 0x40f55f
mov ecx, dword [esp + 0x14]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x40f55f
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40f5e2
cmp dword [ecx - 0xc], ebx
jl 0x40f5e2
push eax
push ecx
call fcn.0044298b
add esp, 8
cmp eax, ebx
je 0x40f5e2
sub eax, dword [esp + 0x14]
sar eax, 1
mov esi, eax
cmp esi, 1
jne 0x40f5e5
mov byte [esp + 0x298], 5
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x298], 4
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov byte [esp + 0x298], 3
lea ecx, [esp + 0x20]
call fcn.00406ed0
mov byte [esp + 0x298], 2
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x298], 1
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x298], bl
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x298], 0xffffffff
lea ecx, [esp + 0x2a0]
call fcn.00406ed0
xor eax, eax
jmp 0x40f9a9
or esi, 0xffffffff
inc esi
push 3
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x1c]
call fcn.00405ff0
mov byte [esp + 0x298], 7
push eax
lea ecx, [esp + 0x28]
call fcn.00406800
mov byte [esp + 0x298], 6
lea ecx, [esp + 0x30]
call fcn.00406ed0
push 3
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040f9e0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
call fcn.00406800
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x30]
call fcn.00406800
cmp esi, 0xffffffff
je 0x40f893
mov edi, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40f666
or esi, 0xffffffff
jmp 0x40f73a
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], ebx
jge 0x40f677
or esi, 0xffffffff
jmp 0x40f73a
push eax
push ecx
call fcn.0044298b
add esp, 8
cmp eax, ebx
jne 0x40f68d
or esi, 0xffffffff
jmp 0x40f73a
sub eax, dword [esp + 0x14]
sar eax, 1
mov esi, eax
jne 0x40f731
push 1
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040f9e0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00406510
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40f6c6
or esi, 0xffffffff
jmp 0x40f6f8
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], ebx
jge 0x40f6d4
or esi, 0xffffffff
jmp 0x40f6f8
push eax
push ecx
call fcn.0044298b
add esp, 8
cmp eax, ebx
jne 0x40f6e7
or esi, 0xffffffff
jmp 0x40f6f8
sub eax, dword [esp + 0x14]
sar eax, 1
mov esi, eax
cmp esi, 0xffffffff
jne 0x40f7c1
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00405ff0
mov byte [esp + 0x298], 8
push eax
lea ecx, [esp + 0x24]
call fcn.00406800
mov byte [esp + 0x298], 6
lea ecx, [esp + 0x30]
jmp 0x40f7ee
cmp esi, 0xffffffff
jne 0x40f7c1
mov edx, dword [esp + 0x14]
cmp dword [edx - 0xc], ebx
jg 0x40f6f8
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax]
mov esi, dword [ecx - 0xc]
mov byte [esp + 0x298], 5
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x298], 4
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov byte [esp + 0x298], 3
lea ecx, [esp + 0x20]
call fcn.00406ed0
mov byte [esp + 0x298], 2
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x298], 1
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x298], bl
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x298], 0xffffffff
jmp 0x40f99b
push esi
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x1c]
call fcn.00405ff0
mov byte [esp + 0x298], 9
push eax
lea ecx, [esp + 0x24]
call fcn.00406800
mov byte [esp + 0x298], 6
lea ecx, [esp + 0x34]
call fcn.00406ed0
push esi
push ebx
lea ecx, [esp + 0x1c]
call fcn.0040f9e0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.00406510
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x3c]
push eax
push ecx
call edi
cmp eax, 0xffffffff
je 0x40f55f
push eax
call ebp
lea eax, [esp + 0x68]
cmp esi, 0xffffffff
je 0x40f872
lea edx, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x40]
push ecx
call fcn.00406220
add esp, 0xc
mov byte [esp + 0x298], 0xa
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, dword [esp + 0x30]
push eax
call fcn.00406510
mov byte [esp + 0x298], 6
lea ecx, [esp + 0x38]
call fcn.00406ed0
jmp 0x40f656
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40f875
mov ecx, dword [esp + 0x2c]
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x6c]
push edx
call fcn.00406510
mov esi, dword [esp + 0x2c]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or edi, 0xffffffff
cmp eax, edi
jne 0x40f92a
mov byte [esp + 0x298], 5
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x298], 4
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov byte [esp + 0x298], 3
lea ecx, [esp + 0x20]
call fcn.00406ed0
mov byte [esp + 0x298], 2
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x298], 1
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x298], bl
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x298], edi
lea ecx, [esp + 0x2a0]
call fcn.00406ed0
xor eax, eax
jmp 0x40f9a9
mov edx, dword [esi]
mov esi, dword [edx - 0xc]
mov byte [esp + 0x298], 5
lea ecx, [esp + 0x14]
call fcn.00406ed0
mov byte [esp + 0x298], 4
lea ecx, [esp + 0x1c]
call fcn.00406ed0
mov byte [esp + 0x298], 3
lea ecx, [esp + 0x20]
call fcn.00406ed0
mov byte [esp + 0x298], 2
lea ecx, [esp + 0x24]
call fcn.00406ed0
mov byte [esp + 0x298], 1
lea ecx, [esp + 0x28]
call fcn.00406ed0
mov byte [esp + 0x298], bl
lea ecx, [esp + 0x18]
call fcn.00406ed0
mov dword [esp + 0x298], edi
lea ecx, [esp + 0x2a0]
call fcn.00406ed0
mov eax, esi
mov ecx, dword [esp + 0x290]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.00442851
add esp, 0x288
ret 8