Function at 0x493b40
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a6ea0
mov eax, dword fs:[0]
push eax
sub esp, 0x90
mov eax, dword [0x4ce4bc]
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 - 0x9c], ebx
cmp dword [ebx + 0x10], 0
je 0x494208
xor eax, eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push ebx
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 1
push str._k_Scenario_t_
push eax
call fcn.00407df0
add esp, 0xc
add ebx, 0x18
mov byte [ebp - 4], 2
mov ecx, ebx
cmp dword [ebx + 0x14], 8
jb 0x493bd6
mov ecx, dword [ebx]
push dword [ebx + 0x10]
push ecx
mov ecx, eax
call fcn.00401cd0
mov edx, dword [eax + 8]
mov ecx, dword [eax + 4]
mov esi, dword [eax]
mov edi, dword [eax + 0x14]
mov dword [ebp - 0x8c], edx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x98], edx
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x94], edx
xor edx, edx
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], dx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x90], ecx
cmp edx, 8
jb 0x493c59
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493c49
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x493cad
push edx
push ecx
call fcn.0049927f
mov ecx, dword [ebp - 0x90]
add esp, 8
mov eax, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edi
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x493cc3
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493cb3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x493cb3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049927f
mov edi, dword [ebp - 0x2c]
add esp, 8
mov esi, dword [ebp - 0x40]
cmp edi, 8
lea eax, [ebp - 0x40]
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmovae eax, esi
push 0
push eax
call edi
push dword [ebp - 0x9c]
lea eax, [ebp - 0x70]
push str._k_Scenario_t_
push eax
call fcn.00407df0
mov esi, eax
add esp, 0xc
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x493d7f
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x493d35
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493d2b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x493dab
push edx
push ecx
call fcn.0049927f
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 - 0x5c]
cmp edx, 8
jb 0x493dbb
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493db1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x493db1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049927f
add esp, 8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.0040cbc0
mov esi, eax
add esp, 8
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x493e5c
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x493e12
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493e08
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x493e88
push edx
push ecx
call fcn.0049927f
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 - 0x5c]
cmp edx, 8
jb 0x493e98
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x493e8e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x493e8e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049927f
add esp, 8
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x494153
cmp dword [ebx + 0x14], 8
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x90], eax
mov eax, ebx
jb 0x493eb6
mov eax, dword [ebx]
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
cmp edx, 8
cmovae ecx, edi
mov dword [ebp - 0x8c], ecx
cmp esi, dword [ebp - 0x90]
jne 0x493f0e
movzx ecx, word [ecx]
movzx edx, word [eax]
cmp cx, dx
jb 0x493f08
sub dword [ebp - 0x8c], eax
cmp cx, dx
ja 0x493f08
cmp esi, 1
je 0x49414d
mov ecx, dword [ebp - 0x8c]
add eax, 2
dec esi
movzx ecx, word [eax + ecx]
movzx edx, word [eax]
cmp cx, dx
jae 0x493ee7
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
cmp dword [ebx + 0x14], 8
jb 0x493f16
mov ebx, dword [ebx]
push dword [ebp - 0x90]
cmp edx, 8
lea eax, [ebp - 0x28]
push ebx
push 0
cmovae eax, edi
push esi
push eax
call fcn.00405110
add esp, 0x14
mov dword [ebp - 0x98], eax
cmp eax, 0xffffffff
je 0x494185
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov ecx, dword [ecx + 0x28]
add ecx, eax
xor eax, eax
mov word [ebp - 0x58], ax
cmp esi, ecx
jb 0x494224
sub esi, ecx
lea eax, [ebp - 0x28]
or ebx, 0xffffffff
cmp esi, 0xffffffff
cmovb ebx, esi
cmp dword [ebp - 0x14], 8
cmovae eax, edi
lea eax, [eax + ecx*2]
mov dword [ebp - 0x94], eax
cmp ebx, 7
ja 0x493faf
lea esi, [ebx + ebx]
mov dword [ebp - 0x48], ebx
push esi
push eax
lea eax, [ebp - 0x58]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x58], ax
jmp 0x494009
cmp ebx, 0x7ffffffe
ja 0x494229
mov esi, ebx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x493fcf
mov esi, 0x7ffffffe
jmp 0x493fd9
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x58]
call fcn.00401c70
mov dword [ebp - 0x44], esi
mov edi, eax
lea esi, [ebx + ebx]
mov dword [ebp - 0x48], ebx
push esi
push dword [ebp - 0x94]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x58], edi
xor eax, eax
mov word [edi + esi], ax
mov ecx, dword [ebp - 0x98]
xor eax, eax
cmp dword [ebp - 0x18], ecx
mov dword [ebp - 0x88], 0
cmovb ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x14], 8
mov word [ebp - 0x88], ax
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 3
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 7
call fcn.00404580
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x94]
lea ecx, [ebp - 0x70]
call fcn.00405340
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x28]
call fcn.004023b0
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x4940b6
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4940ac
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4941f8
push edx
push ecx
call fcn.0049927f
add esp, 8
mov edx, dword [ebp - 0x74]
cmp edx, 8
jb 0x4940f3
mov ecx, dword [ebp - 0x88]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4940e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4941f8
push edx
push ecx
call fcn.0049927f
add esp, 8
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x49412d
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x494123
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4941f8
push edx
push ecx
call fcn.0049927f
add esp, 8
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 dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x494182
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push eax
call edi
push 0xe
push str._k_Scenario_t_
lea ecx, [ebp - 0x40]
call fcn.00404580
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push eax
call edi
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4941b8
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x4941ae
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4941f8
push ecx
push edi
call fcn.0049927f
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 0x494208
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4941fe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4941fe
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049927f
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.0049928d
mov esp, ebp
pop ebp
ret
call fcn.00404510
call fcn.00401c50
int3