Function at 0x51bcc0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61f22d
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x653af8]
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 0x51bd61
cmp ecx, 0x7fffffff
ja 0x51bef6
push ecx
lea ecx, [ebp - 0x54]
call fcn.004c8090
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.006046d0
add esp, 0xc
mov dword [ebp - 0x50], edi
mov eax, edi
mov dword [ebp - 4], 1
cmp esi, eax
je 0x51bdc3
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 0x51bdc3
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 0x51bda0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00501040
lea ecx, [ebp - 0x28]
mov eax, 5
jmp 0x51bddf
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 0x51be5e
mov edx, dword [ebp - 0x2c]
and eax, 0xfffffffd
mov dword [ebp - 0x44], eax
cmp edx, 8
jb 0x51be5e
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 2
cmp edx, 0x1000
jb 0x51be51
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51befb
push edx
push ecx
call fcn.006024e7
mov eax, dword [ebp - 0x44]
add esp, 8
test al, 1
je 0x51be9c
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x51be9c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
mov byte [ebp - 4], 3
cmp edx, 0x1000
jb 0x51be92
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51befb
push edx
push ecx
call fcn.006024e7
add esp, 8
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x51bed8
sub edi, esi
sar edi, 1
add edi, edi
mov dword [ebp - 4], 4
cmp edi, 0x1000
jb 0x51bece
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x51befb
mov esi, ecx
push edi
push esi
call fcn.006024e7
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.00602a00
mov esp, ebp
pop ebp
ret
call fcn.004c1d60
call fcn.0053accc
int3