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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b653c
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4d7068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0xac], 0
cmp dword [edi + 0x10], 0
jne 0x40d947
xor eax, eax
mov dword [esi + 0x14], 7
push 0xffffffffffffffff
push eax
mov dword [esi + 0x10], 0
mov ecx, esi
push edi
mov word [esi], ax
call fcn.00411a10
jmp 0x40db77
cmp dword [edi + 0x14], 8
jb 0x40d951
mov eax, dword [edi]
jmp 0x40d953
mov eax, edi
cmp word [eax], 0x22
push 0xffffffffffffffff
push 0
push edi
jne 0x40d97d
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, esi
mov word [esi], ax
call fcn.00411a10
jmp 0x40db77
xor eax, eax
mov dword [ebp - 0x2c], 7
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00411a10
or ebx, 0xffffffff
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x74], 7
mov dword [ebp - 0x78], 0
mov word [ebp - 0x88], ax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 2
mov dword [ebp - 0xa4], 0x20
push 1
lea eax, [ebx + 1]
mov ecx, edi
push eax
lea eax, [ebp - 0xa4]
push eax
call fcn.004131a0
mov ebx, eax
mov ecx, edi
push ebx
push 0
lea eax, [ebp - 0x58]
push eax
call fcn.00417440
mov dword [ebp - 0xa8], eax
lea ecx, [ebp - 0x28]
cmp ecx, eax
je 0x40da3b
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40da19
inc eax
push eax
push dword [ebp - 0x28]
call fcn.00490de0
push dword [ebp - 0xa8]
xor eax, eax
mov dword [ebp - 0x14], 7
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.0040f8c0
mov eax, dword [ebp - 0x44]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x40da54
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00490de0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40da7f
test al, 0x10
jne 0x40da7f
lea eax, [ebp - 0x28]
push eax
call fcn.004157b0
add esp, 4
test al, al
jne 0x40da8d
cmp ebx, 0xffffffff
jne 0x40d9d6
jmp 0x40db1b
push ebx
push 0
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
call fcn.00417440
push eax
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 4
push 0x4b9894
push eax
call fcn.00402360
push 0x4b9894
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 5
push eax
call fcn.004021f0
add esp, 0x18
lea ecx, [ebp - 0x40]
push eax
call fcn.00408c40
lea ecx, [ebp - 0x58]
call fcn.00408340
lea ecx, [ebp - 0xa0]
call fcn.00408340
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 2
call fcn.00408340
cmp ebx, 0xffffffff
je 0x40db1b
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x70]
mov ecx, edi
push eax
call fcn.00417440
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 6
call fcn.004114e0
lea ecx, [ebp - 0x70]
call fcn.00408340
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, esi
mov word [esi], ax
lea eax, [ebp - 0x40]
push eax
call fcn.0040f8c0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40db4e
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00490de0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x40db77
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00490de0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004942e8
mov esp, ebp
pop ebp
ret