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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f163d
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x53ba20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
push esi
call fcn.004c8c20
mov ecx, dword [ebp + 0x10]
add esp, 4
movzx eax, word [ecx]
test ax, ax
je 0x414e59
cmp word [ecx + 2], 0x3a
je 0x414da3
cmp eax, 0x5c
jne 0x414e59
push ecx
push 0
lea eax, [ebp - 0x14]
mov ecx, 0x540734
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004080d0
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x414dc3
mov eax, dword [esi]
jmp 0x414dc5
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov ebx, dword [edi]
call fcn.004c8c20
push ebx
mov dword [edi], eax
call fcn.004c8c7f
mov eax, dword [ebp - 0x18]
add esp, 8
cmp eax, 0xffffffff
je 0x414df7
test al, 0x10
jne 0x414df7
mov bl, 1
jmp 0x414df9
xor bl, bl
test esi, esi
je 0x414fb9
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
dec eax
jne 0x414fb9
mov eax, dword [esi]
test eax, eax
je 0x414e23
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x414e3a
push eax
call fcn.004c3453
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.004c3279
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
mov eax, 0x4fbd20
cmovne eax, esi
push eax
call fcn.004c8c20
mov edi, eax
push 0
mov dword [ebp - 0x1c], edi
call fcn.004c8c7f
add esp, 8
cmp word [edi], 0
mov esi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], esi
je 0x414fae
nop
push 0x3b
push esi
call fcn.004c55d8
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x414ea6
xor eax, eax
mov word [ebx], ax
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x414eb0
sub ecx, edx
mov edx, dword [ebp + 0x10]
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x414ec5
sub edx, esi
sar edx, 1
lea esi, [edx + 2]
add esi, ecx
lea eax, [esi + esi]
push eax
call fcn.004c8c9a
push dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
push ecx
push 0x501628
push esi
push eax
mov dword [ebp - 0x14], eax
call fcn.00415290
add esp, 0x18
test ebx, ebx
je 0x414f0c
mov eax, 0x3b
lea ecx, [ebx + 2]
mov word [ebx], ax
jmp 0x414f11
mov ecx, 0x4fbd20
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x20]
push ebx
push 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x10], ecx
push eax
mov ecx, 0x540734
call fcn.004080d0
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x414f37
mov eax, dword [esi]
jmp 0x414f39
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x414f4d
test al, 0x10
je 0x414fcd
push ebx
call fcn.004c8c7f
add esp, 4
test esi, esi
je 0x414fa1
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
dec eax
jne 0x414f9a
mov eax, dword [esi]
test eax, eax
je 0x414f78
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x414f8f
push eax
call fcn.004c3453
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.004c3279
add esp, 8
mov dword [ebp - 0x18], 0
mov esi, dword [ebp - 0x10]
cmp word [esi], 0
jne 0x414e90
xor bl, bl
push edi
call fcn.004c8c7f
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
mov ecx, 0x4fbd20
mov eax, dword [ebx]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x14]
test eax, eax
cmovne ecx, eax
push ecx
call fcn.004c8c20
push dword [ebp + 0x10]
mov dword [ebx], eax
call fcn.004c8c7f
push dword [ebp - 0x14]
call fcn.004c8c7f
add esp, 0xc
test esi, esi
je 0x415041
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
dec eax
jne 0x415041
mov eax, dword [esi]
test eax, eax
je 0x41501f
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x415036
push eax
call fcn.004c3453
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.004c3279
add esp, 8
mov bl, 1
jmp 0x414fb0