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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45656d
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x46a008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x18], ebx
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.0040e900
mov dword [ebp - 0x14], eax
mov edx, 2
test eax, eax
js 0x40d8be
add eax, eax
mov dword [ebp - 0x10], eax
add eax, esi
cmp word [eax + 2], 0
je 0x40d8be
xor edi, edi
cmp word [eax], di
je 0x40d558
inc edi
cmp word [eax + edi*2], 0
jne 0x40d550
xor ecx, ecx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
lea ecx, [edi*2 + 2]
mov dword [ebp - 0x30], eax
push ecx
mov ecx, dword [ebp - 0x10]
add ecx, esi
mov dword [ebp - 0x2c], edi
push ecx
push eax
mov dword [ebp - 0x28], edi
call fcn.00449190
add esp, 0x10
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp + 8], eax
cmp word [esi], ax
je 0x40d5ab
nop dword [eax]
inc eax
cmp word [esi + eax*2], 0
jne 0x40d5a0
mov dword [ebp + 8], eax
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
lea ecx, [eax*2 + 2]
push ecx
push esi
push edx
call fcn.00449190
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp eax, dword [ebp + 8]
jae 0x40d600
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov dword [ebp + 8], eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
mov word [eax + ecx], dx
cmp edi, 6
jbe 0x40d61c
mov ecx, dword [ebp - 0x30]
mov edx, str.:_DATA
add ecx, 0xfffffff4
lea ecx, [ecx + edi*2]
call fcn.0040a240
test al, al
jne 0x40d629
push str.:_DATA
lea ecx, [ebp - 0x30]
call fcn.0040a730
mov edi, dword [ebp - 0x24]
movzx eax, word [edi]
or eax, 0x20
sub eax, 0x61
cmp eax, 0x19
ja 0x40d6bf
cmp word [edi + 2], 0x3a
jne 0x40d6bf
mov ecx, dword [ebp - 0x14]
cmp ecx, 2
je 0x40d659
cmp ecx, 3
jne 0x40d6bf
cmp word [edi + 4], 0x5c
jne 0x40d6bf
mov dword [ebx], 0
xor esi, esi
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov word [ebx + 0x24], 0
mov eax, dword [ebx + 0x28]
mov dword [ebx + 0x2c], 0
mov word [eax], si
cmp ecx, 2
jne 0x40d6d2
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebx + 0x28]
call fcn.0040a5b0
jmp 0x40d6d2
push dword [ebp + 0xc]
mov ecx, ebx
push edi
call fcn.0040d4f0
test al, al
je 0x40d8ad
and dword [ebx + 0x20], 0xfffffbef
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebp - 0x40], 0xffffffff
mov byte [ebp - 4], 2
xor ecx, ecx
mov ebx, dword [ebp + 8]
mov edx, 2
mov dword [ebp - 0x3c], 0
lea esi, [ebx + 1]
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
lea ecx, [esi + esi]
mov dword [ebp - 0x3c], eax
push ecx
push edi
push eax
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
call fcn.00449190
push 8
mov byte [ebp - 4], 3
call fcn.00448381
xor ecx, ecx
mov dword [ebp - 0x58], eax
add esp, 0x14
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 3
mov word [eax], cx
lea eax, [ebp + 0xf]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040d400
test al, al
je 0x40d85f
nop word [eax + eax]
cmp byte [ebp + 0xf], 0
je 0x40d857
mov eax, dword [ebp - 0x58]
mov edi, dword [ebp - 0x30]
sub eax, edi
mov dword [ebp + 8], eax
movzx ebx, word [eax + edi]
lea edi, [edi + 2]
movzx ecx, word [edi - 2]
cmp bx, cx
je 0x40d7ac
call fcn.0040a150
mov ecx, ebx
mov si, ax
call fcn.0040a150
cmp ax, si
jne 0x40d80d
mov eax, dword [ebp + 8]
test bx, bx
jne 0x40d785
mov ebx, dword [ebp - 0x54]
cmp ebx, 7
jbe 0x40d7ce
lea ecx, [ebx - 6]
cmp ecx, ebx
jae 0x40d7ce
mov eax, dword [ebp - 0x58]
mov ebx, ecx
xor edx, edx
mov dword [ebp - 0x54], ebx
mov word [eax + ecx*2], dx
mov edi, dword [ebp - 0x18]
push ebx
lea ecx, [edi + 0x28]
call fcn.0040a3c0
mov ecx, dword [edi + 0x2c]
lea eax, [ebx*2 + 2]
push eax
mov eax, dword [edi + 0x28]
push dword [ebp - 0x58]
lea eax, [eax + ecx*2]
push eax
call fcn.00449190
mov eax, dword [ebp - 0x48]
add esp, 0xc
add dword [edi + 0x2c], ebx
mov bl, 1
mov ecx, dword [ebp - 0x44]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov byte [edi + 0x24], 1
jmp 0x40d861
mov byte [ebp - 4], 3
push dword [ebp - 0x58]
call fcn.0044824b
push 8
call fcn.00448381
xor ecx, ecx
mov dword [ebp - 0x58], eax
add esp, 8
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 3
mov word [eax], cx
lea eax, [ebp + 0xf]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040d400
test al, al
jne 0x40d770
jmp 0x40d85f
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push dword [ebp - 0x58]
call fcn.0044824b
push dword [ebp - 0x3c]
call fcn.0044824b
mov eax, dword [ebp - 0x40]
add esp, 8
cmp eax, 0xffffffff
je 0x40d883
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x24]
push eax
call fcn.0044824b
push dword [ebp - 0x30]
call fcn.0044824b
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
call fcn.0044824b
push dword [ebp - 0x30]
call fcn.0044824b
add esp, 8
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 4], 5
movzx ecx, word [esi]
cmp ecx, 0x5c
je 0x40d8d9
cmp ecx, 0x2f
jne 0x40d900
movzx eax, word [esi + 2]
cmp eax, 0x5c
je 0x40d8e7
cmp eax, 0x2f
jne 0x40d900
cmp word [esi + 4], 0x3f
jne 0x40d900
movzx eax, word [esi + 6]
cmp eax, 0x5c
je 0x40d8fc
cmp eax, 0x2f
jne 0x40d900
mov al, 1
jmp 0x40d902
xor al, al
movzx edx, al
shl edx, 2
movzx eax, word [esi + edx*2]
lea edi, [esi + edx*2]
or eax, 0x20
mov dword [ebp - 0x18], edi
sub eax, 0x61
cmp eax, 0x19
ja 0x40da00
cmp word [edi + 2], 0x3a
jne 0x40da00
movzx eax, word [edi + 4]
cmp eax, 0x5c
je 0x40d93e
cmp eax, 0x2f
jne 0x40da00
cmp word [esi + edx*2 + 6], 0
jne 0x40da00
cmp byte [0x899ce9], 0
jne 0x40d978
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040aa30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x30]
mov dword [ebp + 8], eax
call fcn.0044824b
mov eax, dword [ebp + 8]
add esp, 4
jmp 0x40d97f
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40dc3f
test al, 0x10
je 0x40dc3f
push dword [ebp - 0x18]
mov dword [ebx], 0
lea ecx, [ebx + 0x28]
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov word [ebx + 0x24], 0
mov dword [ebx + 0x20], eax
call fcn.0040a540
cmp dword [ebx + 0x2c], 2
jbe 0x40d9f1
mov eax, dword [ebx + 0x28]
xor ecx, ecx
mov dword [ebx + 0x2c], 2
mov word [eax + 4], cx
push esi
mov ecx, ebx
call fcn.0040dd00
mov cl, 1
jmp 0x40dc81
cmp ecx, 0x5c
je 0x40da0e
cmp ecx, 0x2f
jne 0x40dc3f
cmp word [esi + 2], 0
jne 0x40dab8
cmp byte [0x899ce9], 0
jne 0x40da47
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040aa30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x30]
mov dword [ebp + 8], eax
call fcn.0044824b
mov ecx, dword [ebp + 8]
add esp, 4
jmp 0x40da50
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40dc3f
test cl, 0x10
je 0x40dc3f
mov dword [ebx], 0
xor edx, edx
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov word [ebx + 0x24], 0
mov eax, dword [ebx + 0x28]
mov dword [ebx + 0x2c], 0
mov word [eax], dx
mov dword [ebx + 0x20], ecx
mov cl, 1
jmp 0x40dc81
mov ecx, esi
call fcn.0040e880
test eax, eax
je 0x40dc3f
lea edi, [esi + eax*2]
movzx eax, word [edi]
mov dword [ebp - 0x14], edi
mov edx, eax
test ax, ax
je 0x40dc3f
mov ecx, edi
nop dword [eax]
cmp ax, 0x5c
je 0x40dafa
cmp ax, 0x2f
je 0x40dafa
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40dae0
jmp 0x40db04
sub ecx, edi
sar ecx, 1
jns 0x40dc3f
push esi
mov ecx, ebx
call fcn.0040dd00
test al, al
je 0x40db20
push edi
lea ecx, [ebx + 0x28]
call fcn.0040a540
mov cl, 1
jmp 0x40dc81
xor edi, edi
cmp word [esi], di
je 0x40db2f
inc edi
cmp word [esi + edi*2], 0
jne 0x40db27
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00448381
lea ecx, [edi*2 + 2]
mov dword [ebp - 0x24], eax
push ecx
push esi
push eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
call fcn.00449190
add esp, 0x10
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 6
call fcn.0040a330
mov eax, dword [ebp - 0x20]
mov ecx, 0x5c
mov edi, dword [ebp - 0x24]
mov word [edi + eax*2], cx
inc eax
xor ecx, ecx
mov dword [ebp - 0x20], eax
mov word [edi + eax*2], cx
cmp dword [ebp - 0x1c], eax
jne 0x40db9b
lea ecx, [ebp - 0x24]
call fcn.0040a330
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
mov ecx, 0x2a
mov word [edi + eax*2], cx
inc eax
xor ecx, ecx
mov dword [ebp - 0x20], eax
push ebx
mov byte [ebp + 0xb], cl
mov word [edi + eax*2], cx
lea ecx, [ebp - 0x10]
push edi
call fcn.0040d2e0
test al, al
je 0x40dbe4
lea eax, [ebx + 0x28]
push 0x45fa58
push dword [eax]
mov dword [ebp + 8], eax
call fcn.0044d0b2
add esp, 8
test eax, eax
jne 0x40dbe0
mov ecx, dword [ebp + 8]
jmp 0x40dce5
mov byte [ebp + 0xb], 1
cmp byte [0x899ce9], 0
jne 0x40dc12
mov edx, esi
lea ecx, [ebp - 0x3c]
call fcn.0040aa30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x3c]
mov dword [ebp - 0x18], eax
call fcn.0044824b
mov ecx, dword [ebp - 0x18]
add esp, 4
jmp 0x40dc22
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ecx, 0xffffffff
cmp eax, 0xffffffff
cmovne ecx, eax
cmp byte [ebp + 0xb], 0
jne 0x40dc97
cmp ecx, 0xffffffff
je 0x40dc32
test cl, 0x10
jne 0x40dc97
push edi
mov byte [ebp - 4], 5
call fcn.0044824b
add esp, 4
push ebx
push esi
lea ecx, [ebp - 0x10]
call fcn.0040d2e0
cmp byte [ebp + 0xc], 0
mov cl, al
mov byte [ebp + 0xb], cl
je 0x40dc6f
test cl, cl
je 0x40dc6f
mov eax, dword [ebx + 0x20]
shr eax, 0xa
test al, 1
je 0x40dc6f
push esi
mov ecx, ebx
call fcn.0040dd00
mov cl, al
mov byte [ebp + 0xb], al
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x40dc81
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov cl, byte [ebp + 0xb]
mov al, cl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp ecx, 0xffffffff
mov dword [ebx], 0
mov eax, 0x10
mov dword [ebx + 4], 0
cmovne eax, ecx
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
lea ecx, [ebx + 0x28]
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov word [ebx + 0x24], 0
mov dword [ebx + 0x20], eax
push dword [ebp - 0x14]
call fcn.0040a540
push edi
call fcn.0044824b
mov cl, 1
add esp, 4
mov byte [ebp + 0xb], cl
jmp 0x40dc6f