Function at 0x104ae77
Capabilities:
Create directory
Get common file path
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x654
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x620], esi
mov dword [ebp - 0x624], 1
call fcn.0104947b
test eax, eax
jne 0x104aeb2
mov eax, 0x80004005
jmp 0x104b187
push ebx
mov ecx, esi
call fcn.0104947b
xor ebx, ebx
cmp dword [eax + 0xac], ebx
je 0x104aecb
xor eax, eax
jmp 0x104b186
mov ecx, esi
call fcn.0104947b
cmp dword [eax + 0x28], ebx
je 0x104b180
mov ecx, esi
mov edx, 0x1001e8c
call fcn.0104947b
mov eax, dword [eax + 0x28]
mov cx, word [eax]
cmp cx, word [edx]
jne 0x104af10
cmp cx, bx
je 0x104af0c
mov cx, word [eax + 2]
cmp cx, word [edx + 2]
jne 0x104af10
add eax, 4
add edx, 4
cmp cx, bx
jne 0x104aeea
xor eax, eax
jmp 0x104af15
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x104b180
lea eax, [ebp - 0x414]
push eax
push ebx
push ebx
push 0x801c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x104b180
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x654], 0x1006508
mov dword [ebp - 0x650], ebx
mov dword [ebp - 0x640], 0x1006504
mov dword [ebp - 0x63c], ebx
mov dword [ebp - 0x638], ebx
mov dword [ebp - 0x634], ebx
call fcn.0107a032
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push eax
lea ecx, [ebp - 0x654]
call fcn.010736aa
test eax, eax
jl 0x104b16a
mov ecx, esi
call fcn.0104947b
push dword [eax]
call fcn.0104819f
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1006eb8
mov esi, 0x208
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01034db1
add esp, 0x14
test eax, eax
jl 0x104b16a
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push ebx
lea eax, [ebp - 0x20c]
push eax
call edi
mov ecx, dword [ebp - 0x620]
call fcn.0104947b
push dword [eax]
call fcn.0104819f
push dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1006e78
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01034db1
add esp, 0x18
test eax, eax
jl 0x104b169
push ebx
lea eax, [ebp - 0x20c]
push eax
call edi
cmp eax, ebx
jne 0x104b051
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, ebx
jne 0x104b035
push 0x57
pop edi
cmp edi, 0xb7
je 0x104b051
lea eax, [ebp - 0x20c]
push eax
call fcn.0105970f
test eax, eax
je 0x104b152
push 0x1006e54
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034d30
test eax, eax
jl 0x104b169
mov edi, dword [ebp - 0x620]
mov ecx, edi
call fcn.0104947b
mov eax, dword [eax + 0x28]
lea ecx, [ebp - 0x20c]
push ecx
push eax
mov ecx, edi
call fcn.0104aaba
cmp eax, ebx
mov dword [ebp - 0x624], eax
jl 0x104b140
mov ecx, edi
call fcn.0104947b
push dword [eax]
call fcn.0104819f
push eax
push 0x1006dd8
lea eax, [ebp - 0x61c]
push esi
push eax
call fcn.01034db1
add esp, 0x10
test eax, eax
jl 0x104b12d
push ebx
lea eax, [ebp - 0x620]
push eax
push ebx
push 2
push ebx
push ebx
push ebx
lea eax, [ebp - 0x61c]
push eax
push SysReAllocString
mov dword [ebp - 0x620], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x104b12d
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x104b0f3
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push ebx
push 0x1006dc0
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, edi
call fcn.0104947b
mov dword [eax + 0xac], 1
jmp 0x104b169
push eax
push 0x1006d94
push 2
call fcn.0105e5ad
add esp, 0xc
jmp 0x104b169
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x1006d40
push 2
call fcn.0105e5ad
add esp, 0x10
pop edi
lea ecx, [ebp - 0x630]
call fcn.0107a784
lea ecx, [ebp - 0x654]
call fcn.01048bef
mov eax, dword [ebp - 0x624]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01047417
leave
ret