Function at 0x4098b1
Capabilities:
Query environment variable
Query or enumerate registry key

Disassembly:
push 0x284
mov eax, 0x4469e7
call fcn.00424e5c
mov edi, ecx
mov dword [ebp - 0x260], edi
cmp dword [0x4659f4], 8
lea ecx, [ebp - 0x254]
mov esi, dword [ebp + 8]
mov eax, 0x4659e0
cmovae eax, dword [0x4659e0]
mov ebx, dword [ebp + 0xc]
push ecx
push 0x20119
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
js 0x409bfb
xor ecx, ecx
lea eax, [ebp - 0x250]
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], ecx
push eax
push ecx
push ecx
push ecx
push dword [ebp - 0x254]
mov dword [ebp - 0x250], ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
test ecx, ecx
js 0x409bef
and dword [ebp - 0x268], 0
lea ecx, [ebp - 0x278]
xor eax, eax
mov dword [ebp - 0x264], 7
push str.MainAccount
mov word [ebp - 0x278], ax
call fcn.004029c9
and dword [ebp - 4], 0
lea ecx, [ebp - 0x290]
and dword [ebp - 0x280], 0
xor eax, eax
push str.SoftwareMicrosoftOneDrive
mov dword [ebp - 0x27c], 7
mov word [ebp - 0x290], ax
call fcn.004029c9
lea eax, [edi + 0x1c]
mov byte [ebp - 4], 1
push eax
push 0
lea eax, [ebp - 0x278]
mov ecx, esi
push eax
lea edx, [ebp - 0x290]
call fcn.00415ac5
lea ecx, [ebp - 0x290]
call fcn.00403265
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x278]
call fcn.00403265
mov ecx, dword [ebp - 0x250]
inc ecx
xor esi, esi
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x25c], esi
cmp esi, dword [ebp - 0x21c]
jae 0x409bef
xor eax, eax
lea edi, [ebp - 0x234]
stosd dword es:[edi], eax
push ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov word [ebp - 0x256], ax
lea eax, [ebp - 0x256]
push eax
push ecx
lea ecx, [ebp - 0x234]
call fcn.0040d1f3
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x228], eax
xor eax, eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x228]
push eax
push dword [ebp - 0x234]
push esi
push dword [ebp - 0x254]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov dword [ebp - 0x258], edi
test edi, edi
js 0x409bca
push dword [ebp - 0x234]
lea ecx, [ebp - 0x24c]
call fcn.004028e6
mov edx, str.Tenants
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x24c]
call fcn.00402eef
test al, al
je 0x409ae8
cmp dword [ebp - 0x238], 8
lea eax, [ebp - 0x24c]
lea ecx, [ebp - 0x278]
cmovae eax, dword [ebp - 0x24c]
push eax
call fcn.004028e6
mov ecx, dword [ebp - 0x254]
lea edx, [ebp - 0x278]
push 0
call fcn.00415db9
lea ecx, [ebp - 0x278]
call fcn.00403265
jmp 0x409bbf
xorps xmm0, xmm0
movlpd qword [ebp - 0x224], xmm0
and dword [ebp - 0x224], 0
and dword [ebp - 0x220], 0
mov ecx, dword [ebp - 0x260]
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x24c]
mov byte [ebp - 4], 4
push eax
push dword [ebp - 0x254]
call fcn.00409c03
cmp byte [ebp + 0x10], 0
mov edi, dword [ebp - 0x224]
je 0x409b85
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00426720
lea esi, [edi + 0x30]
add esp, 0xc
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x409b53
mov eax, dword [esi]
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x409b7f
cmp eax, 0x104
ja 0x409b7f
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.004029c9
mov esi, dword [ebp - 0x25c]
mov eax, dword [ebx + 4]
push edi
cmp dword [ebx + 8], eax
je 0x409b9e
mov ecx, eax
call fcn.0040e19f
add dword [ebx + 4], 0x1a0
jmp 0x409ba6
push eax
mov ecx, ebx
call fcn.0040de30
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x220]
test ecx, ecx
je 0x409bb9
call fcn.004030f2
mov edi, dword [ebp - 0x258]
lea ecx, [ebp - 0x24c]
call fcn.00403265
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call fcn.0040d619
inc esi
mov dword [ebp - 0x25c], esi
test edi, edi
js 0x409bef
mov ecx, dword [ebp - 0x250]
jmp 0x4099f9
push dword [ebp - 0x254]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00424e06
ret 0xc