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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x460a3d
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x472008]
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 esi, dword [ebp + 8]
mov ecx, esi
call fcn.0040f1f0
mov dword [ebp - 0x48], eax
mov edx, 2
test eax, eax
js 0x40e456
add eax, eax
mov dword [ebp - 0x4c], eax
add eax, esi
cmp word [eax + 2], 0
je 0x40e456
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x44], ebx
cmp word [eax], cx
je 0x40e07a
mov edi, edi
inc ebx
cmp word [eax + ebx*2], cx
jne 0x40e070
mov dword [ebp - 0x44], ebx
xor ecx, ecx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045e549
lea ecx, [ebx*2 + 2]
mov dword [ebp - 0x20], eax
push ecx
mov ecx, dword [ebp - 0x4c]
add ecx, esi
mov dword [ebp - 0x1c], ebx
push ecx
push eax
mov dword [ebp - 0x18], ebx
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov dword [ebp - 4], 0
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], ebx
cmp word [esi], ax
je 0x40e0da
lea ebx, [ebx]
inc ebx
cmp word [esi + ebx*2], ax
jne 0x40e0d0
mov dword [ebp - 0x14], ebx
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045e549
lea ecx, [ebx*2 + 2]
mov dword [ebp - 0x2c], eax
push ecx
push esi
push eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov eax, dword [ebp - 0x48]
mov byte [ebp - 4], 1
cmp eax, ebx
jae 0x40e12b
mov ecx, dword [ebp - 0x4c]
xor edx, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x2c]
mov word [ecx + eax], dx
mov eax, dword [ebp - 0x44]
cmp eax, 6
jbe 0x40e14a
mov ebx, dword [ebp - 0x20]
lea ecx, [eax - 6]
mov edx, str.:_DATA
lea ecx, [ebx + ecx*2]
call fcn.0040b8a0
test al, al
jne 0x40e18e
xor ebx, ebx
lea esp, [esp]
inc ebx
cmp byte [ebx + str.:_DATA], 0
jne 0x40e150
push ebx
lea ecx, [ebp - 0x20]
call fcn.0040b990
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
lea edx, [eax + ecx*2]
xor ecx, ecx
test ebx, ebx
je 0x40e182
movzx eax, byte [ecx + str.:_DATA]
mov word [edx + ecx*2], ax
inc ecx
cmp ecx, ebx
jb 0x40e172
xor eax, eax
add dword [ebp - 0x1c], ebx
mov word [edx + ebx*2], ax
mov ebx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
movzx eax, word [ecx]
mov edx, eax
cmp eax, 0x61
jb 0x40e1a0
cmp edx, 0x7a
jbe 0x40e1b2
cmp edx, 0x41
jb 0x40e286
cmp edx, 0x5a
ja 0x40e286
cmp word [ecx + 2], 0x3a
jne 0x40e286
mov edx, dword [ebp - 0x48]
cmp edx, 2
je 0x40e1d9
cmp edx, 3
jne 0x40e286
cmp word [ecx + 4], 0x5c
jne 0x40e286
mov ebx, dword [ebp - 0x14]
lea ecx, [edi + 0x28]
mov dword [edi], 0
xor esi, esi
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov word [edi + 0x24], 0
mov eax, dword [ecx]
mov dword [ecx + 4], 0
mov word [eax], si
cmp edx, 2
jne 0x40e29c
lea eax, [ebp - 0x2c]
cmp eax, ecx
je 0x40e29c
cmp ebx, dword [ecx + 8]
jbe 0x40e26b
xor ecx, ecx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045e549
push dword [edi + 0x28]
mov esi, eax
call fcn.0045e2f3
lea ecx, [edi + 0x28]
add esp, 8
mov dword [ecx], esi
mov dword [ecx + 8], ebx
lea eax, [ebx*2 + 2]
mov dword [ecx + 4], ebx
push eax
mov eax, dword [ebp - 0x2c]
push eax
push dword [ecx]
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x40e29c
push dword [ebp + 0xc]
push ecx
mov ecx, edi
call fcn.0040e000
test al, al
je 0x40e444
mov ebx, dword [ebp - 0x14]
and dword [edi + 0x20], 0xfffffbef
xor eax, eax
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], 0xffffffff
mov byte [ebp - 4], 2
lea esi, [ebx + 1]
mov dword [ebp - 0x38], eax
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045e549
lea ecx, [esi + esi]
mov dword [ebp - 0x34], ebx
push ecx
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x2c]
push ebx
push eax
mov dword [ebp - 0x38], eax
call sub.msvcrt.dll_memcpy
push 8
mov byte [ebp - 4], 3
call fcn.0045e549
xor ecx, ecx
mov dword [ebp - 0x64], eax
add esp, 0x14
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 3
mov word [eax], cx
lea eax, [ebp - 0x3d]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040def0
test al, al
je 0x40e405
jmp 0x40e340
cmp byte [ebp - 0x3d], 0
je 0x40e3fd
push dword [ebp - 0x20]
lea ecx, [ebp - 0x64]
call fcn.0040dd70
test al, al
jne 0x40e39f
mov byte [ebp - 4], 3
push dword [ebp - 0x64]
call fcn.0045e2f3
push 8
call fcn.0045e549
xor ecx, ecx
mov dword [ebp - 0x64], eax
add esp, 8
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 3
mov word [eax], cx
lea eax, [ebp - 0x3d]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x3c]
call fcn.0040def0
test al, al
jne 0x40e340
jmp 0x40e405
mov ebx, dword [ebp - 0x60]
cmp ebx, 7
jbe 0x40e3bc
lea ecx, [ebx - 6]
cmp ecx, ebx
jae 0x40e3bc
mov eax, dword [ebp - 0x64]
mov ebx, ecx
xor edx, edx
mov dword [ebp - 0x60], ebx
mov word [eax + ecx*2], dx
push ebx
lea ecx, [edi + 0x28]
call fcn.0040b990
mov ecx, dword [edi + 0x2c]
lea eax, [ebx*2 + 2]
push eax
mov eax, dword [edi + 0x28]
push dword [ebp - 0x64]
lea eax, [eax + ecx*2]
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x54]
add esp, 0xc
add dword [edi + 0x2c], ebx
mov ecx, dword [ebp - 0x50]
mov ebx, dword [ebp - 0x2c]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov byte [edi + 0x24], 1
mov byte [ebp - 0x3d], 1
jmp 0x40e409
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov byte [ebp - 0x3d], 0
push dword [ebp - 0x64]
call fcn.0045e2f3
push dword [ebp - 0x38]
call fcn.0045e2f3
mov eax, dword [ebp - 0x3c]
add esp, 8
cmp eax, 0xffffffff
je 0x40e42b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
call fcn.0045e2f3
push dword [ebp - 0x20]
call fcn.0045e2f3
mov al, byte [ebp - 0x3d]
add esp, 8
jmp 0x40e7f0
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0045e2f3
push ebx
call fcn.0045e2f3
add esp, 8
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 4], 5
movzx eax, word [esi]
mov edx, eax
cmp eax, 0x5c
je 0x40e473
cmp edx, 0x2f
jne 0x40e4a8
movzx eax, word [esi + 2]
mov ecx, eax
cmp eax, 0x5c
je 0x40e483
cmp ecx, 0x2f
jne 0x40e4a8
cmp word [esi + 4], 0x3f
jne 0x40e4a8
movzx eax, word [esi + 6]
mov ecx, eax
cmp eax, 0x5c
je 0x40e49a
cmp ecx, 0x2f
jne 0x40e4a8
mov ebx, 8
mov dword [ebp - 0x48], 0xe
jmp 0x40e4b1
xor ebx, ebx
mov dword [ebp - 0x48], 6
mov ecx, 2
mov dword [ebp - 0x44], ebx
mov eax, esi
add eax, ecx
mov dword [ebp - 0x4c], eax
movzx eax, word [ebx + esi]
mov ecx, eax
cmp eax, 0x61
jb 0x40e4d0
cmp ecx, 0x7a
jbe 0x40e4e2
cmp ecx, 0x41
jb 0x40e5a4
cmp ecx, 0x5a
ja 0x40e5a4
cmp word [ebx + esi + 2], 0x3a
jne 0x40e5a4
movzx eax, word [ebx + esi + 4]
mov ecx, eax
cmp eax, 0x5c
je 0x40e503
cmp ecx, 0x2f
jne 0x40e5a4
mov eax, dword [ebp - 0x48]
cmp word [esi + eax], 0
jne 0x40e59c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40e7b5
test al, 0x10
je 0x40e7b5
mov dword [edi], 0
lea ecx, [edi + 0x28]
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x44]
add eax, esi
mov word [edi + 0x24], 0
push eax
call fcn.0040baa0
cmp dword [edi + 0x2c], 2
jbe 0x40e58d
mov eax, dword [edi + 0x28]
xor ecx, ecx
mov dword [edi + 0x2c], 2
mov word [eax + 4], cx
push esi
mov ecx, edi
call fcn.0040e880
mov bl, 1
jmp 0x40e7ee
mov ecx, dword [ebp - 0x4c]
lea eax, [esi + 2]
jmp 0x40e5a9
mov ecx, dword [ebp - 0x4c]
mov eax, ecx
cmp edx, 0x5c
je 0x40e5b9
mov eax, ecx
cmp edx, 0x2f
jne 0x40e7b5
cmp word [eax], 0
jne 0x40e630
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40e7b5
test cl, 0x10
je 0x40e7b5
mov dword [edi], 0
xor edx, edx
mov dword [edi + 4], 0
mov bl, 1
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov word [edi + 0x24], 0
mov eax, dword [edi + 0x28]
mov dword [edi + 0x2c], 0
mov word [eax], dx
mov dword [edi + 0x20], ecx
jmp 0x40e7ee
mov ecx, esi
call fcn.0040f0f0
test eax, eax
je 0x40e7b5
lea ebx, [esi + eax*2]
movzx eax, word [ebx]
mov dword [ebp - 0x44], ebx
mov edx, eax
test ax, ax
je 0x40e7b5
mov ecx, ebx
cmp ax, 0x5c
je 0x40e66f
cmp ax, 0x2f
je 0x40e66f
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40e655
jmp 0x40e679
sub ecx, ebx
sar ecx, 1
jns 0x40e7b5
push esi
mov ecx, edi
call fcn.0040e880
test al, al
je 0x40e695
lea ecx, [edi + 0x28]
push ebx
call fcn.0040baa0
mov bl, 1
jmp 0x40e7ee
xor eax, eax
xor ebx, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
cmp word [esi], ax
je 0x40e6ae
inc ebx
cmp word [esi + ebx*2], ax
jne 0x40e6a7
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0045e549
lea ecx, [ebx*2 + 2]
mov dword [ebp - 0x20], eax
push ecx
push esi
push eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call sub.msvcrt.dll_memcpy
add esp, 0x10
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 6
call fcn.0040b900
mov eax, dword [ebp - 0x1c]
mov ecx, 0x5c
mov ebx, dword [ebp - 0x20]
mov word [ebx + eax*2], cx
inc eax
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov word [ebx + eax*2], cx
cmp dword [ebp - 0x18], eax
jne 0x40e71a
lea ecx, [ebp - 0x20]
call fcn.0040b900
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov ecx, 0x2a
mov word [ebx + eax*2], cx
inc eax
xor ecx, ecx
mov dword [ebp - 0x1c], eax
push edi
mov byte [ebp - 0x3d], cl
mov word [ebx + eax*2], cx
lea ecx, [ebp - 0x14]
push ebx
call fcn.0040de10
test al, al
je 0x40e78b
lea eax, [edi + 0x28]
mov ecx, 0x4685f4
mov dword [ebp - 0x48], eax
mov eax, dword [eax]
jmp 0x40e750
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40e776
test dx, dx
je 0x40e772
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40e776
add eax, 4
add ecx, 4
test dx, dx
jne 0x40e750
xor eax, eax
jmp 0x40e77b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40e787
mov ecx, dword [ebp - 0x48]
jmp 0x40e85b
mov byte [ebp - 0x3d], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40e799
or eax, eax
cmp byte [ebp - 0x3d], 0
jne 0x40e80e
cmp eax, 0xffffffff
je 0x40e7a8
test al, 0x10
jne 0x40e80e
push ebx
mov byte [ebp - 4], 5
call fcn.0045e2f3
add esp, 4
push edi
push esi
lea ecx, [ebp - 0x14]
call fcn.0040de10
cmp byte [ebp + 0xc], 0
mov bl, al
je 0x40e7df
test bl, bl
je 0x40e7df
mov eax, dword [edi + 0x20]
shr eax, 0xa
test al, 1
je 0x40e7df
push esi
mov ecx, edi
call fcn.0040e880
mov bl, al
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
je 0x40e7ee
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, bl
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.0045e090
mov esp, ebp
pop ebp
ret 8
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov word [edi + 0x24], 0
cmp eax, 0xffffffff
jne 0x40e855
mov eax, 0x10
mov dword [edi + 0x20], eax
lea ecx, [edi + 0x28]
push dword [ebp - 0x44]
call fcn.0040baa0
push ebx
call fcn.0045e2f3
add esp, 4
mov bl, 1
jmp 0x40e7df