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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405b4d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
mov esi, ecx
mov dword [ebp - 0x34], esi
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x34], esi
call fcn.00401220
push 0x406328
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.00403cd0
add esp, 4
mov edi, eax
mov edx, dword [ebp - 0x30]
mov byte [ebp - 4], 1
cmp dword [edx + 0x14], 7
mov ecx, dword [edx + 0x10]
mov dword [ebp - 0x38], ecx
jbe 0x4015a1
mov edx, dword [edx]
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x14]
sub eax, dword [ebp - 0x30]
cmp ecx, eax
ja 0x4015ed
mov eax, dword [ebp - 0x30]
add ecx, eax
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x34], ecx
mov dword [edi + 0x10], ecx
mov ecx, edi
mov dword [ebp - 0x30], edi
jbe 0x4015cc
mov ecx, dword [edi]
mov dword [ebp - 0x30], ecx
lea ecx, [ecx + eax*2]
mov eax, dword [ebp - 0x38]
add eax, eax
push eax
push edx
push ecx
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x30]
add esp, 0xc
mov ecx, dword [ebp - 0x34]
xor edx, edx
mov word [eax + ecx*2], dx
jmp 0x4015fc
push ecx
push edx
push dword [ebp - 0x34]
push ecx
mov ecx, edi
call fcn.004044b0
mov edi, eax
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], 0
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x2c], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x1c], xmm0
mov byte [ebp - 4], 3
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov ecx, dword [ebp - 0x40]
cmp ecx, 7
jbe 0x40166f
mov edx, dword [ebp - 0x54]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401665
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4016b3
push ecx
push edx
call fcn.00404c3c
add esp, 8
xor eax, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 7
mov word [ebp - 0x54], ax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x58]
cmp ecx, 7
jbe 0x4016c3
mov edx, dword [ebp - 0x6c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4016b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4016b9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404c3c
add esp, 8
xor eax, eax
mov dword [ebp - 0x5c], 0
cmp dword [ebp - 0x18], 7
mov word [ebp - 0x6c], ax
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
push eax
mov dword [ebp - 0x58], 7
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp eax, 0xffffffff
je 0x401715
movups xmm0, xmmword [ebp - 0x2c]
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [esi + 0x10], xmm0
jmp 0x40175f
push 0
push 0x40632c
mov ecx, esi
call fcn.00404630
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x40175f
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401755
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401755
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404c3c
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00404bf9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret