Function at 0x441690
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 [0x4db24c]
test eax, eax
je 0x441930
mov dword [esp + 4], str.environ
mov dword [esp], eax
call dword [sym.imp.python39.dll_PyObject_GetAttrString]
mov dword [esp], edi
mov dword [esp + 0x14], eax
call dword [sym.imp.python39.dll_PyUnicode_FromString]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x44181c
xor edx, edx
xor esi, esi
lea ebp, [esp + 0x20]
mov word [esp + 0x20], dx
movzx edx, byte [edi]
test dl, dl
je 0x44177b
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 0x441734
lea esi, [esi]
nop
add esi, 2
sub eax, 1
cmp word [esi], 0
jne 0x441728
test eax, eax
je 0x4af447
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 0x441710
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.python39.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.python39.dll_PyObject_SetItem]
test eax, eax
jne 0x441950
sub dword [ebx], 1
jne 0x4417cd
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 0x4417e7
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 0x441811
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 0x4418a3
lea esi, [esi]
mov eax, 0x28
lea ebx, [edx + esi*2]
sub eax, esi
cmp word [edx + esi*2], 0
je 0x44185c
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x441850
test eax, eax
je 0x4af447
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 0x441838
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.python39.dll_PyObject_DelItem]
test eax, eax
je 0x4417cd
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 0x441908
sub dword [eax], 1
jne 0x441908
mov edx, dword [eax + 4]
mov dword [esp], eax
call dword [edx + 0x18]
test esi, esi
je 0x44191a
sub dword [esi], 1
jne 0x44191a
mov eax, dword [esi + 4]
mov dword [esp], esi
call dword [eax + 0x18]
test ebx, ebx
jne 0x4417bf
jmp 0x4417cd
mov dword [esp], 0x4b7342
call dword [sym.imp.python39.dll_PyImport_ImportModule]
mov dword [0x4db24c], eax
test eax, eax
jne 0x4416c0
jmp 0x4af447
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 esi, [esi]
sub esp, 0x1c
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x4db020
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0xc
test eax, eax
je 0x4af44c
mov eax, 0x4db020
add esp, 0x1c
ret