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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0xa010
call fcn.00405a40
mov eax, dword [0x40f070]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0xa010], eax
mov eax, dword [ebp + 0x10]
mov edi, 0x2000
xor ebx, ebx
push edi
mov dword [ebp - 0xa00c], eax
lea eax, [ebp - 0x4004]
push ebx
push eax
mov dword [ebp - 0xa008], ebx
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x8004]
push ebx
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x6004]
push ebx
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0x2004]
push ebx
push eax
call sub.msvcrt.dll_memset
push edi
lea eax, [ebp - 0xa004]
push ebx
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xa00c]
mov dword [esi], ebx
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov eax, dword [eax + 0xc]
push edi
mov dword [esi + 0xc], eax
lea eax, [esi + 0x24]
push ebx
push eax
mov dword [esi + 0x10], 3
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ebx
call sub.msvcrt.dll_memset
add esp, 0x48
push edi
lea eax, [esi + 0x2028]
push ebx
push eax
mov dword [esi + 0x20], ebx
call sub.msvcrt.dll_memset
push edi
lea eax, [esi + 0x402c]
push ebx
push eax
mov dword [esi + 0x2024], ebx
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xa010]
add esp, 0x18
mov dword [esi + 0x4028], ebx
cmp dword [eax + 0xc], 1
jne 0x4043d9
lea ecx, [ebp - 0x4004]
push ecx
push dword [ebp - 0xa00c]
push eax
call fcn.00403bf7
test eax, eax
je 0x4046bb
mov eax, dword [ebp - 0xa010]
cmp dword [eax + 0xc], 3
jne 0x404400
lea ecx, [ebp - 0x4004]
push ecx
push dword [ebp - 0xa00c]
push eax
call fcn.00403c20
test eax, eax
je 0x4046bb
mov eax, dword [ebp - 0xa010]
cmp dword [eax + 0xc], 4
jne 0x404427
lea ecx, [ebp - 0x4004]
push ecx
push dword [ebp - 0xa00c]
push eax
call fcn.00403bce
test eax, eax
je 0x4046bb
mov eax, dword [ebp - 0xa010]
push dword [eax + 0x10]
add eax, 0x14
push eax
lea eax, [ebp - 0x4004]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x2004]
push eax
lea eax, [ebp - 0x4004]
push eax
call fcn.004031c0
test eax, eax
je 0x404551
lea eax, [ebp - 0x2004]
push eax
push 0x1000
lea eax, [ebp - 0x4004]
push eax
call fcn.00402300
lea eax, [ebp - 0x2004]
push eax
mov dword [ebp - 0xa008], ebx
call dword [sym.imp.msvcrt.dll__wcslwr]
mov dword [esp], str.e:_vsd
call dword [sym.imp.msvcrt.dll__wcslwr]
lea eax, [ebp - 0x2004]
mov dword [esp], str.e:_vsd
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jne 0x404538
lea eax, [ebp - 0xa004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.0040349f
test eax, eax
je 0x40453e
lea eax, [ebp - 0xa004]
push eax
push 0x1000
lea eax, [ebp - 0x4004]
push eax
call fcn.00402300
lea eax, [ebp - 0xa004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404514
lea eax, [ebp - 0xa004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403344
lea eax, [ebp - 0xa004]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404520
mov dword [ebp - 0xa008], 1
jmp 0x40453e
lea eax, [ebp - 0x2004]
push eax
push 0x1000
lea eax, [ebp - 0x4004]
push eax
call fcn.00402300
mov dword [ebp - 0xa008], ebx
lea eax, [ebp - 0x6004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403416
lea eax, [ebp - 0x8004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00403344
cmp dword [ebp - 0xa008], ebx
mov eax, dword [ebp - 0xa00c]
mov dword [esi], ebx
mov ecx, dword [eax + 8]
mov dword [esi + 8], ecx
mov eax, dword [eax + 0xc]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], 3
mov dword [esi + 0x14], 0x6018
mov dword [esi + 0x18], ebx
je 0x404598
mov dword [esi + 0x18], 1
push edi
lea eax, [esi + 0x24]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4019ac
push 0x1f9c
lea eax, [esi + 0x24]
push eax
call fcn.00402300
lea eax, [ebp - 0x4004]
push eax
push 0x1f9c
lea eax, [esi + 0x24]
push eax
call fcn.00402fdb
lea eax, [esi + 0x24]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x4045d4
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
push edi
mov dword [esi + 0x20], eax
lea eax, [esi + 0x2028]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x4019ac
push 0x1f9c
lea eax, [esi + 0x2028]
push eax
call fcn.00402300
lea eax, [ebp - 0x8004]
push eax
push 0x1f9c
lea eax, [esi + 0x2028]
push eax
call fcn.00402fdb
lea eax, [esi + 0x2028]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x404631
sub eax, ecx
push edi
sar eax, 1
lea eax, [eax + eax + 2]
push ebx
lea edi, [esi + 0x402c]
push edi
mov dword [esi + 0x2024], eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x6004]
push eax
push 0x1f9c
push edi
call fcn.00402300
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x404671
sub eax, ecx
sar eax, 1
lea eax, [eax + eax + 2]
mov dword [esi + 0x4028], eax
cmp dword [0x446a10], ebx
je 0x4046bb
lea eax, [esi + 0x402c]
push eax
lea eax, [esi + 0x2028]
push eax
lea eax, [esi + 0x24]
push eax
push dword [esi + 0x18]
push dword [0x446a0c]
push 0x4019f0
push 5
call fcn.00402ca2
add esp, 0x1c
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405a18
leave
ret 0xc