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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xaab9ed
mov eax, dword fs:[0]
push eax
sub esp, 0x2a4
mov eax, dword [0xaf7064]
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, ecx
mov ebx, dword [ebp + 8]
push ebx
call fcn.0040eb70
mov esi, eax
test esi, esi
js 0x40dca4
cmp word [ebx + esi*2 + 2], 0
lea eax, [ebx + esi*2]
je 0x40dca4
push eax
lea ecx, [ebp - 0x278]
call fcn.0040a0c0
push ebx
lea ecx, [ebp - 0x284]
mov dword [ebp - 4], 0
call fcn.0040a0c0
mov byte [ebp - 4], 1
cmp esi, dword [ebp - 0x280]
jae 0x40da8f
mov eax, dword [ebp - 0x284]
xor ecx, ecx
mov dword [ebp - 0x280], esi
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x274]
cmp ecx, 6
jbe 0x40dab5
mov eax, dword [ebp - 0x278]
push str.:_DATA
lea eax, [eax + ecx*2]
add eax, 0xfffffff4
push eax
call fcn.0040b1b0
test al, al
jne 0x40dac5
push str.:_DATA
lea ecx, [ebp - 0x278]
call fcn.0040a3f0
push dword [ebp - 0x284]
call fcn.0040f1f0
test al, al
mov eax, dword [ebp - 0x284]
je 0x40db17
cmp esi, 2
je 0x40daeb
cmp esi, 3
jne 0x40db17
cmp word [eax + 4], 0x5c
jne 0x40db17
mov ecx, edi
call fcn.0040d610
mov eax, dword [edi + 0x28]
lea ecx, [edi + 0x28]
xor edx, edx
mov dword [ecx + 4], 0
mov word [eax], dx
cmp esi, 2
jne 0x40db2a
lea eax, [ebp - 0x284]
push eax
call fcn.0040a150
jmp 0x40db2a
push dword [ebp + 0xc]
mov ecx, edi
push eax
call fcn.0040da00
test al, al
je 0x40dc8b
and dword [edi + 0x20], 0xfffffbef
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [ebp - 0x294], 0xffffffff
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x290]
call fcn.00409fa0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x2b0]
call fcn.0040a120
cmp dword [ebp - 0x294], 0xffffffff
lea eax, [ebp - 0x2b0]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x294]
push eax
je 0x40db8e
call fcn.0040e190
jmp 0x40db99
push dword [ebp - 0x290]
call fcn.0040e000
test al, al
je 0x40dc12
push dword [ebp - 0x278]
push dword [ebp - 0x2b0]
call fcn.0040b100
test al, al
jne 0x40dbc6
push dword [ebp - 0x2b0]
mov byte [ebp - 4], 3
call fcn.00a1ac46
add esp, 4
jmp 0x40db62
mov eax, dword [ebp - 0x2ac]
cmp eax, 7
jbe 0x40dbea
lea ecx, [eax - 6]
cmp ecx, eax
jae 0x40dbea
mov eax, dword [ebp - 0x2b0]
xor edx, edx
mov dword [ebp - 0x2ac], ecx
mov word [eax + ecx*2], dx
lea eax, [ebp - 0x2b0]
push eax
lea ecx, [edi + 0x28]
call fcn.0040a3b0
mov eax, dword [ebp - 0x2a0]
mov bl, 1
mov dword [edi], eax
mov eax, dword [ebp - 0x29c]
mov dword [edi + 4], eax
mov byte [edi + 0x24], 1
jmp 0x40dc2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
sete al
test al, al
je 0x40dc2a
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor bl, bl
push dword [ebp - 0x2b0]
call fcn.00a1ac46
push dword [ebp - 0x290]
call fcn.00a1ac46
mov eax, dword [ebp - 0x294]
add esp, 8
cmp eax, 0xffffffff
je 0x40dc6b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0x294]
or edx, 0xffffffff
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x294], ecx
push dword [ebp - 0x284]
call fcn.00a1ac46
push dword [ebp - 0x278]
call fcn.00a1ac46
add esp, 8
mov al, bl
jmp 0x40df44
push dword [ebp - 0x284]
call fcn.00a1ac46
push dword [ebp - 0x278]
call fcn.00a1ac46
add esp, 8
mov dword [ebp - 0x26c], 0xffffffff
push ebx
mov dword [ebp - 4], 5
xor esi, esi
call fcn.0040f320
test al, al
mov ecx, 4
cmovne esi, ecx
lea eax, [ebx + esi*2]
push eax
mov dword [ebp - 0x268], eax
call fcn.0040f220
test al, al
je 0x40dd43
cmp word [ebx + esi*2 + 6], 0
jne 0x40dd43
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x298], eax
cmp eax, 0xffffffff
je 0x40ded8
test al, 0x10
je 0x40ded8
mov ecx, edi
call fcn.0040d610
mov eax, dword [ebp - 0x298]
lea ecx, [edi + 0x28]
push dword [ebp - 0x268]
mov dword [edi + 0x20], eax
call fcn.0040a250
cmp dword [edi + 0x2c], 2
jbe 0x40dd34
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 2
mov word [eax + 4], cx
push ebx
mov ecx, edi
call fcn.0040d920
mov cl, 1
jmp 0x40df42
movzx eax, word [ebx]
cmp eax, 0x5c
je 0x40dd54
cmp eax, 0x2f
jne 0x40ded8
cmp word [ebx + 2], 0
push ebx
jne 0x40dd9f
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x40ded8
test al, 0x10
je 0x40ded8
mov ecx, edi
call fcn.0040d610
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 0
mov word [eax], cx
mov cl, 1
mov eax, dword [ebp - 0x268]
mov dword [edi + 0x20], eax
jmp 0x40df42
call fcn.0040ee40
test eax, eax
je 0x40ded8
cmp word [ebx + eax*2], 0
lea esi, [ebx + eax*2]
je 0x40ded8
push esi
call fcn.0040ebd0
test eax, eax
jns 0x40ded8
push ebx
mov ecx, edi
call fcn.0040d920
test al, al
je 0x40dde4
push esi
lea ecx, [edi + 0x28]
call fcn.0040a250
mov cl, 1
jmp 0x40df42
push ebx
lea ecx, [ebp - 0x278]
call fcn.0040a0c0
lea ecx, [ebp - 0x278]
mov byte [ebp - 4], 6
call fcn.0040d5e0
push 0x2a
lea ecx, [ebp - 0x278]
call fcn.0040d5a0
push edi
push dword [ebp - 0x278]
lea ecx, [ebp - 0x26c]
mov byte [ebp - 0x261], 0
call fcn.0040df70
test al, al
je 0x40de50
lea eax, [edi + 0x28]
push 0xab18e0
push eax
mov dword [ebp - 0x268], eax
call fcn.0040b780
test al, al
je 0x40de49
mov ecx, dword [ebp - 0x268]
jmp 0x40deba
mov byte [ebp - 0x261], 1
push ebx
call fcn.0040e210
cmp byte [ebp - 0x261], 0
mov dword [ebp - 0x268], eax
jne 0x40de9a
cmp eax, 0xffffffff
je 0x40de6e
test al, 0x10
jne 0x40de9a
push dword [ebp - 0x278]
mov byte [ebp - 4], 5
call fcn.00a1ac46
mov esi, dword [ebp - 0x26c]
add esp, 4
cmp esi, 0xffffffff
je 0x40ded8
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x40ded8
xor cl, cl
jmp 0x40df06
mov ecx, edi
call fcn.0040d610
cmp dword [ebp - 0x268], 0xffffffff
lea ecx, [edi + 0x28]
mov eax, 0x10
cmovne eax, dword [ebp - 0x268]
mov dword [edi + 0x20], eax
push esi
call fcn.0040a250
push dword [ebp - 0x278]
call fcn.00a1ac46
mov esi, dword [ebp - 0x26c]
add esp, 4
mov cl, 1
jmp 0x40df2a
lea eax, [ebp - 0x260]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x26c], esi
cmp esi, 0xffffffff
jne 0x40def7
xor cl, cl
jmp 0x40df06
push edi
lea eax, [ebp - 0x260]
push eax
call fcn.0040d690
mov cl, 1
cmp byte [ebp + 0xc], 0
mov byte [ebp - 0x261], cl
je 0x40df30
test cl, cl
je 0x40df30
mov eax, dword [edi + 0x20]
shr eax, 0xa
test al, 1
je 0x40df30
push ebx
mov ecx, edi
call fcn.0040d920
mov cl, al
mov byte [ebp - 0x261], cl
cmp esi, 0xffffffff
je 0x40df42
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov cl, byte [ebp - 0x261]
mov al, cl
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.00a1aa6a
mov esp, ebp
pop ebp
ret 8