Function at 0x401be0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bef0
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x434090]
xor eax, ebp
mov dword [ebp - 0x2c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push eax
push 0
lea ecx, [ebp - 0x10]
push ecx
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401e8e
cmp dword [ebp - 0x14], 0
jne 0x401c61
mov ecx, dword [ebp + 0x10]
call fcn.00405e40
mov dword [ebp - 0x18], 1
jmp 0x401e8e
mov ecx, dword [ebp - 0x14]
add ecx, 2
push ecx
call fcn.00419b76
add esp, 4
mov dword [ebp - 0x100], eax
mov edx, dword [ebp - 0x100]
push edx
lea ecx, [ebp - 0x20]
call fcn.00408130
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 2
push eax
push 0
lea ecx, [ebp - 0x20]
call fcn.00406040
push eax
call fcn.0041b6f0
add esp, 0xc
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x20]
call fcn.00406040
push eax
lea edx, [ebp - 0x10]
push edx
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401e7f
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x10], 1
jne 0x401cf7
lea ecx, [ebp - 0x20]
call fcn.00406040
push eax
mov ecx, dword [ebp + 0x10]
call fcn.00405dd0
jmp 0x401e7f
cmp dword [ebp - 0x10], 2
jne 0x401dc0
push 0x800
call fcn.00419b76
add esp, 4
mov dword [ebp - 0x104], eax
mov edx, dword [ebp - 0x104]
push edx
lea ecx, [ebp - 0x24]
call fcn.00408130
mov byte [ebp - 4], 1
push 0x400
lea ecx, [ebp - 0x24]
call fcn.00406040
push eax
lea ecx, [ebp - 0x20]
call fcn.00406040
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x400
jbe 0x401d9e
xor ecx, ecx
mov eax, dword [ebp - 0x28]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00419b76
add esp, 4
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x108]
push eax
lea ecx, [ebp - 0x24]
call fcn.00406050
push 0x400
lea ecx, [ebp - 0x24]
call fcn.00406040
push eax
lea ecx, [ebp - 0x20]
call fcn.00406040
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [ebp - 0x24]
call fcn.00406040
push eax
mov ecx, dword [ebp + 0x10]
call fcn.00405dd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x24]
call fcn.00406010
jmp 0x401e7f
cmp dword [ebp - 0x10], 4
jne 0x401e0b
lea ecx, [ebp - 0x20]
call fcn.00406040
mov ecx, dword [eax]
mov dword [ebp - 0x70], ecx
xor edx, edx
mov word [ebp - 0x6c], dx
push 0x3e
push 0
lea eax, [ebp - 0x6a]
push eax
call fcn.0041b6f0
add esp, 0xc
push 0xa
push 0x20
lea ecx, [ebp - 0x6c]
push ecx
mov edx, dword [ebp - 0x70]
push edx
call fcn.0041a52f
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.00405e10
jmp 0x401e7f
cmp dword [ebp - 0x10], 0xb
jne 0x401e78
lea ecx, [ebp - 0x20]
call fcn.00406040
mov ecx, dword [eax]
mov dword [ebp - 0xfc], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0xf8], edx
xor eax, eax
mov word [ebp - 0xf4], ax
push 0x7e
push 0
lea ecx, [ebp - 0xf2]
push ecx
call fcn.0041b6f0
add esp, 0xc
push 0xa
push 0x40
lea edx, [ebp - 0xf4]
push edx
mov eax, dword [ebp - 0xf8]
push eax
mov ecx, dword [ebp - 0xfc]
push ecx
call fcn.0041a684
add esp, 0x14
lea edx, [ebp - 0xf4]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.00405e10
jmp 0x401e7f
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00406010
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x2c]
xor ecx, ebp
call fcn.00419bfc
mov esp, ebp
pop ebp
ret