Function at 0x484d80
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x498ebb
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x4be4bc]
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 ebx, ecx
mov dword [ebp - 0x90], ebx
cmp dword [ebx + 0x10], 0
je 0x485451
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
push ebx
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 1
push str._k_Scenario_t_
push eax
call fcn.004090e0
add esp, 0xc
cmp dword [ebx + 0x2c], 8
lea edi, [ebx + 0x18]
mov byte [ebp - 4], 2
mov ecx, edi
jb 0x484e0c
mov ecx, dword [edi]
push dword [edi + 0x10]
push ecx
mov ecx, eax
call fcn.00402410
xor edx, edx
mov ecx, dword [eax + 4]
mov esi, dword [eax]
mov dword [ebp - 0x9c], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0xa0], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x94], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x8c], ecx
mov ecx, dword [eax + 0x14]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], dx
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x98], ecx
cmp edx, 8
jb 0x484e95
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x484e85
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x484eef
push edx
push ecx
call fcn.0048c947
mov ecx, dword [ebp - 0x98]
add esp, 8
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x484f05
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x484ef5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x484ef5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c947
mov ecx, dword [ebp - 0x14]
add esp, 8
mov esi, dword [ebp - 0x28]
cmp ecx, 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
lea eax, [ebp - 0x58]
push str._k_Scenario_t_
push eax
call fcn.004090e0
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x484fba
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x484f70
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x484f66
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x484fe6
push edx
push ecx
call fcn.0048c947
add esp, 8
mov dword [ebp - 0x18], 0
xor eax, eax
mov word [ebp - 0x28], ax
mov dword [ebp - 0x14], 7
mov eax, dword [esi]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x484ff6
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x484fec
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x484fec
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c947
add esp, 8
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0044ce60
mov esi, eax
add esp, 8
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x485097
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x48504d
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485043
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4850c3
push edx
push ecx
call fcn.0048c947
add esp, 8
mov dword [ebp - 0x30], 0
xor eax, eax
mov word [ebp - 0x40], ax
mov dword [ebp - 0x2c], 7
mov eax, dword [esi]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x4850d3
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4850c9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4850c9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c947
add esp, 8
mov ebx, dword [ebp - 0x30]
test ebx, ebx
je 0x48512e
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x4850e4
mov ecx, dword [edi]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
mov edx, dword [edi + 0x10]
mov esi, dword [ebp - 0x40]
cmovae eax, esi
mov dword [ebp - 0x94], edx
cmp ebx, edx
mov edx, dword [ebp - 0x2c]
jne 0x4851ee
mov edx, ebx
test edx, edx
je 0x48512e
sub eax, ecx
mov dword [ebp - 0x8c], eax
mov ax, word [eax + ecx]
cmp ax, word [ecx]
jne 0x4851eb
mov eax, dword [ebp - 0x8c]
add ecx, 2
sub edx, 1
jne 0x485113
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmovae eax, dword [ebp - 0x28]
push 0
push eax
call esi
push 0xe
push str._k_Scenario_t_
lea ecx, [ebp - 0x28]
call fcn.00402680
push 0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call esi
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x485199
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x48518f
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4851e5
push ecx
push esi
call fcn.0048c947
add esp, 8
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
cmp edx, 8
jb 0x485451
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485447
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485447
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov edx, dword [ebp - 0x2c]
cmp dword [edi + 0x14], 8
jb 0x4851f6
mov edi, dword [edi]
push dword [ebp - 0x94]
cmp edx, 8
lea eax, [ebp - 0x40]
push edi
push 0
cmovae eax, esi
push ebx
push eax
call fcn.004034f0
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x8c], edi
cmp edi, 0xffffffff
je 0x485166
mov ecx, dword [ebp - 0x90]
xor eax, eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov ecx, dword [ecx + 0x28]
add ecx, edi
cmp ebx, ecx
jb 0x48546d
sub ebx, ecx
lea eax, [ebp - 0x40]
mov dword [ebp - 0x90], ebx
or ebx, 0xffffffff
cmp dword [ebp - 0x90], 0xffffffff
cmovb ebx, dword [ebp - 0x90]
cmp dword [ebp - 0x2c], 8
cmovae eax, esi
lea eax, [eax + ecx*2]
mov dword [ebp - 0x90], eax
cmp ebx, 7
ja 0x485298
lea esi, [ebx + ebx]
mov dword [ebp - 0x60], ebx
push esi
push eax
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x70], ax
jmp 0x4852f8
cmp ebx, 0x7ffffffe
ja 0x485472
mov esi, ebx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x4852b8
mov esi, 0x7ffffffe
jmp 0x4852c2
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x70]
call fcn.004023b0
mov dword [ebp - 0x5c], esi
mov edi, eax
lea esi, [ebx + ebx]
mov dword [ebp - 0x60], ebx
push esi
push dword [ebp - 0x90]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [edi + esi], ax
mov dword [ebp - 0x70], edi
mov edi, dword [ebp - 0x8c]
xor eax, eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x30], edi
lea ecx, [ebp - 0x88]
mov word [ebp - 0x88], ax
lea eax, [ebp - 0x40]
cmovb edi, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], 8
push edi
cmovae eax, dword [ebp - 0x40]
push eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 7
call fcn.00402680
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00417cc0
add esp, 0xc
lea ecx, [ebp - 0x40]
push eax
call fcn.004037e0
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x485390
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485386
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x485420
push edx
push ecx
call fcn.0048c947
add esp, 8
mov edx, dword [ebp - 0x74]
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
cmp edx, 8
jb 0x4853dd
mov ecx, dword [ebp - 0x88]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4853d3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x485420
push edx
push ecx
call fcn.0048c947
add esp, 8
mov edx, dword [ebp - 0x5c]
xor eax, eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 7
mov word [ebp - 0x88], ax
cmp edx, 8
jb 0x485430
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x485426
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x485426
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c947
add esp, 8
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmovae ecx, dword [ebp - 0x40]
push ecx
jmp 0x485155
push edx
push ecx
call fcn.0048c947
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.0048cbb4
mov esp, ebp
pop ebp
ret
call fcn.004049d0
call fcn.00402330
int3