Function at 0x77cd6945
Capabilities:
Query environment variable

Disassembly:
lea eax, [ebp - 0x24]
push eax
call fcn.77cd6449
jmp 0x77cd69b9
mov dword [ebp + 8], 0xd
jmp 0x77cd69b0
test byte [ebp - 0x1c], 1
jne 0x77ce619a
lea eax, [ebp - 0x1c]
push eax
call fcn.77cd6449
jmp 0x77cbb1f8
cmp dword [ebp - 0x20], 2
je 0x77cbb207
jmp 0x77ce61d6
mov esi, 0x77d26580
push esi
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
push dword [ebp - 0x28]
call fcn.77cbf2f9
push esi
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
jmp 0x77cd69c2
cmp edi, ebx
je 0x77cb6c71
mov eax, dword [ebp + 0x10]
cmp eax, ebx
je 0x77cb6c6f
cmp dword [edi], ecx
jb 0x77cb6c6f
mov word [eax], bx
mov dword [edi], ecx
mov dword [ebp + 8], ebx
jmp 0x77cbb213
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x77cd7b14
mov eax, dword [edi]
mov dword [ebp + 0xc], eax
push edi
push dword [ebp + 0x10]
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
call sym.ADVAPI32.dll_RegQueryValueExW
mov dword [ebp + 8], eax
cmp dword [ebp - 0x1c], esi
jne 0x77cb5bec
cmp dword [ebp + 8], ebx
jne 0x77cbb207
cmp dword [ebp - 0x20], 1
jne 0x77cb5c04
push 2
pop ecx
cmp dword [ebp + 8], ecx
je 0x77cb6c5d
cmp dword [ebp + 8], ebx
jne 0x77cd69b0
cmp dword [ebp - 0x20], ecx
jne 0x77cd69b0
cmp edi, ebx
je 0x77c91d5d
cmp dword [ebp + 0x10], ebx
je 0x77c91d5d
mov esi, dword [edi]
cmp dword [ebp + 0xc], esi
jle 0x77cbb240
mov esi, dword [ebp + 0xc]
mov eax, dword fs:[0x18]
push esi
push ebx
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ebx, eax
test ebx, ebx
je 0x77ce61e2
push dword [edi]
push dword [ebp + 0x10]
push ebx
call sub.ntdll.dll_memcpy
add esp, 0xc
shr esi, 1
push esi
push dword [ebp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp + 0xc]
shr ecx, 1
cmp eax, ecx
jg 0x77ce61ee
mov dword [edi], eax
push ebx
push 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xor ebx, ebx
jmp 0x77cd69b0
mov dword [ebp - 0x1c], esi
jmp 0x77cbb1ca
push 0x18
push 0x77cd69d0
call fcn.77cd5e30
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
cmp dword [ebp + 8], 0x80000004
je 0x77ce6186
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
call fcn.77cd5e99
mov esi, eax
cmp esi, ebx
je 0x77ce618e
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x77cbb2a4
cmp word [eax], bx
je 0x77cbb2a4
lea ecx, [ebp - 0x1c]
push ecx
push 1
push ebx
push eax
push esi
call sym.ADVAPI32.dll_RegOpenKeyExW
mov dword [ebp + 8], eax
cmp eax, ebx
je 0x77cbb1ca
cmp dword [ebp - 0x24], ebx
jne 0x77c91d4f
cmp dword [ebp - 0x28], ebx
jne 0x77cb60dc
mov eax, dword [ebp + 8]
call fcn.77cd5e80
ret 0x10
mov dword [ebp + 0xc], ebx
jmp 0x77cbb1da
push 6
pop eax
jmp 0x77cd69c5
mov dword [ebp + 8], 6
jmp 0x77cd69b0
push 0xfffffffffffffffe
pop esi
and dword [ebp - 0x1c], esi
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x1c]
push eax
call fcn.77d12668
mov dword [ebp - 4], esi
jmp 0x77cbb1f8
mov dword [ebp + 8], 0xd
jmp 0x77cbb207
mov dword [ebp + 8], 8
jmp 0x77cbb29d
mov dword [ebp + 8], 0xea
jmp 0x77cbb286