Function at 0x4887e0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4993c0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x4be4b0]
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.004045a0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0040cfe0
mov edi, eax
add esp, 8
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x4888e6
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x48889c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x488892
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x488912
push edx
push ecx
call fcn.0048c837
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 0x488922
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x488918
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x488918
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c837
add esp, 8
mov ecx, dword [ebp - 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test ecx, ecx
jne 0x48894a
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x488939
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 0x488962
lea eax, [ebp - 0x28]
cmp esi, eax
je 0x488962
cmp dword [ebp - 0x14], 8
push ecx
cmovae eax, dword [ebp - 0x28]
mov ecx, esi
push eax
call fcn.004045a0
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x48896c
mov eax, dword [esi]
push dword [esi + 0x10]
lea ecx, [ebp - 0x40]
push eax
call fcn.00401cf0
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0040cfe0
mov edi, eax
add esp, 8
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x488a19
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4889cf
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4889c5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x488a45
push edx
push ecx
call fcn.0048c837
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 0x488a55
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x488a4b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x488a4b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c837
add esp, 8
cmp dword [esi + 0x2c], 8
lea edi, [esi + 0x18]
mov eax, edi
jb 0x488a62
mov eax, dword [edi]
push dword [edi + 0x10]
lea ecx, [ebp - 0x28]
push eax
call fcn.00401cf0
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 0x488a90
mov edi, dword [edi]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x488a95
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x40]
call fcn.00401cf0
add esi, 0x30
cmp dword [esi + 0x14], 8
jb 0x488ab9
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 0x488afe
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x488af4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x488b3e
push edx
push ecx
call fcn.0048c837
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 0x488b4e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x488b44
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x488b44
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c837
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.0048c845
mov esp, ebp
pop ebp
ret