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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x458acd
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x46c008]
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.0040e820
mov dword [ebp - 0x14], eax
mov edx, 2
test eax, eax
js 0x40d7de
add eax, eax
mov dword [ebp - 0x10], eax
add eax, esi
cmp word [eax + 2], 0
je 0x40d7de
xor edi, edi
cmp word [eax], di
je 0x40d478
inc edi
cmp word [eax + edi*2], 0
jne 0x40d470
xor ecx, ecx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044a831
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.0044b640
add esp, 0x10
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp + 8], eax
cmp word [esi], ax
je 0x40d4cb
nop dword [eax]
inc eax
cmp word [esi + eax*2], 0
jne 0x40d4c0
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.0044a831
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.0044b640
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp eax, dword [ebp + 8]
jae 0x40d520
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 0x40d53c
mov ecx, dword [ebp - 0x30]
mov edx, str.:_DATA
add ecx, 0xfffffff4
lea ecx, [ecx + edi*2]
call fcn.0040a150
test al, al
jne 0x40d549
push str.:_DATA
lea ecx, [ebp - 0x30]
call fcn.0040a640
mov edi, dword [ebp - 0x24]
movzx eax, word [edi]
or eax, 0x20
sub eax, 0x61
cmp eax, 0x19
ja 0x40d5df
cmp word [edi + 2], 0x3a
jne 0x40d5df
mov ecx, dword [ebp - 0x14]
cmp ecx, 2
je 0x40d579
cmp ecx, 3
jne 0x40d5df
cmp word [edi + 4], 0x5c
jne 0x40d5df
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 0x40d5f2
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebx + 0x28]
call fcn.0040a4c0
jmp 0x40d5f2
push dword [ebp + 0xc]
mov ecx, ebx
push edi
call fcn.0040d410
test al, al
je 0x40d7cd
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.0044a831
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.0044b640
push 8
mov byte [ebp - 4], 3
call fcn.0044a831
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.0040d320
test al, al
je 0x40d77f
nop word [eax + eax]
cmp byte [ebp + 0xf], 0
je 0x40d777
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 0x40d6cc
call fcn.0040a060
mov ecx, ebx
mov si, ax
call fcn.0040a060
cmp ax, si
jne 0x40d72d
mov eax, dword [ebp + 8]
test bx, bx
jne 0x40d6a5
mov ebx, dword [ebp - 0x54]
cmp ebx, 7
jbe 0x40d6ee
lea ecx, [ebx - 6]
cmp ecx, ebx
jae 0x40d6ee
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.0040a2d0
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.0044b640
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 0x40d781
mov byte [ebp - 4], 3
push dword [ebp - 0x58]
call fcn.0044a6fb
push 8
call fcn.0044a831
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.0040d320
test al, al
jne 0x40d690
jmp 0x40d77f
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push dword [ebp - 0x58]
call fcn.0044a6fb
push dword [ebp - 0x3c]
call fcn.0044a6fb
mov eax, dword [ebp - 0x40]
add esp, 8
cmp eax, 0xffffffff
je 0x40d7a3
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x24]
push eax
call fcn.0044a6fb
push dword [ebp - 0x30]
call fcn.0044a6fb
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.0044a6fb
push dword [ebp - 0x30]
call fcn.0044a6fb
add esp, 8
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 4], 5
movzx ecx, word [esi]
cmp ecx, 0x5c
je 0x40d7f9
cmp ecx, 0x2f
jne 0x40d820
movzx eax, word [esi + 2]
cmp eax, 0x5c
je 0x40d807
cmp eax, 0x2f
jne 0x40d820
cmp word [esi + 4], 0x3f
jne 0x40d820
movzx eax, word [esi + 6]
cmp eax, 0x5c
je 0x40d81c
cmp eax, 0x2f
jne 0x40d820
mov al, 1
jmp 0x40d822
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 0x40d920
cmp word [edi + 2], 0x3a
jne 0x40d920
movzx eax, word [edi + 4]
cmp eax, 0x5c
je 0x40d85e
cmp eax, 0x2f
jne 0x40d920
cmp word [esi + edx*2 + 6], 0
jne 0x40d920
cmp byte [0x46e2d1], 0
jne 0x40d898
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040a940
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x30]
mov dword [ebp + 8], eax
call fcn.0044a6fb
mov eax, dword [ebp + 8]
add esp, 4
jmp 0x40d89f
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40db5f
test al, 0x10
je 0x40db5f
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.0040a450
cmp dword [ebx + 0x2c], 2
jbe 0x40d911
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.0040dc20
mov cl, 1
jmp 0x40dba1
cmp ecx, 0x5c
je 0x40d92e
cmp ecx, 0x2f
jne 0x40db5f
cmp word [esi + 2], 0
jne 0x40d9d8
cmp byte [0x46e2d1], 0
jne 0x40d967
mov edx, esi
lea ecx, [ebp - 0x30]
call fcn.0040a940
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x30]
mov dword [ebp + 8], eax
call fcn.0044a6fb
mov ecx, dword [ebp + 8]
add esp, 4
jmp 0x40d970
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40db5f
test cl, 0x10
je 0x40db5f
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 0x40dba1
mov ecx, esi
call fcn.0040e7a0
test eax, eax
je 0x40db5f
lea edi, [esi + eax*2]
movzx eax, word [edi]
mov dword [ebp - 0x14], edi
mov edx, eax
test ax, ax
je 0x40db5f
mov ecx, edi
nop dword [eax]
cmp ax, 0x5c
je 0x40da1a
cmp ax, 0x2f
je 0x40da1a
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40da00
jmp 0x40da24
sub ecx, edi
sar ecx, 1
jns 0x40db5f
push esi
mov ecx, ebx
call fcn.0040dc20
test al, al
je 0x40da40
push edi
lea ecx, [ebx + 0x28]
call fcn.0040a450
mov cl, 1
jmp 0x40dba1
xor edi, edi
cmp word [esi], di
je 0x40da4f
inc edi
cmp word [esi + edi*2], 0
jne 0x40da47
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044a831
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.0044b640
add esp, 0x10
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 6
call fcn.0040a240
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 0x40dabb
lea ecx, [ebp - 0x24]
call fcn.0040a240
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.0040d200
test al, al
je 0x40db04
lea eax, [ebx + 0x28]
push 0x461b00
push dword [eax]
mov dword [ebp + 8], eax
call fcn.0044f562
add esp, 8
test eax, eax
jne 0x40db00
mov ecx, dword [ebp + 8]
jmp 0x40dc05
mov byte [ebp + 0xb], 1
cmp byte [0x46e2d1], 0
jne 0x40db32
mov edx, esi
lea ecx, [ebp - 0x3c]
call fcn.0040a940
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x3c]
mov dword [ebp - 0x18], eax
call fcn.0044a6fb
mov ecx, dword [ebp - 0x18]
add esp, 4
jmp 0x40db42
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ecx, 0xffffffff
cmp eax, 0xffffffff
cmovne ecx, eax
cmp byte [ebp + 0xb], 0
jne 0x40dbb7
cmp ecx, 0xffffffff
je 0x40db52
test cl, 0x10
jne 0x40dbb7
push edi
mov byte [ebp - 4], 5
call fcn.0044a6fb
add esp, 4
push ebx
push esi
lea ecx, [ebp - 0x10]
call fcn.0040d200
cmp byte [ebp + 0xc], 0
mov cl, al
mov byte [ebp + 0xb], cl
je 0x40db8f
test cl, cl
je 0x40db8f
mov eax, dword [ebx + 0x20]
shr eax, 0xa
test al, 1
je 0x40db8f
push esi
mov ecx, ebx
call fcn.0040dc20
mov cl, al
mov byte [ebp + 0xb], al
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x40dba1
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.0040a450
push edi
call fcn.0044a6fb
mov cl, 1
add esp, 4
mov byte [ebp + 0xb], cl
jmp 0x40db8f