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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x446a0c]
xor eax, dword [ebp + 4]
and dword [ebp - 0x10], 0
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push edi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
xor edi, edi
inc edi
push edi
push 0
push 0x403644
push 0x80000002
mov dword [ebp - 0xc], 0x80004005
call esi
mov ebx, eax
test ebx, ebx
jne 0x433757
lea eax, [ebp - 0x18]
push eax
push edi
push ebx
push 0x4337c0
push dword [ebp - 0x10]
call esi
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
jne 0x4335ee
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x4337b8
push dword [ebp - 0x18]
mov dword [ebp - 8], 0x104
call esi
mov ebx, eax
test ebx, ebx
jne 0x4335e1
cmp dword [ebp - 0x14], edi
jne 0x4335de
cmp dword [ebp - 8], 2
jae 0x4335e1
push 0xd
pop ebx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x43362d
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x4337ac
push dword [ebp - 0x10]
mov dword [ebp - 8], 0x104
call esi
mov ebx, eax
test ebx, ebx
jne 0x433745
cmp dword [ebp - 0x14], edi
jne 0x433625
cmp dword [ebp - 8], 2
jae 0x43362d
push 0xd
pop ebx
jmp 0x433745
xor eax, eax
mov cl, byte [ebp + eax - 0x120]
mov byte [ebp + eax - 0x42c], cl
inc eax
test cl, cl
jne 0x43362f
lea eax, [ebp - 0x42c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x43364b
sub eax, edx
lea edi, [ebp - 0x42c]
dec edi
cmp byte [ebp + eax - 0x42d], 0x5c
jne 0x433678
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x433665
mov esi, 0x4337a4
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x433687
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x433678
mov esi, 0x43379c
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x43373d
and byte [ebp - 0x224], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
xor eax, eax
mov cl, byte [ebp + eax - 0x120]
mov byte [ebp + eax - 0x634], cl
inc eax
test cl, cl
jne 0x4336c8
lea edi, [ebp - 0x634]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4336e2
mov esi, 0x433798
lea eax, [ebp - 0x224]
movsw word es:[edi], word [esi]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4336f9
lea edi, [ebp - 0x634]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x433709
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x634]
push eax
and ecx, 3
push 0x433790
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
je 0x43373d
and dword [ebp - 0xc], 0
jmp 0x433745
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xc], 0x80004005
jne 0x43377a
test ebx, ebx
mov edx, 0xffff
mov ecx, 0x80070000
mov eax, ebx
jle 0x43376b
and eax, edx
or eax, ecx
test eax, eax
jge 0x43377a
test ebx, ebx
jle 0x433777
and ebx, edx
or ebx, ecx
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
call fcn.004037c0
leave
ret