Function at 0x101fd2d0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x103b1004]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, ecx
cmp dword [ebx + 0x98], 0
push esi
push edi
lea edi, [ebx + 0x98]
jne 0x101fd330
mov eax, dword [0x103fa138]
test eax, eax
je 0x101fd330
push str.cannot_decode__Py_StandardStreamEncoding
push eax
lea eax, [ebp - 0x4c]
mov edx, edi
push eax
call fcn.101f9ca0
add esp, 0xc
cmp dword [eax], 0
je 0x101fd330
movups xmm0, xmmword [eax]
mov eax, dword [ebp + 8]
movups xmmword [eax], xmm0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x9c], 0
lea esi, [ebx + 0x9c]
jne 0x101fd363
mov eax, dword [0x103fa144]
test eax, eax
je 0x101fd363
push str.cannot_decode__Py_StandardStreamErrors
push eax
lea eax, [ebp - 0x64]
mov edx, esi
push eax
mov ecx, ebx
call fcn.101f9ca0
add esp, 0xc
cmp dword [eax], 0
jne 0x101fd316
cmp dword [edi], 0
je 0x101fd371
cmp dword [esi], 0
jne 0x101fd567
cmp dword [ebx + 8], 0
je 0x101fd4a4
push str.PYTHONIOENCODING
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
test eax, eax
je 0x101fd4a4
cmp byte [eax], 0
je 0x101fd4a4
push eax
call sym.python310.dll__PyMem_RawStrdup
mov edi, eax
add esp, 4
test edi, edi
jne 0x101fd3c5
mov eax, dword [ebp + 8]
mov dword [eax], 1
mov dword [eax + 4], str.config_init_stdio_encoding
mov dword [eax + 8], str.memory_allocation_failed
jmp 0x101fd57e
push 0x3a
push edi
call dword [sym.imp.VCRUNTIME140.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x101fd3e2
mov byte [esi], 0
xor eax, eax
inc esi
cmp byte [esi], al
cmove esi, eax
cmp byte [edi], 0
je 0x101fd425
cmp dword [ebx + 0x98], 0
lea edx, [ebx + 0x98]
jne 0x101fd419
push str.cannot_decode_PYTHONIOENCODING_environment_variable
lea eax, [ebp - 0x64]
mov ecx, ebx
push edi
push eax
call fcn.101f9ca0
add esp, 0xc
movups xmm0, xmmword [eax]
movd eax, xmm0
movups xmmword [ebp - 0x4c], xmm0
test eax, eax
jne 0x101fd45d
test esi, esi
mov eax, 0x10365d9c
cmovne eax, esi
mov esi, eax
cmp dword [ebx + 0x9c], 0
jne 0x101fd488
test esi, esi
je 0x101fd488
push str.cannot_decode_PYTHONIOENCODING_environment_variable
push esi
lea eax, [ebp - 0x64]
mov ecx, ebx
lea esi, [ebx + 0x9c]
push eax
mov edx, esi
call fcn.101f9ca0
add esp, 0xc
movups xmm0, xmmword [eax]
movd eax, xmm0
movups xmmword [ebp - 0x4c], xmm0
test eax, eax
je 0x101fd48e
push edi
push dword [0x103cc53c]
call dword [0x103cc54c]
mov eax, dword [ebp + 8]
add esp, 8
movups xmm0, xmmword [ebp - 0x4c]
movups xmmword [eax], xmm0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1024a596
mov esp, ebp
pop ebp
ret
lea esi, [ebx + 0x9c]
push edi
push dword [0x103cc53c]
call dword [0x103cc54c]
add esp, 8
lea edi, [ebx + 0x98]
cmp dword [edi], 0
jne 0x101fd546
cmp dword [0x103fb148], 0
je 0x101fd4bd
mov eax, 0x1038c404
jmp 0x101fd4e0
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push str.cp_u
lea eax, [ebp - 0x38]
push 0x17
push eax
call fcn.101e82f0
add esp, 0x10
xor eax, eax
mov word [ebp - 0xc], ax
lea eax, [ebp - 0x38]
push eax
call sym.python310.dll__PyMem_RawWcsdup
add esp, 4
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x101fd511
mov dword [ebp - 0x4c], 1
mov dword [ebp - 0x48], str.config_get_locale_encoding
mov dword [ebp - 0x44], str.memory_allocation_failed
mov dword [ebp - 0x40], eax
movups xmm0, xmmword [ebp - 0x4c]
jmp 0x101fd319
push eax
push edi
lea eax, [ebp - 0x64]
push ebx
push eax
call sym.python310.dll_PyConfig_SetString
push dword [ebp - 0x50]
push dword [0x103cc53c]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x4c], xmm0
call dword [0x103cc54c]
movups xmm0, xmmword [ebp - 0x4c]
add esp, 0x18
movd eax, xmm0
test eax, eax
jne 0x101fd319
cmp dword [esi], 0
jne 0x101fd567
push str.surrogateescape
push esi
lea eax, [ebp - 0x64]
push ebx
push eax
call sym.python310.dll_PyConfig_SetString
add esp, 0x10
cmp dword [eax], 0
jne 0x101fd316
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov dword [eax + 0xc], 0
pop ebx
call fcn.1024a596
mov esp, ebp
pop ebp
ret