Function at 0x51b330
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58e40c
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x608514]
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]
lea ecx, [ebp - 0x230]
mov esi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x250], esi
call fcn.0040d690
mov dword [ebp - 4], 0
mov edx, str.__r_t_n
lea ecx, [ebp - 0x230]
call fcn.00446630
mov edx, str.__r_t_n
lea ecx, [ebp - 0x230]
call fcn.004466c0
cmp dword [ebp - 0x220], 0
jne 0x51b3b1
mov byte [ebp - 0x249], 0
jmp 0x51b5b8
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x218]
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x51b422
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51b400
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x230]
call fcn.004047a0
lea ecx, [ebp - 0x230]
call fcn.004472c0
test al, al
je 0x51b463
lea eax, [ebp - 0x230]
cmp esi, eax
je 0x51b457
cmp dword [ebp - 0x21c], 8
mov ecx, esi
push dword [ebp - 0x220]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.004047a0
mov byte [ebp - 0x249], 1
jmp 0x51b5b8
mov edi, dword [ebp - 0x21c]
lea edx, [ebp - 0x230]
mov esi, dword [ebp - 0x220]
cmp edi, 8
cmovae edx, dword [ebp - 0x230]
test esi, esi
je 0x51b53a
mov ecx, esi
mov eax, edx
nop dword [eax + eax]
cmp word [eax], 0x22
je 0x51b4a3
add eax, 2
sub ecx, 1
jne 0x51b490
jmp 0x51b53a
test eax, eax
je 0x51b53a
sub eax, edx
cmp eax, 2
jae 0x51b53a
cmp edi, 8
lea edx, [ebp - 0x230]
cmovae edx, dword [ebp - 0x230]
cmp esi, 1
jbe 0x51b53a
lea ecx, [esi - 1]
lea eax, [edx + 2]
test ecx, ecx
je 0x51b53a
cmp word [eax], 0x22
je 0x51b4e5
add eax, 2
sub ecx, 1
jne 0x51b4d5
jmp 0x51b53a
test eax, eax
je 0x51b53a
sub eax, edx
sar eax, 1
cmp eax, 0xffffffff
je 0x51b53a
dec eax
lea ecx, [ebp - 0x230]
push eax
push 1
lea eax, [ebp - 0x268]
push eax
call fcn.00432a40
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x250]
push eax
call fcn.00404200
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x268]
call fcn.004046e0
mov ecx, dword [ebp - 0x250]
call fcn.004472c0
test al, al
jne 0x51b457
xor esi, esi
xor eax, eax
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x220]
nop dword [eax + eax]
cmp dword [ebp - 0x21c], 8
lea edx, [ebp - 0x230]
lea ecx, [esi + 1]
cmovae edx, dword [ebp - 0x230]
cmp ecx, edi
jae 0x51b5a2
mov eax, edi
lea esi, [edx + ecx*2]
sub eax, ecx
je 0x51b5a2
cmp word [esi], 0x20
je 0x51b5ed
add esi, 2
sub eax, 1
jne 0x51b594
mov byte [ebp - 0x249], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x248]
call fcn.004046e0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x230]
call fcn.004046e0
mov al, byte [ebp - 0x249]
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.0054bed3
mov esp, ebp
pop ebp
ret 8
test esi, esi
je 0x51b5a2
sub esi, edx
sar esi, 1
cmp esi, 0xffffffff
je 0x51b5a2
cmp esi, ecx
je 0x51b570
push esi
push 0
lea eax, [ebp - 0x268]
push eax
lea ecx, [ebp - 0x230]
call fcn.00432a40
mov edi, eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x248]
cmp eax, edi
je 0x51b658
mov ecx, eax
call fcn.004046e0
movups xmm0, xmmword [edi]
xor eax, eax
movups xmmword [ebp - 0x248], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x238], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x268]
call fcn.004046e0
lea ecx, [ebp - 0x248]
call fcn.00432270
test al, al
jne 0x51b69b
push 4
push 0x5b9a04
lea ecx, [ebp - 0x248]
call fcn.004107e0
lea ecx, [ebp - 0x248]
call fcn.00432270
test al, al
je 0x51b565
mov ecx, dword [ebp - 0x250]
lea eax, [ebp - 0x248]
cmp ecx, eax
je 0x51b6c5
cmp dword [ebp - 0x234], 8
push dword [ebp - 0x238]
cmovae eax, dword [ebp - 0x248]
push eax
call fcn.004047a0
mov byte [ebp - 0x249], 1
jmp 0x51b5a9