Function at 0x405430
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 0x405591
mov eax, dword [0x5b2c44]
test eax, eax
jne 0x405570
movzx eax, byte [esi]
test al, al
mov byte [esp + 0x18], al
je 0x405559
mov dword [esp + 4], 0x3d
mov dword [esp], edi
call sub.msvcrt.dll_strchr
test eax, eax
je 0x405674
sub eax, edi
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.004792d0
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_getenv
cmp byte [esi + 1], 0
mov ebx, eax
jne 0x405642
test ebx, ebx
mov dword [esp + 0x10], 0
je 0x4054b9
mov dword [esp], ebx
call fcn.00479240
mov dword [esp + 0x10], eax
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x405663
mov ebp, dword [ebx]
mov edx, dword [ebx + 4]
and ebp, 0x7fffffff
cmp ebp, edx
jne 0x405543
cmp byte [ebx + 3], 0
js 0x4055b2
add edx, 1
mov dword [esp + 4], edx
mov eax, dword [ebx]
and eax, 0x7fffffff
mov dword [esp], eax
call fcn.004213b0
mov ebp, eax
lea ecx, [eax*8 + 8]
mov eax, dword [esi + 4]
test eax, eax
je 0x405690
mov edx, dword [eax + 4]
mov dword [esp + 4], ecx
mov dword [esp], eax
and ebp, 0x7fffffff
mov dword [esp + 0x18], edx
call fcn.004791b0
mov ecx, dword [eax]
mov dword [esi + 4], eax
mov ebx, eax
mov edx, dword [esp + 0x18]
and ecx, 0x80000000
or ebp, ecx
mov dword [eax + 4], edx
mov dword [eax], ebp
shr ebp, 0x18
mov ecx, ebp
and ecx, 0x7f
mov byte [eax + 3], cl
add edx, 1
mov esi, dword [esp + 0x14]
lea eax, [ebx + edx*8]
mov dword [ebx + 4], edx
mov dword [eax], esi
mov esi, dword [esp + 0x10]
mov dword [eax + 4], esi
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], 0x498580
add eax, 0x40
mov dword [esp], eax
call fcn.00424910
jmp 0x405454
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.00491e30
jmp 0x405447
lea edx, [ebp + 1]
mov dword [esi + 4], 0
cmp edx, 4
mov eax, 4
mov dword [esp], 0
cmovae eax, edx
mov ecx, eax
lea eax, [eax*8 + 8]
mov dword [esp + 0x1c], ecx
mov dword [esp + 4], eax
call fcn.004791b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
mov dword [esi + 4], eax
mov dword [eax + 4], 0
and ecx, 0x7fffffff
and edx, 0x80000000
or edx, ecx
mov dword [eax], edx
shr edx, 0x18
and edx, 0x7f
cmp byte [esp + 0x18], 0
mov byte [eax + 3], dl
je 0x405697
lea edx, [ebp*8]
add eax, 8
add ebx, 8
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_memcpy
mov ebx, dword [esi + 4]
mov edx, ebp
mov dword [ebx + 4], ebp
jmp 0x405543
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.00491e30
jmp 0x4054a1
mov byte [esp + 0x18], 0
xor ebp, ebp
mov edx, 1
jmp 0x4055bc
mov dword [esp + 8], str.xput
mov dword [esp + 4], 0x7c
mov dword [esp], str..._.._.._.._src_gcc_6.4.0_gcc_gcc.c
call fcn.00424940
xor edx, edx
jmp 0x40550a
mov ebx, eax
xor edx, edx
jmp 0x405543