Function at 0x459e00
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a55bc
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x4c5484]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xf4], 0
mov byte [ebp - 0x1d], 0
lea ecx, [ebp - 0x1c]
call fcn.004025ef
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], 0x4b0a28
mov dword [ebp - 0x10], 0x4b0aa4
mov dword [ebp - 0x24], 0
push 0x2001f
mov eax, dword [ebp - 0x28]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x1c]
call fcn.00402b6c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x45a287
mov dword [ebp - 0x2c], 0x104
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
shl edx, 1
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.0046abb3
add esp, 8
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x24]
push edx
call fcn.004630d0
add esp, 0xc
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402347
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xea
je 0x459e8b
cmp dword [ebp - 0x14], 0
jne 0x45a273
mov ecx, dword [ebp + 8]
call fcn.0040272f
add eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
mov dword [ebp - 0x34], ecx
jns 0x459f28
mov edx, dword [ebp - 0x2c]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x24]
push edx
call fcn.0046abb3
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00402e50
mov byte [ebp - 4], 1
push 0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x94]
push edx
call fcn.00401ec9
add esp, 8
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xfc]
push ecx
lea edx, [ebp - 0x5c]
push edx
lea eax, [ebp - 0x78]
push eax
call fcn.00401ec9
add esp, 8
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0x100]
mov dword [ebp - 0x104], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x104]
call fcn.0040326a
xor edx, edx
cmp eax, dword [0x4ab2d0]
sete dl
mov byte [ebp - 0x3d], dl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x78]
call fcn.00403364
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x94]
call fcn.00403364
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c]
call fcn.00403364
movzx eax, byte [ebp - 0x3d]
test eax, eax
je 0x45a029
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + ecx*2 - 2]
test eax, eax
jne 0x459ff2
mov ecx, dword [ebp - 0x30]
sub ecx, 1
mov dword [ebp - 0x30], ecx
jmp 0x459fd8
mov ecx, dword [ebp + 8]
call fcn.00403841
push eax
push 0x4b0ab0
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
lea ecx, [eax + edx*2]
push ecx
call fcn.00464435
add esp, 0xc
push 2
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401474
mov dword [ebp - 0x14], eax
jmp 0x45a030
mov dword [ebp - 0x14], 0xffffffff
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x24]
push edx
call fcn.004630d0
add esp, 0xc
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x45a273
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp - 0x2c]
jbe 0x45a0af
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
shl edx, 1
push edx
mov eax, dword [ebp - 0x24]
push eax
call fcn.0046abb3
add esp, 8
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x24]
push edx
call fcn.004630d0
add esp, 0xc
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x45a17c
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0xb4]
call fcn.00402e50
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xf4]
or ecx, 1
mov dword [ebp - 0xf4], ecx
push 0
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0xec]
push eax
call fcn.00401ec9
add esp, 8
mov dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 4], 5
mov edx, dword [ebp - 0xf4]
or edx, 2
mov dword [ebp - 0xf4], edx
mov eax, dword [ebp - 0x10c]
push eax
lea ecx, [ebp - 0xb4]
push ecx
lea edx, [ebp - 0xd0]
push edx
call fcn.00401ec9
add esp, 8
mov dword [ebp - 0x110], eax
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x114], eax
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0xf4]
or ecx, 4
mov dword [ebp - 0xf4], ecx
mov ecx, dword [ebp - 0x114]
call fcn.0040326a
cmp eax, dword [0x4ab2d0]
jne 0x45a17c
mov dword [ebp - 0x118], 1
jmp 0x45a186
mov dword [ebp - 0x118], 0
mov dl, byte [ebp - 0x118]
mov byte [ebp - 0x95], dl
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0xf4]
and eax, 4
je 0x45a1b6
and dword [ebp - 0xf4], 0xfffffffb
lea ecx, [ebp - 0xd0]
call fcn.00403364
mov dword [ebp - 4], 4
mov ecx, dword [ebp - 0xf4]
and ecx, 2
je 0x45a1da
and dword [ebp - 0xf4], 0xfffffffd
lea ecx, [ebp - 0xec]
call fcn.00403364
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xf4]
and edx, 1
je 0x45a1fe
and dword [ebp - 0xf4], 0xfffffffe
lea ecx, [ebp - 0xb4]
call fcn.00403364
movzx eax, byte [ebp - 0x95]
test eax, eax
je 0x45a273
mov ecx, dword [ebp + 8]
call fcn.0040272f
add eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
sub ecx, eax
mov dword [ebp - 0x34], ecx
jns 0x45a245
mov edx, dword [ebp - 0x2c]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
shl ecx, 1
push ecx
mov edx, dword [ebp - 0x24]
push edx
call fcn.0046abb3
add esp, 8
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 8]
call fcn.00403841
push eax
push 0x4b0ab8
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + eax*2]
push edx
call fcn.00464435
add esp, 0xc
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edx, dword [ebp - 0x24]
push edx
call fcn.0046314a
add esp, 4
lea ecx, [ebp - 0x1c]
call fcn.00403e8b
cmp dword [ebp - 0x14], 0
jne 0x45a2b6
mov dword [ebp - 0x38], str.Environment
lea eax, [ebp - 0x3c]
push eax
push 0x1388
push 2
mov ecx, dword [ebp - 0x38]
push ecx
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov byte [ebp - 0x1d], 1
mov dl, byte [ebp - 0x1d]
mov byte [ebp - 0xed], dl
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00403eb8
mov al, byte [ebp - 0xed]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret