Function at 0x4b2f50
Capabilities:
Set environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [esp + 0xf0]
mov esi, dword [esp + 0xf8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xf4]
mov dword [esp + 0x10], eax
mov eax, dword [0x569fec]
test eax, eax
je 0x4b321e
mov dword [esp + 4], str.environ
mov dword [esp], eax
call dword [sym.imp.python312.dll_PyObject_GetAttrString]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov dword [esp], edi
call dword [sym.imp.python312.dll_PyUnicode_FromString]
mov ebx, eax
test esi, esi
je 0x4b30fb
movzx eax, byte [edi]
xor ebp, ebp
mov word [esp + 0x30], bp
test al, al
je 0x4b3240
mov dword [esp + 0x18], ebx
lea edi, [esp + 0x30]
xor ebp, ebp
mov dword [esp + 0x1c], esi
mov esi, edi
mov edi, ebp
lea esi, [esi]
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
mov ebp, 0x28
lea ebx, [esi + edi*2]
mov dword [esp + 4], eax
lea eax, [esp + 0x28]
sub ebp, edi
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x25], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x538316
cmp word [esi + edi*2], 0
movzx eax, word [esp + 0x28]
je 0x4b302c
lea esi, [esi]
add ebx, 2
sub ebp, 1
cmp word [ebx], 0
jne 0x4b3020
test ebp, ebp
je 0x538316
mov word [ebx], ax
mov eax, dword [esp + 0x10]
add edi, 1
xor ecx, ecx
mov word [ebx + 2], cx
movzx eax, byte [eax + edi]
test al, al
jne 0x4b2fd8
mov edi, esi
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [esp + 4], esi
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov dword [esp], esi
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.python312.dll_PyUnicode_FromWideChar]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov esi, eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.python312.dll_PyObject_SetItem]
test eax, eax
jne 0x4b3249
mov eax, dword [esi]
cmp eax, 0x3fffffff
je 0x4b30aa
sub eax, 1
mov dword [esi], eax
je 0x4b3210
mov eax, dword [ebx]
cmp eax, 0x3fffffff
je 0x4b30ba
sub eax, 1
mov dword [ebx], eax
je 0x4b30f0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
cmp eax, 0x3fffffff
je 0x4b30ce
sub eax, 1
mov dword [ecx], eax
je 0x4b30d9
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xf0], ecx
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
jmp dword [sym.imp.python312.dll__Py_Dealloc]
mov dword [esp], ebx
call dword [sym.imp.python312.dll__Py_Dealloc]
jmp 0x4b30ba
mov eax, dword [esp + 0x10]
xor edx, edx
mov word [esp + 0x80], dx
movzx eax, byte [eax]
test al, al
je 0x4b3263
lea edi, [esp + 0x80]
xor ebp, ebp
mov dword [esp + 0x1c], ebx
mov ebx, edi
mov edi, ebp
lea esi, [esi]
mov byte [esp + 0x26], al
lea eax, [esp + 0x26]
mov ebp, 0x28
lea esi, [ebx + edi*2]
mov dword [esp + 4], eax
lea eax, [esp + 0x2c]
sub ebp, edi
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x27], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x538316
cmp word [ebx + edi*2], 0
movzx eax, word [esp + 0x2c]
je 0x4b317c
lea esi, [esi]
add esi, 2
sub ebp, 1
cmp word [esi], 0
jne 0x4b3170
test ebp, ebp
je 0x538316
mov word [esi], ax
xor eax, eax
add edi, 1
mov word [esi + 2], ax
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + edi]
test al, al
jne 0x4b3128
mov edi, ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov eax, dword [esp + 0x14]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.python312.dll_PyObject_DelItem]
test eax, eax
je 0x4b30aa
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x3c]
mov dword [eax + 0x3c], 0
test edx, edx
je 0x4b30aa
mov eax, dword [edx]
cmp eax, 0x3fffffff
je 0x4b30aa
sub eax, 1
mov dword [edx], eax
jne 0x4b30aa
mov dword [esp], edx
call dword [sym.imp.python312.dll__Py_Dealloc]
jmp 0x4b30aa
mov dword [esp], esi
call dword [sym.imp.python312.dll__Py_Dealloc]
jmp 0x4b30aa
mov dword [esp], 0x541a1b
call dword [sym.imp.python312.dll_PyImport_ImportModule]
mov dword [0x569fec], eax
test eax, eax
jne 0x4b2f84
jmp 0x538316
lea edi, [esp + 0x30]
jmp 0x4b3056
mov dword [esp], 1
call dword [sym.imp.python312.dll_PyErr_PrintEx]
mov dword [esp], 1
call dword [sym.imp.python312.dll_Py_Exit]
lea edi, [esp + 0x80]
jmp 0x4b31a2