Function at 0x10004a10
Capabilities:
Check if file exists
Get common file path
Print debug messages
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x488
mov eax, dword [0x10089040]
xor eax, esp
mov dword [esp + 0x484], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x14], eax
call fcn.10004310
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004fed
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x4c]
push 0x1007d468
mov dword [esp + 0x50], eax
call fcn.10005aa0
test al, al
jne 0x10004a7a
push 0
push 0x1007d468
lea ecx, [esp + 0x54]
call fcn.10005d10
push ecx
xorps xmm0, xmm0
lea ecx, [esp + 0x54]
push esi
movaps xmmword [esp + 0x58], xmm0
movq qword [esp + 0x68], xmm0
call fcn.10007780
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004fed
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x48]
push str._pid
mov dword [esp + 0x4c], eax
call fcn.10005aa0
test al, al
jne 0x10004ad2
push 4
push str._pid
lea ecx, [esp + 0x50]
call fcn.10005d10
mov edi, dword [esp + 0x48]
push ecx
add edi, 0xfffffff0
mov esi, esp
mov ecx, edi
call fcn.10005e40
add eax, 0x10
lea ecx, [esp + 0x54]
mov dword [esi], eax
call fcn.10008700
or esi, 0xffffffff
mov dword [esp + 0x48], eax
mov ecx, esi
lock xadd dword [edi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x10004b10
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x48]
cmp eax, 0xffffffff
je 0x10004be5
push ecx
mov edi, esp
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004fed
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov ecx, edi
push str._pid
mov dword [edi], eax
call fcn.10005aa0
test al, al
jne 0x10004b55
push 4
push str._pid
mov ecx, edi
call fcn.10005d10
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x58]
call fcn.10008870
mov edi, dword [esp + 0x4c]
mov edx, dword [eax]
lea ecx, [edi - 0x10]
mov dword [esp + 0x1c], ecx
lea eax, [edx - 0x10]
mov dword [esp + 0x48], eax
cmp eax, ecx
je 0x10004bc8
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x10004bb7
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x10004bb7
mov ecx, dword [esp + 0x48]
call fcn.10005e40
mov dword [esp + 0x48], eax
mov ecx, esi
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x10004bb2
mov edi, dword [esp + 0x1c]
push edi
mov ecx, dword [edi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x48]
lea edi, [eax + 0x10]
jmp 0x10004bc8
push dword [edx - 0xc]
lea ecx, [esp + 0x50]
push edx
call fcn.10005d10
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x18]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004be9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10004be9
mov edi, dword [esp + 0x4c]
mov eax, dword [0x1008beb0]
test al, 1
jne 0x10004c1d
push 0x68
or eax, 1
push 0
push 0x1008be48
mov dword [0x1008beb0], eax
call fcn.10045390
add esp, 0xc
call fcn.10005f50
push 0x10074980
call fcn.100438b2
add esp, 4
mov eax, dword [0x1008be54]
push 0x208
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x7c]
push 0
push eax
call fcn.10045390
add esp, 0xc
lea eax, [esp + 0x78]
push 1
push 0x1c
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10004c5f
push eax
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004ff7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
lea ecx, [esp + 0x4c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x78]
push eax
call fcn.10005aa0
test al, al
jne 0x10004cb3
lea ecx, [esp + 0x78]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004c95
sub ecx, edx
lea eax, [esp + 0x78]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x54]
call fcn.10005d10
mov eax, dword [0x1008beb0]
test al, 1
jne 0x10004ce7
push 0x68
or eax, 1
push 0
push 0x1008be48
mov dword [0x1008beb0], eax
call fcn.10045390
add esp, 0xc
call fcn.10005f50
push 0x10074980
call fcn.100438b2
add esp, 4
push 0x1008be6c
push 0x1007de78
lea edx, [esp + 0x54]
lea ecx, [esp + 0x24]
call fcn.100051c0
add esp, 4
lea ecx, [esp + 0x1c]
mov edx, eax
call fcn.10005290
add esp, 4
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edx, dword [esp + 0x18]
mov ecx, esi
mov dword [esp + 0x48], eax
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x10004d36
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esp + 0x1c]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004d51
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esp + 0x48], 0
je 0x10004d70
push str._DEBUG__Extend_Is_Installed._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [esp + 0x14], 0xffffffff
jmp 0x10004f6b
mov esi, dword [esp + 0x4c]
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x10004d88
cmp eax, 0xb7
jne 0x10004da9
push ecx
lea ecx, [esi - 0x10]
mov dword [esp + 0x1c], esp
call fcn.10005e40
mov ecx, esp
add eax, 0x10
mov dword [ecx], eax
call fcn.10005010
lea ecx, [eax + 4]
call fcn.100108a0
movaps xmm0, xmmword [0x10080260]
lea ecx, [edi - 0x10]
sub esp, 0x20
mov dword [esp + 0x54], 1
mov eax, esp
mov dword [esp + 0x50], 0
mov dword [esp + 0x58], 0
sub esp, 8
mov dword [esp + 0x64], 0
mov esi, esp
movups xmmword [eax], xmm0
movups xmm0, xmmword [esp + 0x58]
movups xmmword [eax + 0x10], xmm0
call fcn.10005e40
sub esp, 8
add eax, 0x10
mov dword [esi], eax
call fcn.10005010
mov ecx, eax
call fcn.10012c20
cmp dword [esp + 0x14], 0
mov esi, eax
je 0x10004e72
cmp dword [ebp + 0x10], 0
jle 0x10004e72
call fcn.10003fc0
mov ecx, eax
test ecx, ecx
je 0x10004fed
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
push esi
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x4c]
push 0x1007de70
push eax
call fcn.10005430
mov esi, dword [esp + 0x54]
add esp, 0xc
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
push dword [ebp + 0x10]
push dword [esp + 0x20]
call fcn.10047419
add esp, 0x10
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10004e72
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [esp + 0x284]
push 0
push eax
call fcn.10045390
add esp, 0xc
lea eax, [esp + 0x280]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [0x1008beb0]
test al, 1
jne 0x10004ed2
push 0x68
or eax, 1
push 0
push 0x1008be48
mov dword [0x1008beb0], eax
call fcn.10045390
add esp, 0xc
call fcn.10005f50
push 0x10074980
call fcn.100438b2
add esp, 4
mov edx, dword [0x1008be68]
lea esi, [esp + 0x280]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10004ee2
sub esi, ecx
mov ecx, SysReAllocString
sar esi, 1
mov dword [esp + 0x14], ecx
test edx, edx
je 0x10004f2e
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x10004f60
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x14], ecx
lea eax, [esi*2 + 2]
push eax
lea eax, [esp + 0x284]
push eax
push 1
push 0
push str.Host
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [esp + 0x14]
cmp eax, 0x80000001
je 0x10004f60
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x14], 0
or esi, 0xffffffff
mov edx, dword [esp + 0x4c]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004f86
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x10004fa3
mov edx, dword [esp + 0x58]
call fcn.100055d0
push dword [esp + 0x54]
call fcn.10047325
add esp, 4
mov edx, dword [esp + 0x50]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004fbe
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x10004fd3
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x48c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
xor ecx, esp
call fcn.10043277
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.100013a0
push 0x80004005
call fcn.100013a0
int3