Function at 0x1067cfe
Capabilities:
Create directory
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x107fa78]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x420], esi
mov dword [ebp - 0x418], 0x80004005
jne 0x1067d3d
mov eax, 0x80004003
jmp 0x1067f74
push ebx
lea eax, [ebp - 0x420]
push eax
xor ebx, ebx
inc ebx
push ebx
push esi
push 0x1009a38
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1067f6d
mov ecx, dword [ebp + 0xc]
mov eax, 0x208
cmp ecx, eax
mov dword [ebp - 0x424], ecx
mov dword [ebp - 0x41c], ebx
jbe 0x1067d80
mov dword [ebp - 0x424], eax
push edi
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
push 0x100e7d8
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, 0x104
jne 0x1067e87
cmp dword [ebp - 0x41c], ebx
je 0x1067dd0
cmp dword [ebp - 0x41c], 2
jne 0x1067e87
cmp dword [ebp - 0x41c], 2
jne 0x1067e0a
push esi
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
je 0x1067e87
lea eax, [ebp - 0x414]
push eax
push 0x103
lea eax, [ebp - 0x20c]
push eax
call fcn.01034c79
lea eax, [ebp - 0x20c]
push eax
call fcn.0105970f
test eax, eax
je 0x1067e5e
and dword [ebp - 0x418], 0
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1067e2a
mov ecx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
shr ecx, 1
inc eax
cmp ecx, eax
jbe 0x1067f4e
lea eax, [ebp - 0x20c]
push eax
push ecx
push dword [ebp - 0x428]
call fcn.01034c79
jmp 0x1067f60
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
push eax
call fcn.0105970f
test eax, eax
jne 0x1067e1a
mov dword [ebp - 0x418], 0x80004005
push esi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x1067f60
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call edi
lea eax, [ebp - 0x20c]
push 0x1007e44
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
xor ebx, ebx
cmp eax, ebx
pop ecx
pop ecx
je 0x1067f60
mov ecx, eax
lea edi, [ecx + 2]
mov dx, word [ecx]
inc ecx
inc ecx
cmp dx, bx
jne 0x1067ed1
sub ecx, edi
sar ecx, 1
cmp ecx, 4
jbe 0x1067f60
mov word [eax + 4], bx
push esi
lea eax, [ebp - 0x414]
push eax
push 0x26fc
push dword [0x1081390]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x1067f60
lea eax, [ebp - 0x414]
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.01034cee
push ebx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
push eax
call fcn.0105970f
test eax, eax
je 0x1067f42
mov dword [ebp - 0x418], ebx
jmp 0x1067e21
mov dword [ebp - 0x418], 0x80004005
jmp 0x1067f60
mov eax, 0x8007007a
push eax
mov dword [ebp - 0x418], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, dword [ebp - 0x418]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.01047417
leave
ret 8