Function at 0x46d580
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x66b960
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x718924]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push 0xe
push str._k_Scenario_t_
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
call fcn.0044e920
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0046d020
mov edi, eax
add esp, 8
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x46d686
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x46d63c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d632
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d904
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov dword [ebp - 0x18], 0
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x14], 7
mov eax, dword [edi]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x46d6c0
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d6b6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d904
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov ecx, dword [ebp - 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test ecx, ecx
jne 0x46d6e8
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x46d6d7
mov ecx, dword [esi]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push ecx
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
jmp 0x46d700
lea eax, [ebp - 0x28]
cmp esi, eax
je 0x46d700
cmp dword [ebp - 0x14], 8
push ecx
cmovae eax, dword [ebp - 0x28]
mov ecx, esi
push eax
call fcn.0044e920
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x46d70a
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x40]
push eax
call fcn.0044e7a0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0046d020
mov edi, eax
add esp, 8
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x46d7b7
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x46d76d
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d763
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d909
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov dword [ebp - 0x18], 0
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x14], 7
mov eax, dword [edi]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x46d7f1
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d7e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d909
push edx
push ecx
call fcn.004cb4db
add esp, 8
cmp dword [esi + 0x2c], 8
lea edi, [esi + 0x18]
mov eax, edi
jb 0x46d7fe
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.0044e7a0
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x40]
cmovae ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 8
push ecx
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
cmp dword [edi + 0x14], 8
jb 0x46d82c
mov edi, dword [edi]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46d831
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x40]
call fcn.0044e7a0
add esi, 0x30
cmp dword [esi + 0x14], 8
jb 0x46d855
mov esi, dword [esi]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push esi
cmovae eax, dword [ebp - 0x40]
push eax
call ebx
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x46d89e
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d894
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d90e
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp edx, 8
jb 0x46d8e8
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46d8de
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46d90e
push edx
push ecx
call fcn.004cb4db
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cb998
mov esp, ebp
pop ebp
ret
call fcn.004e6589
call fcn.004e6589
call fcn.004e6589
int3