Function at 0x50b160
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x522afe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x270
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x224], 0
mov word [ebp - 0x21c], 0
push 0x206
push 0
lea eax, [ebp - 0x21a]
push eax
call fcn.004b3d60
add esp, 0xc
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x10], 0
push 1
lea ecx, [ebp - 0x22c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040b4a0
mov dword [ebp - 0x254], eax
push 0x53b734
mov edx, dword [ebp - 0x254]
push edx
call fcn.0040b5c0
add esp, 8
mov byte [ebp - 0x225], al
lea ecx, [ebp - 0x22c]
call fcn.0040c650
movzx eax, byte [ebp - 0x225]
test eax, eax
je 0x50b43d
push 0x53b738
call fcn.004b477a
add esp, 4
mov dword [ebp - 0x220], eax
push 0x53b744
call fcn.004b477a
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x220]
push ecx
lea edx, [ebp - 0x234]
push edx
mov ecx, dword [ebp + 8]
call fcn.0040b4a0
mov dword [ebp - 0x258], eax
push str.___
mov eax, dword [ebp - 0x258]
push eax
call fcn.0040b5c0
add esp, 8
mov byte [ebp - 0x22d], al
lea ecx, [ebp - 0x234]
call fcn.0040c650
movzx ecx, byte [ebp - 0x22d]
test ecx, ecx
je 0x50b2d5
mov ecx, dword [ebp + 8]
call fcn.0040c690
sub eax, dword [ebp - 0x220]
push eax
lea edx, [ebp - 0x238]
push edx
mov ecx, dword [ebp + 8]
call fcn.0040b410
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x260], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x260]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00408510
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x238]
call fcn.0040c650
jmp 0x50b40a
mov edx, dword [ebp - 0x10]
push edx
lea eax, [ebp - 0x240]
push eax
mov ecx, dword [ebp + 8]
call fcn.0040b4a0
mov dword [ebp - 0x264], eax
push str.SystemRoot_
mov ecx, dword [ebp - 0x264]
push ecx
call fcn.0040b5c0
add esp, 8
mov byte [ebp - 0x239], al
lea ecx, [ebp - 0x240]
call fcn.0040c650
movzx edx, byte [ebp - 0x239]
test edx, edx
je 0x50b40a
push 0x104
lea eax, [ebp - 0x21c]
push eax
push str._SystemRoot_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [ebp + 8]
call fcn.0040c690
sub eax, dword [ebp - 0x10]
add eax, 1
push eax
lea ecx, [ebp - 0x244]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040b410
mov dword [ebp - 0x268], eax
mov edx, dword [ebp - 0x268]
mov dword [ebp - 0x26c], edx
mov dword [ebp - 4], 1
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x248]
call fcn.0040a960
mov dword [ebp - 0x270], eax
mov ecx, dword [ebp - 0x270]
mov dword [ebp - 0x274], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x26c]
push edx
mov eax, dword [ebp - 0x274]
push eax
lea ecx, [ebp - 0x24c]
push ecx
call fcn.0040b520
add esp, 0xc
mov dword [ebp - 0x278], eax
mov edx, dword [ebp - 0x278]
mov dword [ebp - 0x27c], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x27c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00408510
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x24c]
call fcn.0040c650
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x248]
call fcn.0040c650
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x244]
call fcn.0040c650
mov ecx, dword [ebp + 8]
call fcn.0040c690
cmp eax, 3
jg 0x50b421
mov ecx, dword [ebp + 8]
call fcn.0040a8f0
jmp 0x50b447
push 1
mov ecx, dword [ebp + 8]
call fcn.0042e800
movzx ecx, ax
cmp ecx, 0x3a
je 0x50b43d
mov ecx, dword [ebp + 8]
call fcn.0040a8f0
jmp 0x50b447
mov dword [ebp - 0x224], 1
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 4