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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x268
mov eax, dword [0x10087040]
xor eax, esp
mov dword [esp + 0x264], eax
push esi
mov esi, dword [ebp + 8]
push edi
call fcn.10004310
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004cee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x3c]
push 0x1007b468
mov dword [esp + 0x40], eax
call fcn.10005830
test al, al
jne 0x100048e3
push 0
push 0x1007b468
lea ecx, [esp + 0x44]
call fcn.10005aa0
push ecx
xorps xmm0, xmm0
lea ecx, [esp + 0x44]
push esi
movaps xmmword [esp + 0x48], xmm0
movq qword [esp + 0x58], xmm0
call fcn.10006970
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004cee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x38]
push str._pid
mov dword [esp + 0x3c], eax
call fcn.10005830
test al, al
jne 0x1000493b
push 4
push str._pid
lea ecx, [esp + 0x40]
call fcn.10005aa0
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
push ecx
mov ecx, eax
mov dword [esp + 0x3c], eax
mov esi, esp
call fcn.10005bd0
add eax, 0x10
lea ecx, [esp + 0x44]
mov dword [esi], eax
call fcn.100078f0
mov edx, dword [esp + 0x38]
or edi, 0xffffffff
mov esi, eax
mov ecx, edi
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x1000497b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp esi, 0xffffffff
je 0x10004a50
push ecx
mov esi, esp
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004cee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov ecx, esi
push str._pid
mov dword [esi], eax
call fcn.10005830
test al, al
jne 0x100049c0
push 4
push str._pid
mov ecx, esi
call fcn.10005aa0
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x48]
call fcn.10007a60
mov esi, dword [esp + 0x3c]
mov edx, dword [eax]
lea ecx, [esi - 0x10]
mov dword [esp + 0xc], ecx
lea eax, [edx - 0x10]
mov dword [esp + 0x38], eax
cmp eax, ecx
je 0x10004a33
cmp dword [ecx + 0xc], 0
lea esi, [ecx + 0xc]
jl 0x10004a22
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x10004a22
mov ecx, dword [esp + 0x38]
call fcn.10005bd0
mov dword [esp + 0x38], eax
mov ecx, edi
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x10004a1d
mov esi, dword [esp + 0xc]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x38]
lea esi, [eax + 0x10]
jmp 0x10004a33
push dword [edx - 0xc]
lea ecx, [esp + 0x40]
push edx
call fcn.10005aa0
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 8]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004a54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10004a54
mov esi, dword [esp + 0x3c]
mov eax, dword [0x10089eac]
test al, 1
jne 0x10004a88
push 0x64
or eax, 1
push 0
push 0x10089e48
mov dword [0x10089eac], eax
call fcn.10043f30
add esp, 0xc
call fcn.10005170
push 0x10072aa0
call fcn.1004245d
add esp, 4
mov edi, dword [0x10089e54]
lea eax, [esp + 0x60]
push 0x208
push 0
push eax
call fcn.10043f30
add esp, 0xc
lea eax, [esp + 0x60]
push 1
push 0x1c
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test edi, edi
je 0x10004ac3
push edi
lea eax, [esp + 0x64]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004cf8
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x60]
push eax
call fcn.10005830
test al, al
jne 0x10004b1e
lea ecx, [esp + 0x60]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004b00
sub ecx, edx
lea eax, [esp + 0x60]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x40]
call fcn.10005aa0
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004cee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
mov eax, dword [0x10089eac]
test al, 1
jne 0x10004b6f
push 0x64
or eax, 1
push 0
push 0x10089e48
mov dword [0x10089eac], eax
call fcn.10043f30
add esp, 0xc
call fcn.10005170
push 0x10072aa0
call fcn.1004245d
add esp, 4
push dword [0x10089e6c]
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x40]
push edi
push 0x1007b804
push eax
call fcn.10004ea0
add esp, 0x10
push dword [esp + 0x3c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10004ba7
mov dword [esp + 0x38], 0xffffffff
jmp 0x10004c51
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x10004bbb
cmp eax, 0xb7
jne 0x10004bdc
push ecx
lea ecx, [edi - 0x10]
mov dword [esp + 0xc], esp
call fcn.10005bd0
mov ecx, esp
add eax, 0x10
mov dword [ecx], eax
call fcn.10004d10
lea ecx, [eax + 4]
call fcn.1000e050
sub esp, 0x18
mov dword [esp + 0x34], 1
mov eax, esp
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 1
lea ecx, [esi - 0x10]
mov dword [esp + 0x30], 0
sub esp, 8
movups xmm0, xmmword [esp + 0x30]
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
movups xmmword [eax], xmm0
mov dword [esp + 0x28], esp
movq xmm0, qword [esp + 0x40]
movq qword [eax + 0x10], xmm0
call fcn.10005bd0
mov ecx, esp
add eax, 0x10
sub esp, 8
mov dword [ecx], eax
call fcn.10004d10
mov ecx, eax
call fcn.100103c0
mov dword [esp + 0x38], 0
mov edx, dword [esp + 0x3c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004c6d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004c87
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x10004ca4
mov edx, dword [esp + 0x48]
call fcn.10005040
push dword [esp + 0x44]
call fcn.10045ec5
add esp, 4
mov edx, dword [esp + 0x40]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004cbf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x10004cd4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x26c]
mov eax, dword [esp + 0x38]
pop edi
pop esi
xor ecx, esp
call fcn.10041e20
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.100013a0
push 0x80004005
call fcn.100013a0
int3