Function at 0x4e6a60
Capabilities:
Set environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xcc
mov eax, dword [esp + 0xe0]
mov edi, dword [esp + 0xe4]
mov ebx, dword [esp + 0xe8]
mov dword [esp + 0x10], eax
mov eax, dword [0x587b28]
test eax, eax
je 0x4e6d00
mov dword [esp + 4], str.environ
mov dword [esp], eax
call dword [sym.imp.python38.dll_PyObject_GetAttrString]
mov dword [esp], edi
mov dword [esp + 0x14], eax
call dword [sym.imp.python38.dll_PyUnicode_FromString]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x4e6bec
xor edx, edx
xor esi, esi
lea ebp, [esp + 0x20]
mov word [esp + 0x20], dx
movzx edx, byte [edi]
test dl, dl
je 0x4e6b4b
mov dword [esp + 0x10], edi
mov edi, esi
mov dword [esp + 0x1c], ebx
mov ebx, edx
lea esi, [esi]
mov eax, 0x28
lea esi, [ebp + edi*2]
sub eax, edi
cmp word [ebp + edi*2], 0
je 0x4e6b04
lea esi, [esi]
nop
add esi, 2
sub eax, 1
cmp word [esi], 0
jne 0x4e6af8
test eax, eax
je 0x554407
mov dword [esp], esi
add edi, 1
call sub.msvcrt.dll_wcslen
lea ecx, [esp + 0x70]
mov byte [esp + 0x70], bl
lea eax, [esi + eax*2]
mov dword [esp + 8], 2
mov dword [esp + 4], ecx
mov dword [esp], eax
mov byte [esp + 0x71], 0
call sub.msvcrt.dll_mbstowcs
mov eax, dword [esp + 0x10]
movzx ebx, byte [eax + edi]
test bl, bl
jne 0x4e6ae0
mov ebx, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov dword [esp], ebx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.python38.dll_PyUnicode_FromWideChar]
mov dword [esp + 8], eax
mov ebx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.python38.dll_PyObject_SetItem]
test eax, eax
jne 0x4e6d20
sub dword [ebx], 1
jne 0x4e6b9d
mov eax, dword [ebx + 4]
mov dword [esp], ebx
call dword [eax + 0x18]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov dword [esp + 0x10], eax
sub eax, 1
mov dword [ecx], eax
jne 0x4e6bb7
mov eax, dword [ecx + 4]
mov dword [esp], ecx
call dword [eax + 0x18]
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov dword [esp + 0x10], eax
sub eax, 1
mov dword [edx], eax
jne 0x4e6be1
mov eax, dword [edx + 4]
mov dword [esp + 0xe0], edx
mov eax, dword [eax + 0x18]
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
jmp eax
add esp, 0xcc
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ebp, byte [edi]
xor eax, eax
xor esi, esi
lea edx, [esp + 0x70]
mov word [esp + 0x70], ax
mov eax, ebp
test al, al
je 0x4e6c73
lea esi, [esi]
mov eax, 0x28
lea ebx, [edx + esi*2]
sub eax, esi
cmp word [edx + esi*2], 0
je 0x4e6c2c
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x4e6c20
test eax, eax
je 0x554407
mov dword [esp], ebx
add esi, 1
call sub.msvcrt.dll_wcslen
lea edx, [esp + 0x20]
mov ecx, ebp
mov byte [esp + 0x21], 0
lea eax, [ebx + eax*2]
mov dword [esp + 4], edx
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x20], cl
call sub.msvcrt.dll_mbstowcs
movzx ebp, byte [edi + esi]
lea edx, [esp + 0x70]
mov eax, ebp
test al, al
jne 0x4e6c08
mov dword [esp + 4], 0
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
sub esp, 8
mov eax, dword [esp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.python38.dll_PyObject_DelItem]
test eax, eax
je 0x4e6b9d
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x34]
mov esi, dword [ecx + 0x38]
mov dword [ecx + 0x34], 0
mov ebx, dword [ecx + 0x3c]
mov dword [ecx + 0x38], 0
mov dword [ecx + 0x3c], 0
test eax, eax
je 0x4e6cd8
sub dword [eax], 1
jne 0x4e6cd8
mov edx, dword [eax + 4]
mov dword [esp], eax
call dword [edx + 0x18]
test esi, esi
je 0x4e6cea
sub dword [esi], 1
jne 0x4e6cea
mov eax, dword [esi + 4]
mov dword [esp], esi
call dword [eax + 0x18]
test ebx, ebx
jne 0x4e6b8f
jmp 0x4e6b9d
mov dword [esp], 0x55d362
call dword [sym.imp.python38.dll_PyImport_ImportModule]
mov dword [0x587b28], eax
test eax, eax
jne 0x4e6a90
jmp 0x554407
mov dword [esp], 1
call dword [sym.imp.python38.dll_PyErr_PrintEx]
mov dword [esp], 1
call dword [sym.imp.python38.dll_Py_Exit]
lea esi, [esi]
sub esp, 0x1c
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x587900
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0xc
test eax, eax
je 0x55440c
mov eax, 0x587900
add esp, 0x1c
ret