Function at 0x407b40
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0x2c
cmp byte [ecx + 1], 0
mov edi, dword [esp + 0x40]
jne 0x407c30
mov eax, dword [0x56cd08]
test eax, eax
jne 0x407c5e
cmp byte [esi], 0
je 0x407be8
mov dword [esp + 4], 0x3d
mov dword [esp], edi
call sym._strchr
test eax, eax
je method.env_manager.xput_char_const___clone_.cold_
sub eax, edi
mov dword [esp], edi
mov dword [esp + 4], eax
call sym._xstrndup
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sym._getenv
cmp byte [esi + 1], 0
mov ebp, eax
jne 0x407c00
test ebp, ebp
je 0x407bb1
mov dword [esp], ebp
call sym._xstrdup
mov ebp, eax
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x407d80
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
lea ecx, [edx + 1]
and eax, 0x7fffffff
mov dword [esp + 0x10], ecx
cmp eax, edx
je 0x407c88
mov eax, dword [esp + 0x10]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x14]
mov dword [ebx + edx*8 + 0xc], ebp
mov dword [ebx + edx*8 + 8], eax
mov dword [esp], edi
call sym._putenv
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [esp + 8], ebp
mov dword [esp + 4], str.saving_old_value:__s_n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
test ebp, ebp
jne 0x407ba7
jmp 0x407bb1
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [esp + 8], edi
mov dword [esp + 4], str.env_manager::xput___s__n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov eax, dword [0x56cd08]
test eax, eax
je 0x407b64
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4f5c57
mov dword [esp], eax
call sym.fnotice__iobuf__char_const__..._
jmp 0x407b64
cmp byte [ebx + 3], 0
js 0x407cf0
mov eax, dword [esp + 0x10]
mov dword [esp], edx
mov dword [esp + 4], eax
call method.vec_prefix.calculate_allocation_1_unsigned_int__unsigned_int_
mov ecx, eax
lea ebx, [eax*8 + 8]
mov eax, dword [esi + 4]
test eax, eax
je 0x407db8
mov edx, dword [eax + 4]
and ecx, 0x7fffffff
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], ecx
call sym._xrealloc
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov dword [esi + 4], eax
mov ebx, eax
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [edx + 1]
mov dword [esp + 0x10], eax
jmp 0x407bd5
mov eax, 4
mov dword [esi + 4], 0
cmp ecx, eax
mov dword [esp], 0
cmovae eax, ecx
mov dword [esp + 0x1c], edx
add ebx, 8
mov ecx, eax
lea eax, [eax*8 + 8]
mov dword [esp + 4], eax
mov dword [esp + 0x18], ecx
call sym._xrealloc
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esi + 4], eax
lea esi, [eax + 8]
and ecx, 0x7fffffff
mov dword [eax + 4], 0
mov dword [eax], ecx
mov ecx, edx
test edx, edx
je 0x407d6e
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
add esi, 8
add ebx, 8
mov dword [esi - 8], eax
mov dword [esi - 4], edx
sub ecx, 1
jne 0x407d50
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [eax + 4], edx
mov ebx, eax
jmp 0x407bd5
mov dword [esp + 4], 0x28
mov dword [esp], 0
call sym._xrealloc
mov dword [esp + 0x10], 1
xor edx, edx
mov dword [esi + 4], eax
mov ebx, eax
mov dword [eax], 4
mov dword [eax + 4], 0
jmp 0x407bd5
and ecx, 0x7fffffff
xor edx, edx
jmp 0x407cbb