Function at 0x5c8590
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 8
xor ebp, ebp
call fcn.005c8580
mov esi, dword [eax]
inc dword [eax]
test esi, esi
je 0x5c85b0
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
xor ebx, ebx
mov edi, 0x6ee240
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
add edi, 0x18
inc ebx
cmp ebx, 6
jl 0x5c85b7
push 8
call fcn.005bd500
pop ecx
mov dword [0x713ff8], eax
test eax, eax
je 0x5c861f
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ebx, [esp + 4]
push ebx
push eax
call fcn.005c8530
pop ecx
pop ecx
test eax, eax
je 0x5c8600
mov eax, dword [0x713ff8]
or dword [eax], 0xffffffff
jmp 0x5c860c
mov edi, dword [0x713ff8]
mov eax, dword [esp + 4]
mov dword [edi], eax
mov ecx, dword [0x713ff8]
mov byte [ecx + 4], 1
mov eax, dword [0x713ff8]
mov byte [eax + 5], 0
push 8
call fcn.005bd500
pop ecx
mov dword [0x713ffc], eax
test eax, eax
je 0x5c8672
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea edx, [esp + 4]
push edx
push eax
call fcn.005c8530
pop ecx
pop ecx
test eax, eax
je 0x5c8653
mov eax, dword [0x713ffc]
or dword [eax], 0xffffffff
jmp 0x5c865f
mov esi, dword [0x713ffc]
mov eax, dword [esp + 4]
mov dword [esi], eax
mov ebx, dword [0x713ffc]
mov byte [ebx + 4], 1
mov eax, dword [0x713ffc]
mov byte [eax + 5], 0
push 8
call fcn.005bd500
pop ecx
mov dword [0x714000], eax
test eax, eax
je 0x5c86c5
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea edi, [esp + 4]
push edi
push eax
call fcn.005c8530
pop ecx
pop ecx
test eax, eax
je 0x5c86a6
mov eax, dword [0x714000]
or dword [eax], 0xffffffff
jmp 0x5c86b2
mov ecx, dword [0x714000]
mov eax, dword [esp + 4]
mov dword [ecx], eax
mov edx, dword [0x714000]
mov byte [edx + 4], 1
mov eax, dword [0x714000]
mov byte [eax + 5], 0
mov dword [0x8f1af0], 3
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
mov dword [esp], esi
jmp 0x5c86f3
mov edi, esi
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, 0xfffffffe
sub eax, ecx
inc eax
add esi, eax
cmp byte [esi], 0x3d
je 0x5c86e0
mov ebx, esi
jmp 0x5c8713
mov edi, ebx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, 0xfffffffe
sub eax, ecx
inc eax
add ebx, eax
cmp byte [ebx], 0
jne 0x5c8700
sub ebx, esi
inc ebx
push ebx
call fcn.005bd500
pop ecx
mov dword [0x663c64], eax
test eax, eax
je 0x5c8736
push ebx
push esi
push eax
call fcn.005b3bb0
add esp, 0xc
mov dword [0x885b84], 0x663c64
mov eax, dword [0x885b84]
mov edx, dword [eax]
jmp 0x5c8764
inc ebp
mov edi, edx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, 0xfffffffe
sub eax, ecx
inc eax
add edx, eax
cmp byte [edx], 0
jne 0x5c8750
inc ebp
lea ebp, [ebp*4]
push ebp
call fcn.005bd500
pop ecx
mov dword [0x8f1b74], eax
mov eax, dword [0x885b84]
mov ebx, dword [eax]
xor edx, edx
jmp 0x5c87a4
mov eax, dword [0x8f1b74]
mov dword [eax + edx*4], ebx
inc edx
mov edi, ebx
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, 0xfffffffe
sub eax, ecx
inc eax
add ebx, eax
cmp byte [ebx], 0
jne 0x5c8788
mov eax, dword [0x8f1b74]
mov dword [eax + edx*4], 0
push dword [esp]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret