Function at 0x4a1970
Capabilities:
Check if file exists

Disassembly:
push ebp
lea ebp, [esp - 0x2004]
mov eax, 0x2004
call fcn.004fe1a0
push 0xffffffffffffffff
push 0x521190
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x5a4aa8]
xor eax, ebp
mov dword [ebp + 0x2000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x20], edi
mov byte [ebp - 0x11], 0
mov dword [ebp - 4], edi
call fcn.00435010
mov ebx, eax
mov dword [ebp - 0x1c], ebx
cmp ebx, edi
je 0x4a1d62
mov eax, dword [ebx + 0x20]
push eax
mov edi, dword [sym.imp.USER32.dll_IsWindow]
call edi
test eax, eax
je 0x4a1d62
push 0x47c
mov ecx, ebx
call fcn.004dfca4
mov ebx, eax
test ebx, ebx
je 0x4a1d62
mov eax, dword [ebx + 0x20]
push eax
call edi
test eax, eax
je 0x4a1d62
lea edi, [esi + 0x30c]
push 0x800
push 0
push edi
call fcn.004fd670
push 0x800
push 0
lea eax, [ebp + 0x800]
push eax
call fcn.004fd670
push 0x800
push 0
lea ecx, [ebp + 0x1000]
push ecx
call fcn.004fd670
push 0x800
push 0
lea edx, [ebp]
push edx
call fcn.004fd670
add esp, 0x30
push 0x400
lea eax, [ebp + 0x800]
push eax
mov ecx, ebx
call fcn.004e035a
lea ecx, [ebp - 0x18]
push ecx
mov ecx, esi
call fcn.004e93a8
mov byte [ebp - 4], 1
mov eax, dword [eax]
push eax
push 0x400
lea edx, [ebp + 0x1000]
push edx
call fcn.004fa94e
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00406150
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
call fcn.004e95cf
mov byte [ebp - 4], 2
mov eax, dword [eax]
push eax
push 0x400
lea ecx, [ebp + 0x800]
push ecx
call fcn.004fa94e
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
call fcn.00406150
lea edx, [ebp + 0x800]
push edx
push 0x400
lea eax, [ebp]
push eax
call fcn.004fa94e
add esp, 0xc
lea eax, [ebp + 0x1000]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a1af0
sub eax, edx
sar eax, 1
je 0x4a1b4a
lea eax, [ebp + 0x1000]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a1b10
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 + 0xffe], 0x5c
jne 0x4a1b4a
lea eax, [ebp + 0x1000]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a1b33
sub eax, edx
sar eax, 1
mov word [ebp + eax*2 + 0xffe], cx
lea ecx, [ebp]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
test eax, eax
je 0x4a1b6c
lea edx, [ebp + 0x800]
push edx
push 0x400
push edi
call fcn.004fa94e
jmp 0x4a1b86
lea eax, [ebp + 0x800]
push eax
lea ecx, [ebp + 0x1000]
push ecx
push 0x535a74
mov edx, edi
call fcn.00404380
add esp, 0xc
mov eax, edi
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a1b90
sub eax, edx
sar eax, 1
cmp eax, 0x50
jbe 0x4a1bf1
push 0x800
push 0
lea edx, [ebp + 0x1800]
push edx
call fcn.004fd670
push edi
lea eax, [esi + 0xb6e]
push eax
lea edx, [ebp + 0x1800]
call fcn.00404380
add esp, 0x14
test esi, esi
jne 0x4a1bd5
xor eax, eax
jmp 0x4a1bd8
mov eax, dword [esi + 0x20]
push eax
push 0x30
lea edx, [ebp + 0x1800]
mov ecx, dword [esi + 0xb68]
call fcn.00487090
jmp 0x4a1d62
test edi, edi
je 0x4a1bfe
call fcn.004a17f0
mov ebx, eax
jmp 0x4a1c03
mov ebx, 0x57
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a1c15
test ebx, ebx
jmp 0x4a1cff
push 0x800
push 0
test ebx, ebx
je 0x4a1c75
lea edx, [ebp + 0x1800]
push edx
call fcn.004fd670
push edi
lea eax, [esi + 0x1b6e]
push eax
lea edx, [ebp + 0x1800]
call fcn.00404380
add esp, 0x14
mov ecx, dword [esi + 0xb68]
test ecx, ecx
je 0x4a1c65
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x20]
push eax
push 0
lea edx, [ebp + 0x1800]
call fcn.00487090
jmp 0x4a1d62
push 0
push 0
lea eax, [ebp + 0x1800]
push eax
jmp 0x4a1d5b
lea ecx, [ebp + 0x1800]
push ecx
call fcn.004fd670
push edi
lea edx, [esi + 0x136e]
push edx
lea edx, [ebp + 0x1800]
call fcn.00404380
add esp, 0x14
mov ecx, dword [esi + 0xb68]
test ecx, ecx
je 0x4a1cb4
mov eax, dword [esi + 0x20]
push eax
push 1
lea edx, [ebp + 0x1800]
call fcn.00487090
jmp 0x4a1cc6
push 1
push 0
lea eax, [ebp + 0x1800]
push eax
mov ecx, esi
call fcn.004dbfab
cmp eax, 1
jne 0x4a1d62
cmp byte [esi + 0xb6c], 0
je 0x4a1ced
mov eax, dword [esi + 0xb64]
test eax, eax
je 0x4a1ced
add eax, 0xe230
je 0x4a1ced
mov eax, dword [eax]
jmp 0x4a1cf0
mov eax, dword [ebp - 0x20]
push 0
push eax
mov edx, edi
call fcn.0049d3f0
add esp, 8
test eax, eax
jne 0x4a1d07
mov byte [ebp - 0x11], 1
jmp 0x4a1d62
push 0x800
push 0
lea ecx, [ebp + 0x1800]
push ecx
call fcn.004fd670
push edi
lea edx, [esi + 0x1b6e]
push edx
lea edx, [ebp + 0x1800]
call fcn.00404380
add esp, 0x14
mov ecx, dword [esi + 0xb68]
test ecx, ecx
je 0x4a1d50
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x20]
push eax
push 0
lea edx, [ebp + 0x1800]
call fcn.00487090
jmp 0x4a1d62
push 0
push 0
lea ecx, [ebp + 0x1800]
push ecx
mov ecx, esi
call fcn.004dbfab
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2000]
xor ecx, ebp
call fcn.004fa103
add ebp, 0x2004
mov esp, ebp
pop ebp
ret