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

Disassembly:
mov eax, 0x1010
call fcn.004ebbf0
mov eax, dword [0x528af4]
xor eax, esp
mov dword [esp + 0x100c], eax
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x1020]
push edi
mov edi, ecx
mov dword [esp + 0x10], ecx
lea edx, [edi + 2]
mov edi, edi
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x414090
sub edi, edx
sar edi, 1
cmp edi, 7
jbe 0x4142ac
lea eax, [ecx - 0xe]
lea eax, [eax + edi*2]
push 0x50ca98
push eax
call fcn.004f2e99
add esp, 8
test eax, eax
jne 0x4142a6
lea ebp, [edi*2 - 6]
mov dword [esi + 0x18], eax
mov edi, dword [esp + 0x10]
lea ebx, [eax + 1]
push 0x800
push edi
lea eax, [esp + 0x24]
push eax
call fcn.0048e710
cmp ebp, 0x1000
jae 0x414311
xor eax, eax
mov word [esp + ebp + 0x1c], ax
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414100
sub eax, edx
lea ecx, [esp + 0x1c]
sar eax, 1
push ebx
push str._03d
lea eax, [ecx + eax*2]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x414139
inc dword [esi + 0x18]
inc ebx
cmp ebx, 0x3e8
jb 0x4140d5
cmp dword [esi + 0x18], 1
jbe 0x4142ae
push dword [esi + 0x14]
call fcn.004ebd28
mov eax, dword [esi + 0x18]
xor ecx, ecx
mov edx, 0x10
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ebd1f
xor ebx, ebx
mov dword [esi + 0x14], eax
add esp, 8
cmp dword [esi + 0x18], ebx
jbe 0x41425d
mov dword [esp + 0x14], ebx
push 0x800
push edi
lea eax, [esp + 0x24]
push eax
call fcn.0048e710
cmp ebp, 0x1000
jae 0x414311
xor eax, eax
lea ecx, [esp + 0x1c]
mov word [esp + ebp + 0x1c], ax
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4141b0
sub ecx, edx
lea eax, [ebx + 1]
push eax
sar ecx, 1
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x20]
push str._03d
lea eax, [eax + ecx*2]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0xc
mov edi, dword [esi + 0x14]
mov ecx, esi
add edi, dword [esp + 0x14]
mov byte [esi + 4], 0
call dword [eax + 4]
cmp byte [esi + 5], 0
je 0x4141fe
mov dword [esi + 8], 1
jmp 0x41422a
push 0
push dword [esp + 0x1034]
lea eax, [esp + 0x24]
push dword [esp + 0x1034]
push 0
push dword [esp + 0x1038]
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
mov ecx, dword [esi + 8]
cmp ecx, 0xffffffff
setne al
mov byte [esi + 4], al
test al, al
je 0x414270
lea eax, [edi + 8]
mov dword [edi], ecx
push eax
mov ecx, esi
call fcn.00413310
mov ebx, dword [esp + 0x18]
add dword [esp + 0x14], 0x10
mov edi, dword [esp + 0x10]
cmp ebx, dword [esi + 0x18]
jb 0x414182
mov eax, dword [esi + 0x14]
mov eax, dword [eax]
mov dword [esi + 8], eax
mov al, 1
mov byte [esi + 0x10], 1
jmp 0x4142f6
test ebx, ebx
je 0x414290
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
lea esp, [esp]
mov eax, dword [esi + 0x14]
push dword [eax + edi]
call ebp
lea edi, [edi + 0x10]
sub ebx, 1
jne 0x414280
push dword [esi + 0x14]
call fcn.004ebd28
add esp, 4
mov dword [esi + 0x14], 0
xor al, al
jmp 0x4142f6
mov edi, dword [esp + 0x10]
jmp 0x4142ae
mov edi, ecx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [esi + 5], 0
je 0x4142c4
mov dword [esi + 8], 1
jmp 0x4142ec
push 0
push dword [esp + 0x1034]
push dword [esp + 0x1034]
push 0
push dword [esp + 0x1038]
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp dword [esi + 8], 0xffffffff
setne al
mov byte [esi + 4], al
mov ecx, dword [esp + 0x101c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004ebbd8
add esp, 0x1010
ret 0x10
call fcn.004ebafc
int3