Function at 0x43529c
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa40
mov eax, dword [0x4424f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0xa38]
mov dword [ebp - 0xa34], ecx
push eax
xor ecx, ecx
mov edi, edx
push 1
push ecx
push 0x4044b8
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xa3c], ecx
mov esi, 0x80004005
mov dword [ebp - 0xa38], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x435638
xor esi, esi
mov dword [ebp - 0xa40], edi
inc esi
mov eax, 0x208
mov dword [ebp - 0xa30], esi
cmp edi, eax
jbe 0x43530f
mov dword [ebp - 0xa40], eax
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0xa30]
push eax
xor eax, eax
push eax
push 0x409874
push dword [ebp - 0xa38]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x435482
cmp dword [ebp - 0xa30], esi
je 0x435355
cmp dword [ebp - 0xa30], 2
jne 0x435482
cmp dword [ebp - 0xa30], 2
jne 0x435396
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x435482
lea eax, [ebp - 0x414]
mov edx, 0x103
push eax
lea ecx, [ebp - 0x20c]
call fcn.0040c040
lea eax, [ebp - 0x20c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x61c]
call fcn.0040c040
xor esi, esi
test eax, eax
js 0x435406
push 0x5c
pop ebx
lea ecx, [ebp - 0x61c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4353bf
sub ecx, edx
sar ecx, 1
je 0x4353e6
cmp word [ebp + ecx*2 - 0x61e], bx
jne 0x4353e6
xor eax, eax
mov word [ebp + ecx*2 - 0x61e], ax
jmp 0x4353b6
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [ebp - 0xa34]
cmp eax, 0xffffffff
je 0x435406
test al, 0x10
jne 0x4355e6
push esi
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x824]
call fcn.0040c040
test eax, eax
js 0x435482
push 0x5c
pop ebx
lea ecx, [ebp - 0x824]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x43543b
sub ecx, edx
sar ecx, 1
je 0x435462
cmp word [ebp + ecx*2 - 0x826], bx
jne 0x435462
xor eax, eax
mov word [ebp + ecx*2 - 0x826], ax
jmp 0x435432
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [ebp - 0xa34]
cmp eax, 0xffffffff
je 0x435482
test al, 0x10
jne 0x4355e6
push 0x104
lea eax, [ebp - 0x414]
mov esi, 0x80004005
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x43562c
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x20c]
push 0x4043e8
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
mov edx, eax
pop ecx
pop ecx
test edx, edx
je 0x43562c
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xa3c]
jne 0x4354dd
sub ecx, esi
mov esi, 0x80004005
sar ecx, 1
cmp ecx, 4
jbe 0x43562c
xor eax, eax
push 0x104
mov word [edx + 4], ax
lea eax, [ebp - 0x414]
push eax
push 0x26fc
push dword [0x442af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x43562c
push ecx
lea eax, [ebp - 0xa3c]
mov esi, 0x104
push eax
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.0040c15d
test eax, eax
js 0x435568
push ecx
lea eax, [ebp - 0x414]
mov edx, esi
push eax
mov eax, dword [ebp - 0xa3c]
sub edx, eax
push ecx
lea ecx, [ebp - 0x20c]
lea ecx, [ecx + eax*2]
call fcn.0040c1c3
xor esi, esi
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x20c]
mov edx, 0x104
push eax
lea ecx, [ebp - 0xa2c]
call fcn.0040c040
test eax, eax
js 0x435627
push 0x5c
pop ebx
lea ecx, [ebp - 0xa2c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4355a3
sub ecx, edx
sar ecx, 1
je 0x4355ca
cmp word [ebp + ecx*2 - 0xa2e], bx
jne 0x4355ca
xor eax, eax
mov word [ebp + ecx*2 - 0xa2e], ax
jmp 0x43559a
lea eax, [ebp - 0xa2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, dword [ebp - 0xa34]
cmp eax, 0xffffffff
je 0x435627
test al, 0x10
je 0x435627
lea edx, [ebp - 0x20c]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, si
jne 0x4355ef
sub edx, ecx
shr edi, 1
sar edx, 1
lea eax, [edx + 1]
cmp edi, eax
jbe 0x435619
lea eax, [ebp - 0x20c]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040c040
jmp 0x43562c
mov esi, 0x8007007a
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x43562c
mov esi, 0x80004005
push dword [ebp - 0xa38]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00441130
leave