Function at 0x457880
Capabilities:
Check if file exists
Get common file path

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 0x4c6bf5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4e0
mov eax, dword [0x502054]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x4c8], esi
mov dword [ebp - 0x4d0], ecx
mov dword [ebp - 0x4c4], ecx
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x4d4], ecx
mov ecx, esi
mov dword [ebp - 0x4c0], 0
movups xmmword [ebp - 0x238], xmm0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x457910
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x238]
call fcn.004631a0
mov dword [ebp - 4], 1
push ecx
push 0x4ed870
lea ecx, [ebp - 0x238]
call fcn.00460160
cmp dword [ebp - 0x224], 8
lea edx, [ebp - 0x238]
mov dword [ebp - 0x4c4], eax
cmovae edx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x4cc], edx
cmp eax, 1
jb 0x457ac2
dec eax
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
lea edi, [edx + ecx*2]
mov esi, edi
sub esi, 0x4ed870
cmp word [edi], 0x22
jne 0x4579fa
mov edx, 1
mov eax, 0x4ed870
mov cx, word [esi + eax]
cmp cx, word [eax]
jne 0x4579f4
add eax, 2
sub edx, 1
jne 0x457997
sub edi, dword [ebp - 0x4cc]
sar edi, 1
cmp edi, 0xffffffff
je 0x457abc
mov ecx, dword [ebp - 0x4c4]
lea edx, [ecx + 1]
mov byte [ebp - 4], 2
xorps xmm0, xmm0
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
movups xmmword [ebp - 0x250], xmm0
cmp eax, edx
jb 0x457ef4
jmp 0x457a0d
mov edx, dword [ebp - 0x4cc]
cmp edi, edx
je 0x457abc
sub edi, 2
sub esi, 2
jmp 0x457987
sub edi, ecx
sub eax, edx
lea ecx, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x250]
lea eax, [eax + edx*2]
push eax
call fcn.004631a0
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x4c0], 2
call fcn.00460b90
movups xmm0, xmmword [ebp - 0x250]
mov edi, 2
xor eax, eax
mov word [ebp - 0x250], ax
movups xmmword [ebp - 0x238], xmm0
movq xmm0, qword [ebp - 0x240]
mov dword [ebp - 0x4c0], edi
and edi, 0xfffffffd
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x4c0], edi
mov byte [ebp - 4], 1
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], 7
mov word [ebp - 0x250], ax
mov esi, dword [ebp - 0x4c8]
xor eax, eax
lea ecx, [ebp - 0x220]
cmp dword [ebp - 0x224], 8
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x457e7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x457e60
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
mov edi, dword [ebp - 0x228]
xorps xmm0, xmm0
cmovae eax, dword [ebp - 0x238]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x4c4], eax
movups xmmword [ebp - 0x268], xmm0
cmp edi, 0x7ffffffe
ja 0x457ef9
mov dword [ebp - 0x254], 7
cmp edi, 8
jae 0x457b74
movups xmm0, xmmword [eax]
mov dword [ebp - 0x258], edi
movups xmmword [ebp - 0x268], xmm0
jmp 0x457bcc
mov esi, edi
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x457b88
mov esi, SysReAllocString
jmp 0x457b92
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x268]
call fcn.004634c0
mov ecx, eax
mov dword [ebp - 0x258], edi
lea eax, [edi*2 + 2]
mov dword [ebp - 0x268], ecx
push eax
push dword [ebp - 0x4c4]
mov dword [ebp - 0x254], esi
push ecx
call fcn.004abd70
add esp, 0xc
mov byte [ebp - 4], 3
xor esi, esi
mov dword [ebp - 0x248], 0x4ec298
mov dword [ebp - 0x244], 0x4ed878
mov dword [ebp - 0x240], str..dll
mov dword [ebp - 0x23c], str..com
nop word [eax + eax]
cmp dword [ebp - 0x224], 8
lea eax, [ebp - 0x238]
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b316c
mov edi, dword [ebp + esi*4 - 0x248]
lea eax, [ebp - 0x220]
add esp, 0xc
push edi
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x457e4f
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4ec208
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 8
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
lea eax, [ebp - 0x220]
push edi
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
mov byte [ebp - 0x4b9], 0
lea eax, [ebp - 0x4b8]
push 0x250
push 0
push eax
call fcn.004abb60
add esp, 4
lea ecx, [ebp - 0x4e0]
call fcn.0045ff30
lea ecx, [ebp - 0x4b8]
push ecx
lea ecx, [ebp - 0x220]
mov eax, dword [eax + 8]
push ecx
call eax
mov dword [ebp - 0x4c4], eax
mov byte [ebp - 4], 4
cmp eax, 0xffffffff
je 0x457d33
cmp dword [ebp - 0x498], 0
jbe 0x457d2c
test byte [ebp - 0x4b8], 0x10
mov byte [ebp - 0x4b9], 1
je 0x457d33
mov byte [ebp - 0x4b9], 0
mov byte [ebp - 4], 3
cmp eax, 0xffffffff
je 0x457d43
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x4b9], 0
jne 0x457e4f
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4ec208
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 8
cmovae eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
lea eax, [ebp - 0x220]
push edi
push 0x104
push eax
call fcn.004b31d0
add esp, 0xc
mov byte [ebp - 0x4b9], 0
lea eax, [ebp - 0x4b8]
push 0x250
push 0
push eax
call fcn.004abb60
add esp, 4
lea ecx, [ebp - 0x4ec]
call fcn.0045ff30
lea ecx, [ebp - 0x4b8]
push ecx
lea ecx, [ebp - 0x220]
mov eax, dword [eax + 8]
push ecx
call eax
mov dword [ebp - 0x4cc], eax
mov byte [ebp - 4], 5
cmp eax, 0xffffffff
je 0x457e23
cmp dword [ebp - 0x498], 0
jbe 0x457e1c
test byte [ebp - 0x4b8], 0x10
mov byte [ebp - 0x4b9], 1
je 0x457e23
mov byte [ebp - 0x4b9], 0
mov byte [ebp - 4], 3
cmp eax, 0xffffffff
je 0x457e33
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x4b9], 0
jne 0x457e4f
xor eax, eax
inc esi
mov word [ebp - 0x220], ax
cmp esi, 3
jle 0x457c00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x268]
call fcn.00460b90
jmp 0x457e7a
push 0x104
push esi
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b38aa
add esp, 0x10
mov esi, dword [ebp - 0x4d0]
lea ecx, [ebp - 0x220]
xorps xmm0, xmm0
lea edx, [ecx + 2]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x457ea0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.004631a0
or dword [ebp - 0x4c0], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.00460b90
mov eax, esi
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.004a9913
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00461330
call fcn.004575c0
int3