Function at 0x521cc0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62522d
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x659af8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
push 0
push eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x5c], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ecx, eax
mov dword [ebp - 0x54], 0
xor edi, edi
mov dword [ebp - 0x58], ecx
xor esi, esi
mov dword [ebp - 0x50], 0
xor eax, eax
mov dword [ebp - 0x4c], edi
test ecx, ecx
je 0x521d61
cmp ecx, 0x7fffffff
ja 0x521ef6
push ecx
lea ecx, [ebp - 0x54]
call fcn.004ce090
mov esi, eax
mov eax, dword [ebp - 0x58]
add eax, eax
mov dword [ebp - 0x54], esi
push eax
push 0
push esi
lea edi, [eax + esi]
mov dword [ebp - 0x4c], edi
call fcn.0060a6d0
add esp, 0xc
mov dword [ebp - 0x50], edi
mov eax, edi
mov dword [ebp - 4], 1
cmp esi, eax
je 0x521dc3
sub eax, esi
sar eax, 1
push eax
push esi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x521dc3
mov ecx, esi
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x521da0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00507040
lea ecx, [ebp - 0x28]
mov eax, 5
jmp 0x521ddf
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov eax, 6
mov edx, dword [ebp - 0x48]
movups xmm0, xmmword [ecx]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
movups xmmword [edx], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [edx + 0x10], xmm0
xor edx, edx
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], dx
test al, 2
je 0x521e5e
mov edx, dword [ebp - 0x2c]
and eax, 0xfffffffd
mov dword [ebp - 0x44], eax
cmp edx, 8
jb 0x521e5e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 2
cmp edx, 0x1000
jb 0x521e51
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x521efb
push edx
push ecx
call fcn.006084e7
mov eax, dword [ebp - 0x44]
add esp, 8
test al, 1
je 0x521e9c
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x521e9c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x521e92
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x521efb
push edx
push ecx
call fcn.006084e7
add esp, 8
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x521ed8
sub edi, esi
sar edi, 1
add edi, edi
mov dword [ebp - 4], 4
cmp edi, 0x1000
jb 0x521ece
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x521efb
mov esi, ecx
push edi
push esi
call fcn.006084e7
add esp, 8
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00608a00
mov esp, ebp
pop ebp
ret
call fcn.004c7d60
call fcn.00540ccc
int3