Function at 0x4054e0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, ecx
sub esp, 0x2c
cmp byte [ecx + 1], 0
mov edi, dword [esp + 0x40]
jne 0x405641
mov eax, dword [0x4ddd1c]
test eax, eax
jne 0x405620
movzx ebp, byte [esi]
mov eax, ebp
test al, al
je 0x405606
mov dword [esp + 4], 0x3d
mov dword [esp], edi
call sub.msvcrt.dll_strchr
test eax, eax
je 0x405732
sub eax, edi
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0046ec00
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_getenv
cmp byte [esi + 1], 0
mov ebx, eax
jne 0x405703
test ebx, ebx
mov dword [esp + 0x10], 0
je 0x405567
mov dword [esp], ebx
call fcn.0046eb70
mov dword [esp + 0x10], eax
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x405724
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
and eax, 0x7fffffff
cmp eax, edx
jne 0x4055f0
cmp byte [ebx + 3], 0
js 0x405662
add edx, 1
mov dword [esp + 4], edx
mov eax, dword [ebx]
and eax, 0x7fffffff
mov dword [esp], eax
call fcn.00422680
mov ebp, eax
lea ecx, [eax*8 + 8]
mov eax, dword [esi + 4]
test eax, eax
je 0x40574e
mov edx, dword [eax + 4]
mov dword [esp + 4], ecx
mov dword [esp], eax
and ebp, 0x7fffffff
mov dword [esp + 0x18], edx
call fcn.0046eac0
mov ecx, dword [eax]
mov dword [esi + 4], eax
mov edx, dword [esp + 0x18]
and ecx, 0x80000000
or ebp, ecx
mov dword [eax], ebp
shr ebp, 0x18
mov ecx, ebp
and ecx, 0x7f
mov byte [eax + 3], cl
mov dword [eax + 4], edx
mov ebx, eax
add edx, 1
mov dword [ebx + 4], edx
lea eax, [ebx + edx*8]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov dword [eax], edx
mov dword [eax + 4], ebx
mov dword [esp], edi
call sub.msvcrt.dll__putenv
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x48e534
add eax, 0x40
mov dword [esp], eax
call fcn.00424d30
jmp 0x405504
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], edi
mov dword [esp + 4], str.env_manager::xput___s__n
add eax, 0x40
mov dword [esp], eax
call fcn.00487a40
jmp 0x4054f7
lea ecx, [edx + 1]
mov dword [esi + 4], 0
cmp ecx, 4
mov eax, 4
mov dword [esp], 0
cmovb ecx, eax
mov dword [esp + 0x1c], edx
lea eax, [ecx*8 + 8]
mov dword [esp + 0x18], ecx
mov dword [esp + 4], eax
call fcn.0046eac0
mov ecx, dword [esp + 0x18]
mov dword [esi + 4], eax
mov edx, ebp
mov esi, dword [eax]
mov dword [eax + 4], 0
and ecx, 0x7fffffff
and esi, 0x80000000
or ecx, esi
mov dword [eax], ecx
shr ecx, 0x18
and ecx, 0x7f
test dl, dl
mov edx, dword [esp + 0x1c]
mov byte [eax + 3], cl
je 0x405755
test edx, edx
lea esi, [ebx + 8]
lea ecx, [eax + 8]
mov ebx, edx
je 0x4055eb
mov dword [esp + 0x40], edi
test ecx, ecx
je 0x4056ef
mov edi, dword [esi]
mov ebp, dword [esi + 4]
mov dword [ecx], edi
mov dword [ecx + 4], ebp
add ecx, 8
add esi, 8
sub ebx, 1
jne 0x4056e1
mov edi, dword [esp + 0x40]
jmp 0x4055eb
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.saving_old_value:__s_n
add eax, 0x40
mov dword [esp], eax
call fcn.00487a40
jmp 0x40554f
xor ebp, ebp
xor edx, edx
mov ecx, 1
jmp 0x40566c
mov dword [esp + 8], str.xput
mov dword [esp + 4], 0x7c
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_gcc_gcc_gcc.c
call fcn.0048c200
xor edx, edx
jmp 0x4055b7
mov ebx, eax
xor edx, edx
jmp 0x4055f0