Function at 0x4d5290
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xb4
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4d6f70
mov edi, dword [ebp + 0xc]
lea edx, [ebp - 0x18]
mov eax, dword [ebp + 8]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], edx
movzx ecx, byte [edi + 0xc]
mov esi, dword [edi + 8]
test cl, cl
jne 0x4d52e1
test esi, esi
jne 0x4d52e1
mov dword [eax], 0
jmp 0x4d568c
test cl, cl
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x88], 0
jne 0x4d5462
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
je 0x4d570d
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xac], esi
mov dword [ebp - 0x94], eax
nop dword [eax]
lea eax, [ebp - 0x94]
mov dword [ebp - 0x10], 4
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.004d23c0
add esp, 8
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x40]
lea edx, [ebp - 0xa8]
cmp eax, 0x80000000
je 0x4d544d
movq xmm0, qword [ebp - 0x7c]
mov edi, dword [ebp - 0x80]
mov esi, dword [ebp - 0x74]
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x68]
mov dword [ebp - 0x10], 6
movd eax, xmm0
mov dword [ebp - 0x24], esi
mov esi, dword [ebp - 0x70]
mov dword [ebp - 0x40], edi
movdqu xmmword [ebp - 0xc0], xmm0
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x30], edi
add eax, edi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x6c]
mov word [ebp - 0x38], 0
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0xb0], eax
push ecx
push edx
call fcn.004d0680
add esp, 8
mov eax, dword [ebp - 0x28]
movups xmm0, xmmword [ebp - 0xc0]
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x1e], 0
mov dword [ebp - 0x10], 5
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xa0]
movlps qword [ebp - 0x58], xmm0
movq xmm0, qword [ebp - 0xa8]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x24]
movq qword [ecx], xmm0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0xa8]
push eax
call fcn.004c9a10
add esp, 0x10
mov eax, dword [ebp - 0xa8]
cmp eax, 0x80000000
je 0x4d5320
test eax, eax
je 0x4d5320
push 1
push eax
push dword [ebp - 0xa4]
call fcn.00402cf0
add esp, 0xc
jmp 0x4d5320
push dword [ebp - 0x98]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov esi, dword [ebp - 0xac]
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
xor edx, edx
mov dword [ebp - 0x10], 0
test eax, eax
setne dl
cmove esi, eax
mov dword [ebp - 0x84], edx
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x64], esi
jmp 0x4d54b2
test eax, eax
je 0x4d54b2
push 1
push eax
push dword [ebp - 0x5c]
call fcn.00402cf0
add esp, 0xc
lea eax, [ebp - 0x84]
mov dword [ebp - 0x10], 0
push eax
call fcn.004c93a0
add esp, 4
mov edi, eax
test eax, eax
je 0x4d5662
cmp dword [edx], 0x80000000
mov esi, edx
jne 0x4d5500
push edi
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004c9c10
add esp, 0xc
mov eax, dword [ebp - 0x60]
cmp eax, 0x80000000
je 0x4d54b2
jmp 0x4d54a0
mov ecx, dword [edi + 8]
mov ebx, dword [edi + 4]
test ecx, ecx
mov dword [ebp - 0x24], ecx
je 0x4d5531
js 0x4d56c6
movzx eax, byte [0x5781b1]
push 1
push ecx
call fcn.00402ce0
mov ecx, dword [ebp - 0x24]
add esp, 8
test eax, eax
jne 0x4d5536
jmp 0x4d56b6
mov eax, 1
push ecx
push ebx
mov dword [ebp - 0x2c], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, byte [edi + 0xc]
mov ebx, dword [edi + 0x18]
mov dword [ebp - 0x28], esi
mov byte [ebp - 0x30], al
mov eax, dword [edi + 0x14]
test ebx, ebx
je 0x4d558b
cmp ebx, 0x40000000
mov dword [ebp - 0x44], eax
jae 0x4d56e7
movzx eax, byte [0x5781b1]
lea esi, [ebx + ebx]
push 2
push esi
call fcn.00402ce0
add esp, 8
test eax, eax
je 0x4d56d0
mov edi, eax
mov eax, dword [ebp - 0x44]
jmp 0x4d5592
mov edi, 2
xor esi, esi
push esi
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], eax
movzx eax, byte [ebp - 0x30]
mov byte [ebp - 0x54], al
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], ebx
mov ebx, dword [esi + 8]
mov eax, dword [esi + 4]
test ebx, ebx
je 0x4d55f2
mov dword [ebp - 0x24], eax
js 0x4d56a1
movzx eax, byte [0x5781b1]
push 1
push ebx
call fcn.00402ce0
add esp, 8
mov edi, eax
test eax, eax
mov eax, dword [ebp - 0x24]
jne 0x4d55f7
jmp 0x4d56f5
mov edi, 1
push ebx
push eax
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, byte [esi + 0xc]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x10], 2
mov byte [ebp - 0x34], al
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0xa8]
push eax
call fcn.004c9a10
add esp, 0x10
mov eax, dword [ebp - 0xa8]
cmp eax, 0x80000000
je 0x4d54b2
test eax, eax
je 0x4d54b2
push 1
push eax
push dword [ebp - 0xa4]
jmp 0x4d54aa
movsd xmm0, qword [ebp - 0x90]
mov ecx, dword [ebp - 0x88]
mov eax, dword [ebp + 8]
movsd qword [ebp - 0x84], xmm0
mov dword [ebp - 0x7c], ecx
mov dword [eax + 0xc], ecx
movsd qword [eax + 4], xmm0
mov dword [eax], 1
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0xb4
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 2
call fcn.004e3430
jmp 0x4d5767
push ecx
push 1
call fcn.00500210
add esp, 8
jmp 0x4d5767
call fcn.004e3430
jmp 0x4d5767
mov dword [ebp - 0x10], 3
push esi
push 2
call fcn.00500210
add esp, 8
jmp 0x4d5767
mov dword [ebp - 0x10], 3
call fcn.004e3430
jmp 0x4d5767
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x10], 2
push ebx
push 1
call fcn.00500210
add esp, 8
jmp 0x4d5767
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 0x60], 0
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x84], 0x5678d0
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], fcn.004cd980
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], 1
lea eax, [ebp - 0x84]
push 0x5678d8
push eax
call fcn.00500510
add esp, 8
ud2