Function at 0x58e3f0
Capabilities:
Set environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov eax, dword [esp + 0xf4]
mov edi, dword [esp + 0xf0]
mov esi, dword [esp + 0xf8]
mov dword [esp + 0x10], eax
mov eax, dword [0x63ff4c]
test eax, eax
je 0x58e6b8
mov dword [esp + 4], str.environ
mov dword [esp], eax
call dword [sym.imp.python39.dll_PyObject_GetAttrString]
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov dword [esp], ebp
call dword [sym.imp.python39.dll_PyUnicode_FromString]
mov ebx, eax
test esi, esi
je 0x58e587
movzx eax, byte [ebp]
xor edi, edi
mov word [esp + 0x30], di
test al, al
je 0x58e6e0
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 0x5fb3bd
cmp word [esi + edi*2], 0
movzx eax, word [esp + 0x28]
je 0x58e4cc
lea esi, [esi]
add ebx, 2
sub ebp, 1
cmp word [ebx], 0
jne 0x58e4c0
test ebp, ebp
je 0x5fb3bd
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 0x58e478
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.python39.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.python39.dll_PyObject_SetItem]
test eax, eax
jne 0x58e6e9
sub dword [esi], 1
jne 0x58e544
mov eax, dword [esi + 4]
mov dword [esp], esi
call dword [eax + 0x18]
sub dword [ebx], 1
jne 0x58e552
mov eax, dword [ebx + 4]
mov dword [esp], ebx
call dword [eax + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov dword [esp + 0x10], eax
sub eax, 1
mov dword [ecx], eax
jne 0x58e57c
mov eax, dword [ecx + 4]
mov dword [esp + 0xf0], ecx
mov eax, dword [eax + 0x18]
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
jmp eax
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x10]
xor edx, edx
mov word [esp + 0x80], dx
movzx eax, byte [eax]
test al, al
je 0x58e703
mov dword [esp + 0x18], ebx
xor ebp, ebp
lea edx, [esp + 0x80]
mov dword [esp + 0x1c], edi
mov edi, ebp
mov ebp, edx
lea esi, [esi]
mov byte [esp + 0x26], al
lea eax, [esp + 0x26]
mov esi, 0x28
lea ebx, [ebp + edi*2]
mov dword [esp + 4], eax
lea eax, [esp + 0x2c]
sub esi, edi
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x27], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x5fb3bd
cmp word [ebp + edi*2], 0
movzx eax, word [esp + 0x2c]
je 0x58e60c
nop
add ebx, 2
sub esi, 1
cmp word [ebx], 0
jne 0x58e600
test esi, esi
je 0x5fb3bd
mov word [ebx], ax
xor eax, eax
add edi, 1
mov word [ebx + 2], ax
mov eax, dword [esp + 0x10]
movzx eax, byte [eax + edi]
test al, al
jne 0x58e5b8
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov edx, ebp
mov dword [esp + 4], 0
mov dword [esp], edx
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.python39.dll_PyObject_DelItem]
test eax, eax
je 0x58e544
mov eax, dword [edi + 0x34]
mov ebp, dword [edi + 0x38]
mov dword [edi + 0x34], 0
mov esi, dword [edi + 0x3c]
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
test eax, eax
je 0x58e693
sub dword [eax], 1
jne 0x58e693
mov edx, dword [eax + 4]
mov dword [esp], eax
call dword [edx + 0x18]
test ebp, ebp
je 0x58e6a6
sub dword [ebp], 1
jne 0x58e6a6
mov eax, dword [ebp + 4]
mov dword [esp], ebp
call dword [eax + 0x18]
test esi, esi
jne 0x58e536
jmp 0x58e544
mov dword [esp], 0x607e5e
call dword [sym.imp.python39.dll_PyImport_ImportModule]
mov dword [0x63ff4c], eax
test eax, eax
jne 0x58e420
jmp 0x5fb3bd
lea edi, [esp + 0x30]
jmp 0x58e4f6
mov dword [esp], 1
call dword [sym.imp.python39.dll_PyErr_PrintEx]
mov dword [esp], 1
call dword [sym.imp.python39.dll_Py_Exit]
lea edx, [esp + 0x80]
jmp 0x58e636