Function at 0x104aa22
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 [0x1072c48]
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.01048fa3
test eax, eax
jne 0x104aa5d
mov eax, 0x80004005
jmp 0x104ad32
push ebx
mov ecx, esi
call fcn.01048fa3
xor ebx, ebx
cmp dword [eax + 0xac], ebx
je 0x104aa76
xor eax, eax
jmp 0x104ad31
mov ecx, esi
call fcn.01048fa3
cmp dword [eax + 0x28], ebx
je 0x104ad2b
mov ecx, esi
mov edx, 0x1001e44
call fcn.01048fa3
mov eax, dword [eax + 0x28]
mov cx, word [eax]
cmp cx, word [edx]
jne 0x104aabb
cmp cx, bx
je 0x104aab7
mov cx, word [eax + 2]
cmp cx, word [edx + 2]
jne 0x104aabb
add eax, 4
add edx, 4
cmp cx, bx
jne 0x104aa95
xor eax, eax
jmp 0x104aac0
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x104ad2b
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 0x104ad2b
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x654], 0x10063bc
mov dword [ebp - 0x650], ebx
mov dword [ebp - 0x640], 0x1013cec
mov dword [ebp - 0x63c], ebx
mov dword [ebp - 0x638], ebx
mov dword [ebp - 0x634], ebx
call fcn.0106d6aa
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
push eax
lea ecx, [ebp - 0x654]
call fcn.0106667e
test eax, eax
jl 0x104ad15
mov ecx, esi
call fcn.01048fa3
push dword [eax]
call fcn.01047cd3
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1006dd8
mov esi, 0x208
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01035968
add esp, 0x14
test eax, eax
jl 0x104ad15
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.01048fa3
push dword [eax]
call fcn.01047cd3
push dword [ebp - 0x630]
push eax
lea eax, [ebp - 0x414]
push eax
push 0x1006d98
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.01035968
add esp, 0x18
test eax, eax
jl 0x104ad14
push ebx
lea eax, [ebp - 0x20c]
push eax
call edi
cmp eax, ebx
jne 0x104abfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, ebx
jne 0x104abe0
push 0x57
pop edi
cmp edi, 0xb7
je 0x104abfc
lea eax, [ebp - 0x20c]
push eax
call fcn.010587e2
test eax, eax
je 0x104acfd
push 0x1006d74
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.010358e7
test eax, eax
jl 0x104ad14
mov edi, dword [ebp - 0x620]
mov ecx, edi
call fcn.01048fa3
mov eax, dword [eax + 0x28]
lea ecx, [ebp - 0x20c]
push ecx
push eax
mov ecx, edi
call fcn.0104a665
cmp eax, ebx
mov dword [ebp - 0x624], eax
jl 0x104aceb
mov ecx, edi
call fcn.01048fa3
push dword [eax]
call fcn.01047cd3
push eax
push 0x1006cf8
lea eax, [ebp - 0x61c]
push esi
push eax
call fcn.01035968
add esp, 0x10
test eax, eax
jl 0x104acd8
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 0x80000001
mov dword [ebp - 0x620], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x104acd8
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x104ac9e
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push ebx
push 0x1006ce0
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.01048fa3
mov dword [eax + 0xac], 1
jmp 0x104ad14
push eax
push 0x1006cb4
push 2
call fcn.01055c8a
add esp, 0xc
jmp 0x104ad14
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x1006c60
push 2
call fcn.01055c8a
add esp, 0x10
pop edi
lea ecx, [ebp - 0x630]
call fcn.0106de2a
lea ecx, [ebp - 0x654]
call fcn.01048714
mov eax, dword [ebp - 0x624]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01047480
leave
ret