Function at 0x658f2bd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov eax, dword [0x659326ac]
test eax, eax
je 0x658f2cda
movzx eax, byte [0x659326c4]
test al, al
jne 0x658f2ccb
mov eax, dword [0x659326b4]
mov esi, dword [0x659326b0]
cmp esi, eax
jbe 0x658f2c21
mov ecx, dword [0x659326c8]
lea esi, [esi]
add eax, eax
lea edx, [ecx + 1]
cmp esi, eax
mov ecx, edx
ja 0x658f2c10
mov dword [0x659326c8], edx
lea eax, [esi + esi + 2]
xor edi, edi
mov dword [esp], eax
call fcn.658dc7d0
movzx ebx, word [0x659326b4]
mov dword [0x659326ec], eax
mov edx, eax
mov esi, dword [0x659326b0]
xor ecx, ecx
lea esi, [esi]
lea edi, [edi]
cmp ecx, ebx
jbe 0x658f2c60
lea eax, [ebx + ebx]
movzx ebx, ax
lea eax, [edi + 1]
movzx edi, ax
mov word [edx], di
lea eax, [ecx + 1]
movzx ecx, ax
add edx, 2
cmp ecx, esi
jbe 0x658f2c50
mov eax, dword [0x659326c8]
shl eax, 4
mov dword [esp], eax
call fcn.658dc7d0
mov dword [0x659326dc], eax
mov ebx, dword [0x65956618]
test ebx, ebx
jne 0x658f2d33
xor esi, esi
cmp esi, dword [0x659326c8]
jae 0x658f2ccb
lea esi, [esi]
mov dword [esp], 4
mov eax, dword [0x659326dc]
mov ebx, esi
shl ebx, 4
inc esi
add ebx, eax
call fcn.658dc7d0
mov dword [ebx], eax
mov eax, dword [ebx]
mov dword [eax], 0
cmp esi, dword [0x659326c8]
jb 0x658f2ca0
mov byte [0x659326e0], 1
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.GLIBCXX_FORCE_NEW
mov eax, 8
mov edi, 0x1000
mov dword [0x659326ac], eax
mov eax, pe_nt_image_headers32
mov esi, 0xa
mov dword [0x659326b0], eax
mov eax, 8
mov dword [0x659326b4], eax
mov eax, 0xff0
mov dword [0x659326b8], eax
mov dword [0x659326bc], edi
mov dword [0x659326c0], esi
call sub.msvcrt.dll_getenv
test eax, eax
setne al
mov byte [0x659326c4], al
jmp 0x658f2bed
mov eax, dword [0x659326bc]
mov ebx, 1
shl eax, 3
mov dword [esp], eax
call fcn.658dc7d0
cmp dword [0x659326bc], 1
mov dword [0x659326d0], eax
jmp 0x658f2d7b
mov edx, dword [0x659326d0]
lea eax, [ebx*8]
mov ecx, dword [0x659326d0]
lea edx, [eax + edx]
add eax, ecx
mov dword [edx - 4], ebx
inc ebx
cmp dword [0x659326bc], ebx
mov dword [edx - 8], eax
ja 0x658f2d56
mov eax, dword [0x659326d0]
xor ecx, ecx
mov dword [eax + ebx*8 - 8], ecx
mov eax, dword [0x659326d0]
mov dword [eax + ebx*8 - 4], ebx
mov dword [esp], 0x659326d4
call fcn.658e86f0
mov dword [esp], 0x659326cc
mov edx, 0x658f2fb0
mov dword [esp + 4], edx
call fcn.658e8600
mov dword [ebp - 0x10], 0
mov esi, dword [0x659326bc]
xor eax, eax
inc esi
cmp eax, dword [0x659326c8]
jae 0x658f2ccb
lea edi, [esi*4]
lea esi, [esi]
lea edi, [edi]
mov dword [esp], edi
mov edx, dword [ebp - 0x10]
mov eax, dword [0x659326dc]
shl edx, 4
lea ebx, [edx + eax]
call fcn.658dc7d0
mov dword [ebx], eax
mov dword [esp], edi
call fcn.658dc7d0
mov dword [ebx + 4], eax
mov dword [esp], edi
call fcn.658dc7d0
mov dword [ebx + 8], eax
mov dword [esp], 8
call fcn.658dc7d0
mov dword [ebx + 0xc], eax
mov dword [esp], eax
call fcn.658e86f0
xor edx, edx
jmp 0x658f2e4e
mov eax, dword [ebx]
mov dword [eax + edx*4], 0
mov eax, dword [ebx + 4]
mov dword [eax + edx*4], 0
mov eax, dword [ebx + 8]
mov dword [eax + edx*4], 0
inc edx
cmp edx, esi
jb 0x658f2e30
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x659326c8]
jb 0x658f2de0
jmp 0x658f2ccb