Function at 0x421f50
Capabilities:
Set environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x64
mov eax, dword [0x4690e0]
xor eax, esp
mov dword [esp + 0x60], eax
mov eax, dword [0x46a858]
test eax, eax
jne 0x421f86
push 0x45caff
call dword [sym.imp.python311.dll_PyImport_ImportModule]
add esp, 4
mov dword [0x46a858], eax
test eax, eax
je 0x422175
mov esi, dword [esp + 0x7c]
push str.environ
push eax
call dword [sym.imp.python311.dll_PyObject_GetAttrString]
add esp, 8
mov dword [esp + 8], eax
push esi
call dword [sym.imp.python311.dll_PyUnicode_FromString]
add esp, 4
mov dword [esp + 4], eax
cmp dword [esp + 0x80], 0
je 0x42209f
mov word [esp + 0x10], 0
movzx ebx, byte [esi]
test bl, bl
je 0x422043
mov dword [esp], esi
mov ebp, 0x28
lea edi, [esp + 0x10]
xor eax, eax
nop word cs:[eax + eax]
mov esi, edi
mov ecx, ebp
test ax, ax
je 0x421ffd
mov ecx, ebp
mov eax, edi
nop dword [eax]
lea esi, [eax + 2]
dec ecx
cmp word [eax + 2], 0
mov eax, esi
jne 0x421ff0
test ecx, ecx
je 0x422175
push esi
call fcn.00444580
add esp, 4
lea eax, [esi + eax*2]
mov byte [esp + 0xe], bl
mov byte [esp + 0xf], 0
push 2
lea ecx, [esp + 0x12]
push ecx
push eax
call fcn.00443ce0
add esp, 0xc
mov eax, dword [esp]
movzx ebx, byte [eax + 1]
test bl, bl
je 0x422043
inc eax
mov dword [esp], eax
dec ebp
movzx eax, word [edi + 2]
add edi, 2
jmp 0x421fe0
lea eax, [esp + 0x10]
mov esi, dword [esp + 0x80]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0xffffffffffffffff
push esi
call dword [sym.imp.python311.dll_PyUnicode_FromWideChar]
add esp, 8
mov ebx, eax
push eax
mov edi, dword [esp + 8]
push edi
mov esi, dword [esp + 0x10]
push esi
call dword [sym.imp.python311.dll_PyObject_SetItem]
add esp, 0xc
test eax, eax
jne 0x422162
dec dword [ebx]
jne 0x422147
mov eax, dword [ebx + 4]
push ebx
call dword [eax + 0x18]
add esp, 4
dec dword [edi]
jne 0x42214b
jmp 0x422187
mov word [esp + 0x10], 0
movzx ebx, byte [esi]
test bl, bl
je 0x422123
mov dword [esp], esi
mov ebp, 0x28
lea esi, [esp + 0x10]
xor eax, eax
nop dword [eax + eax]
mov edi, esi
mov ecx, ebp
test ax, ax
je 0x4220dd
mov ecx, ebp
mov eax, esi
nop dword [eax]
lea edi, [eax + 2]
dec ecx
cmp word [eax + 2], 0
mov eax, edi
jne 0x4220d0
test ecx, ecx
je 0x422175
push edi
call fcn.00444580
add esp, 4
lea eax, [edi + eax*2]
mov byte [esp + 0xe], bl
mov byte [esp + 0xf], 0
push 2
lea ecx, [esp + 0x12]
push ecx
push eax
call fcn.00443ce0
add esp, 0xc
mov eax, dword [esp]
movzx ebx, byte [eax + 1]
test bl, bl
je 0x422123
inc eax
mov dword [esp], eax
dec ebp
movzx eax, word [esi + 2]
add esi, 2
jmp 0x4220c0
lea eax, [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edi, dword [esp + 4]
push edi
mov esi, dword [esp + 0xc]
push esi
call dword [sym.imp.python311.dll_PyObject_DelItem]
add esp, 8
test eax, eax
jne 0x42217a
dec dword [edi]
je 0x422187
dec dword [esi]
je 0x422195
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00436920
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret
push 1
call dword [sym.imp.python311.dll_PyErr_PrintEx]
add esp, 4
push 1
call dword [sym.imp.python311.dll_Py_Exit]
call fcn.00443b68
mov ecx, dword [esp + 0x78]
call fcn.00411b40
dec dword [edi]
jne 0x42214b
mov eax, dword [edi + 4]
push edi
call dword [eax + 0x18]
add esp, 4
dec dword [esi]
jne 0x42214f
mov eax, dword [esi + 4]
push esi
call dword [eax + 0x18]
add esp, 4
jmp 0x42214f