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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ed6e8
mov eax, dword fs:[0]
push eax
sub esp, 0x638
mov eax, dword [0x6670f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x644], ebx
mov eax, dword [ebx]
cmp dword [eax - 0xc], edi
je 0x4eadb6
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x4eadd4
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x638], eax
mov dword [ebp - 4], edi
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x4eadde
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x63c], esi
mov byte [ebp - 4], 1
cmp dword [esi - 0xc], edi
jne 0x4ea85a
mov eax, dword [ebx]
cmp dword [eax - 0xc], edi
jl 0x4ea85a
push 0x604a70
push eax
call fcn.0058d0d6
add esp, 8
test eax, eax
je 0x4ea85a
sub eax, dword [ebx]
sar eax, 1
cmp eax, 1
jne 0x4ea85a
push ebx
lea ecx, [ebp - 0x63c]
call fcn.004bfcd0
mov esi, dword [ebp - 0x63c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4ea85a
lea ecx, [ebp - 0x63c]
call fcn.004bd3a0
mov esi, dword [ebp - 0x63c]
or ebx, 0xffffffff
cmp dword [esi - 0xc], 0
jne 0x4eaa40
cmp dword [ebp + 0xc], 0
jne 0x4eaa3c
push 0x20c
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0058c8f0
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ea8a4
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x638]
call fcn.004c0470
mov edi, dword [ebp - 0x638]
push 0x5c
push edi
call fcn.0058cb87
add esp, 8
test eax, eax
je 0x4ea9b5
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x4ea9b5
xor ebx, ebx
add eax, 1
cmovns ebx, eax
cmp ebx, dword [edi - 0xc]
jl 0x4ea910
add edi, 0xfffffff0
push edi
call fcn.004bfdc0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x640], edi
jmp 0x4ea981
mov eax, dword [ebp - 0x638]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x4ea928
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x4ea93e
call fcn.004b4040
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x4eade8
mov eax, dword [ecx]
push 2
push ebx
call dword [eax]
test eax, eax
je 0x4eadf2
lea edi, [eax + 0x10]
mov dword [ebp - 0x640], edi
test ebx, ebx
js 0x4eae01
cmp ebx, dword [edi - 8]
jg 0x4eae01
push ebx
push dword [ebp - 0x638]
xor eax, eax
mov dword [edi - 0xc], ebx
push ebx
push edi
mov word [edi + ebx*2], ax
call fcn.004b35d0
add esp, 0x10
lea eax, [ebp - 0x640]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x638]
call fcn.004bfcd0
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4ea9b5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x638]
cmp dword [eax - 0xc], 0
je 0x4eaa3c
lea eax, [ebp - 0x638]
push eax
call fcn.004e9bd0
push dword [ebp - 0x644]
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x640]
push eax
call fcn.004bc8d0
add esp, 0x10
push eax
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], 3
call fcn.004bfcd0
mov edx, dword [ebp - 0x640]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4eaa1a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x63c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4eaa3c
lea ecx, [ebp - 0x63c]
call fcn.004bd3a0
mov esi, dword [ebp - 0x63c]
cmp dword [esi - 0xc], 0
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
jne 0x4eabc9
lea ecx, [ebp - 0x638]
call fcn.004bd3a0
mov eax, dword [0x66ba60]
test al, 1
jne 0x4eaa91
or eax, 1
mov dword [0x66ba60], eax
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x4eadf7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x5f7a40
mov dword [0x66ba5c], eax
call fcn.0050f1be
add esp, 4
mov eax, dword [0x66ba5c]
cmp dword [eax - 0xc], 0
jne 0x4eaaf6
push 0x20c
lea eax, [ebp - 0x428]
push 0
push eax
call fcn.0058c8f0
add esp, 0xc
lea eax, [ebp - 0x428]
push 1
push 0x25
push eax
push 0
call edi
lea ecx, [ebp - 0x428]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4eaad0
sub ecx, edx
lea eax, [ebp - 0x428]
sar ecx, 1
push ecx
push eax
mov ecx, 0x66ba5c
call fcn.004c0470
mov eax, dword [0x66ba5c]
add eax, 0xfffffff0
push eax
call fcn.004bfdc0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x640], edi
lea eax, [ebp - 0x640]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x638]
call fcn.004bfcd0
mov byte [ebp - 4], 1
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4eab3c
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x638]
cmp dword [eax - 0xc], 0
je 0x4eabc3
lea eax, [ebp - 0x638]
push eax
call fcn.004e9bd0
push dword [ebp - 0x644]
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x640]
push eax
call fcn.004bc8d0
add esp, 0x10
push eax
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], 5
call fcn.004bfcd0
mov edx, dword [ebp - 0x640]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4eaba1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x63c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4eabc3
lea ecx, [ebp - 0x63c]
call fcn.004bd3a0
mov esi, dword [ebp - 0x63c]
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp dword [esi - 0xc], 0
jne 0x4ead48
lea ecx, [ebp - 0x638]
call fcn.004bd3a0
mov eax, dword [0x66ba68]
test al, 1
jne 0x4eac18
or eax, 1
mov dword [0x66ba68], eax
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x4eae0b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
push 0x5f7a60
mov dword [0x66ba64], eax
call fcn.0050f1be
add esp, 4
mov eax, dword [0x66ba64]
cmp dword [eax - 0xc], 0
jne 0x4eac77
push 0x20c
lea eax, [ebp - 0x634]
push 0
push eax
call fcn.0058c8f0
add esp, 0xc
lea eax, [ebp - 0x634]
push 1
push 0x25
push eax
push 0
call edi
lea ecx, [ebp - 0x634]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4eac51
sub ecx, edx
lea eax, [ebp - 0x634]
sar ecx, 1
push ecx
push eax
mov ecx, 0x66ba64
call fcn.004c0470
mov eax, dword [0x66ba64]
add eax, 0xfffffff0
push eax
call fcn.004bfdc0
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x640], edi
lea eax, [ebp - 0x640]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x638]
call fcn.004bfcd0
mov byte [ebp - 4], 1
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4eacbd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x638]
cmp dword [eax - 0xc], 0
je 0x4ead48
lea eax, [ebp - 0x638]
push eax
call fcn.004e9bd0
push dword [ebp - 0x644]
lea eax, [ebp - 0x638]
push eax
lea eax, [ebp - 0x640]
push eax
call fcn.004bc8d0
add esp, 0x10
push eax
lea ecx, [ebp - 0x63c]
mov byte [ebp - 4], 7
call fcn.004bfcd0
mov edx, dword [ebp - 0x640]
mov eax, ebx
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ead22
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x63c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call edi
test eax, eax
jne 0x4ead4e
lea ecx, [ebp - 0x63c]
call fcn.004bd3a0
mov esi, dword [ebp - 0x63c]
jmp 0x4ead4e
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp dword [esi - 0xc], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
je 0x4ead6a
push esi
call edi
test eax, eax
je 0x4ead6a
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x4ead76
mov eax, dword [ebp - 0x644]
push dword [eax]
call ebx
mov edi, eax
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4ead94
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x638]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4eadb6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050ed5c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004b3510
push 0x80004005
call fcn.004b3510
push 0x80004005
call fcn.004b3510
call fcn.004b5400
push 0x80004005
call fcn.004b3510
push 0x80070057
call fcn.004b3510
push 0x80004005
call fcn.004b3510
int3