Function at 0x4a0490
Capabilities:
Check if file exists

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 0x5b932c
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x3d0
mov eax, dword [0x645300]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x208
lea eax, [ebp - 0x268]
mov byte [ebp - 0x2b1], 0
push 0
push eax
call fcn.00546d20
add esp, 0xc
lea eax, [ebp - 0x268]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
xorps xmm0, xmm0
mov dword [ebp - 0x2a0], 0
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x29c], 0
movups xmmword [ebp - 0x2b0], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a0543
sub ecx, edx
lea eax, [ebp - 0x268]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2b0]
call fcn.004060e0
mov dword [ebp - 4], 0
mov eax, SysReAllocString
mov ecx, dword [ebp - 0x2a0]
sub eax, ecx
cmp eax, 0xe
jb 0x4a08eb
cmp dword [ebp - 0x29c], 7
lea eax, [ebp - 0x2b0]
push 0xe
cmova eax, dword [ebp - 0x2b0]
push str.XYlauncher.exe
push ecx
push eax
push ecx
push dword [ebp - 0x2b8]
lea ecx, [ebp - 0x298]
call fcn.00489790
mov byte [ebp - 4], 1
lea eax, [ebp - 0x298]
cmp dword [ebp - 0x284], 7
cmova eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4a082e
cmp dword [ebp - 0x284], 7
lea edx, [ebp - 0x298]
lea ecx, [ebp - 0x2d4]
cmova edx, dword [ebp - 0x298]
call fcn.004635c0
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0xf
jbe 0x4a0603
mov eax, dword [eax]
lea ecx, [ebp - 0x3dc]
push 3
mov dword [ebp - 0x3e0], ecx
lea ecx, [ebp - 0x3e0]
push eax
call fcn.00413b10
mov byte [ebp - 4], 3
xorps xmm0, xmm0
mov edx, dword [ebp - 0x3e0]
mov ecx, edx
movups xmmword [ebp - 0x280], xmm0
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0
lea esi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a0650
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x280]
call fcn.004060e0
mov eax, dword [ebp - 0x3e0]
lea ecx, [ebp - 0x3dc]
cmp eax, ecx
je 0x4a0685
push eax
call fcn.00560701
add esp, 4
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x2c0]
cmp ecx, 0xf
jbe 0x4a06c3
mov edx, dword [ebp - 0x2d4]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4a06b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a08f0
push ecx
push edx
call fcn.00543bbf
add esp, 8
cmp dword [ebp - 0x26c], 7
lea eax, [ebp - 0x280]
mov edx, dword [ebp - 0x280]
lea ecx, [ebp - 0x280]
cmova eax, edx
mov dword [ebp - 0x2c4], 0
mov dword [ebp - 0x2bc], eax
lea edi, [ebp - 0x280]
mov eax, dword [ebp - 0x270]
cmova ecx, edx
cmova edi, edx
mov dword [ebp - 0x2c0], 0xf
mov byte [ebp - 0x2d4], 0
lea eax, [ecx + eax*2]
mov dword [ebp - 0x2b8], eax
cmp edi, eax
je 0x4a0742
mov esi, dword [ebp - 0x2bc]
sub esi, edi
movzx eax, word [edi]
push eax
call fcn.0056463a
mov word [esi + edi], ax
add esp, 4
add edi, 2
cmp edi, dword [ebp - 0x2b8]
jne 0x4a0727
push 0x42
lea eax, [ebp - 0x60]
push 0
push eax
call fcn.00546d20
add esp, 0xc
call fcn.004729c0
mov esi, eax
lea edi, [esi + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 4]
test eax, eax
je 0x4a078b
push str.XunYouGetLauncherMd5
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4a078b
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x60]
push eax
call esi
jmp 0x4a0792
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x60]
push eax
call fcn.005853e8
lea ecx, [ebp - 0x60]
add esp, 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a07a4
mov edi, dword [ebp - 0x270]
lea esi, [ebp - 0x280]
sub ecx, edx
lea eax, [ebp - 0x60]
sar ecx, 1
mov edx, edi
cmp dword [ebp - 0x26c], 7
cmova esi, dword [ebp - 0x280]
cmp ecx, edi
cmovb edx, ecx
test edx, edx
je 0x4a0805
mov edi, eax
sub esi, edi
mov dword [ebp - 0x2b8], esi
movzx esi, word [eax + esi]
movzx edi, word [eax]
cmp si, di
jne 0x4a080e
mov esi, dword [ebp - 0x2b8]
add eax, 2
sub edx, 1
jne 0x4a07e5
mov edi, dword [ebp - 0x270]
cmp ecx, edi
jbe 0x4a0816
or esi, 0xffffffff
jmp 0x4a081a
sbb esi, esi
and esi, 0xfffffffe
inc esi
jmp 0x4a081a
sbb esi, esi
neg esi
lea ecx, [ebp - 0x280]
call fcn.00405d20
test esi, esi
sete byte [ebp - 0x2b1]
mov ecx, dword [ebp - 0x284]
cmp ecx, 7
jbe 0x4a086e
mov edx, dword [ebp - 0x298]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4a0864
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a08f5
push ecx
push edx
call fcn.00543bbf
add esp, 8
mov ecx, dword [ebp - 0x29c]
xor eax, eax
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x284], 7
mov word [ebp - 0x298], ax
cmp ecx, 7
jbe 0x4a08c7
mov edx, dword [ebp - 0x2b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4a08bd
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4a08f5
push ecx
push edx
call fcn.00543bbf
add esp, 8
mov al, byte [ebp - 0x2b1]
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.00543bb1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00406a10
call fcn.00560663
call fcn.00560663
int3