Function at 0x4578c0
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 0x4c5fe5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x4e0
mov eax, dword [0x4ff080]
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 - 0x4cc], ecx
mov dword [ebp - 4], 0
xorps xmm0, xmm0
mov dword [ebp - 0x4d4], ecx
mov ecx, esi
mov dword [ebp - 0x4c4], 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 0x457950
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x238]
call fcn.00463250
mov dword [ebp - 4], 1
push ecx
push 0x4e9ec0
lea ecx, [ebp - 0x238]
call fcn.004601c0
cmp dword [ebp - 0x224], 7
lea edx, [ebp - 0x238]
mov dword [ebp - 0x4cc], eax
cmova edx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x4c0], edx
cmp eax, 1
jb 0x457b02
dec eax
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
lea edi, [edx + ecx*2]
mov esi, edi
sub esi, 0x4e9ec0
cmp word [edi], 0x22
jne 0x457a3a
mov edx, 1
mov eax, 0x4e9ec0
mov cx, word [esi + eax]
cmp cx, word [eax]
jne 0x457a34
add eax, 2
sub edx, 1
jne 0x4579d7
sub edi, dword [ebp - 0x4c0]
sar edi, 1
cmp edi, 0xffffffff
je 0x457afc
mov ecx, dword [ebp - 0x4cc]
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 0x457f34
jmp 0x457a4d
mov edx, dword [ebp - 0x4c0]
cmp edi, edx
je 0x457afc
sub edi, 2
sub esi, 2
jmp 0x4579c7
sub edi, ecx
sub eax, edx
lea ecx, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x224], 7
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x250]
lea eax, [eax + edx*2]
push eax
call fcn.00463250
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x4c4], 2
call fcn.00460bf0
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 - 0x4c4], edi
and edi, 0xfffffffd
movq qword [ebp - 0x228], xmm0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
mov dword [ebp - 0x4c4], 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], 7
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x457eba
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x457ea0
cmp dword [ebp - 0x224], 7
lea edi, [ebp - 0x238]
mov esi, dword [ebp - 0x228]
xorps xmm0, xmm0
cmova edi, dword [ebp - 0x238]
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 0
movups xmmword [ebp - 0x268], xmm0
cmp esi, 0x7ffffffe
ja 0x457f39
mov dword [ebp - 0x254], 7
cmp esi, 7
ja 0x457bae
movups xmm0, xmmword [edi]
mov dword [ebp - 0x258], esi
movups xmmword [ebp - 0x268], xmm0
jmp 0x457c10
mov eax, esi
or eax, 7
cmp eax, 0x7ffffffe
jbe 0x457bc1
mov eax, SysReAllocString
jmp 0x457bcb
mov ecx, 0xa
cmp eax, ecx
cmovb eax, ecx
mov dword [ebp - 0x4c0], eax
lea eax, [ebp - 0x4c0]
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.004643a0
mov ecx, eax
mov dword [ebp - 0x258], esi
mov eax, dword [ebp - 0x4c0]
mov dword [ebp - 0x254], eax
lea eax, [esi*2 + 2]
push eax
push edi
push ecx
mov dword [ebp - 0x268], ecx
call fcn.004ac080
add esp, 0x14
mov byte [ebp - 4], 3
xor esi, esi
mov dword [ebp - 0x248], 0x4e88e8
mov dword [ebp - 0x244], 0x4e9ec8
mov dword [ebp - 0x240], str..dll
mov dword [ebp - 0x23c], str..com
nop
cmp dword [ebp - 0x224], 7
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b32bc
mov edi, dword [ebp + esi*4 - 0x248]
lea eax, [ebp - 0x220]
add esp, 0xc
push edi
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x457e8f
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4e8858
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 7
cmova eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
lea eax, [ebp - 0x220]
push edi
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
mov byte [ebp - 0x4b9], 0
lea eax, [ebp - 0x4b8]
push 0x250
push 0
push eax
call fcn.004abe70
add esp, 4
lea ecx, [ebp - 0x4e0]
call fcn.0045ff90
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], 4
cmp eax, 0xffffffff
je 0x457d73
cmp dword [ebp - 0x498], 0
jbe 0x457d6c
test byte [ebp - 0x4b8], 0x10
mov byte [ebp - 0x4b9], 1
je 0x457d73
mov byte [ebp - 0x4b9], 0
mov byte [ebp - 4], 3
cmp eax, 0xffffffff
je 0x457d83
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x4b9], 0
jne 0x457e8f
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x4e8858
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
lea eax, [ebp - 0x238]
cmp dword [ebp - 0x224], 7
cmova eax, dword [ebp - 0x238]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
lea eax, [ebp - 0x220]
push edi
push 0x104
push eax
call fcn.004b3320
add esp, 0xc
mov byte [ebp - 0x4b9], 0
lea eax, [ebp - 0x4b8]
push 0x250
push 0
push eax
call fcn.004abe70
add esp, 4
lea ecx, [ebp - 0x4ec]
call fcn.0045ff90
lea ecx, [ebp - 0x4b8]
push ecx
lea ecx, [ebp - 0x220]
mov eax, dword [eax + 8]
push ecx
call eax
mov dword [ebp - 0x4c0], eax
mov byte [ebp - 4], 5
cmp eax, 0xffffffff
je 0x457e63
cmp dword [ebp - 0x498], 0
jbe 0x457e5c
test byte [ebp - 0x4b8], 0x10
mov byte [ebp - 0x4b9], 1
je 0x457e63
mov byte [ebp - 0x4b9], 0
mov byte [ebp - 4], 3
cmp eax, 0xffffffff
je 0x457e73
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x4b9], 0
jne 0x457e8f
xor eax, eax
inc esi
mov word [ebp - 0x220], ax
cmp esi, 3
jle 0x457c40
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x268]
call fcn.00460bf0
jmp 0x457eba
push 0x104
push esi
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.004b39fa
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 0x457ee0
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00463250
or dword [ebp - 0x4c4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x238]
call fcn.00460bf0
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.004a9b96
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00461390
call fcn.004575d0
int3