Function at 0x4be120
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576f54
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x5c8910]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2b4], ecx
mov edi, dword [ebp + 8]
xor eax, eax
mov esi, dword [ebp + 0xc]
mov ecx, edi
mov dword [ebp - 4], 0
push 0xffffffffffffffff
mov dword [ebp - 0x2b8], 0
push eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
push esi
mov dword [ebp - 0x2bc], edi
mov word [edi], ax
call fcn.0040759d
lea eax, [ebp - 0x2a8]
mov dword [ebp - 4], 0
push esi
push eax
mov dword [ebp - 0x2b8], 1
call fcn.004beab0
add esp, 8
xor ebx, ebx
mov dword [ebp - 4], 1
mov dword [ebp - 0x2ac], ebx
nop
xor eax, eax
mov dword [ebp - 0x264], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
call fcn.0040759d
mov byte [ebp - 4], 2
xor ecx, ecx
mov eax, dword [ebx*4 + 0x59ea30]
mov ebx, 7
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], cx
mov dword [ebp - 0x2b0], eax
cmp word [eax], cx
jne 0x4be224
xor esi, esi
jmp 0x4be23f
mov esi, eax
lea ecx, [esi + 2]
lea esp, [esp]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4be230
sub esi, ecx
sar esi, 1
cmp esi, 0x7ffffffe
ja 0x4be5ce
cmp esi, ebx
jbe 0x4be265
push 0
push esi
lea ecx, [ebp - 0x230]
call fcn.00407445
mov ebx, dword [ebp - 0x21c]
jmp 0x4be278
test esi, esi
jne 0x4be27a
xor eax, eax
mov dword [ebp - 0x220], esi
mov word [ebp - 0x230], ax
test esi, esi
setne al
test al, al
je 0x4be2ce
mov ecx, dword [ebp - 0x230]
lea edx, [ebp - 0x230]
cmp ebx, 8
cmovae edx, ecx
test esi, esi
je 0x4be2b6
lea eax, [esi + esi]
push eax
push dword [ebp - 0x2b0]
push edx
call fcn.005382c0
mov ebx, dword [ebp - 0x21c]
add esp, 0xc
mov ecx, dword [ebp - 0x230]
cmp ebx, 8
mov dword [ebp - 0x220], esi
lea eax, [ebp - 0x230]
cmovae eax, ecx
xor ecx, ecx
mov word [eax + esi*2], cx
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.004beab0
add esp, 8
mov byte [ebp - 4], 5
cmp dword [ebp - 0x21c], 8
jb 0x4be303
push dword [ebp - 0x230]
call fcn.005363a4
add esp, 4
push dword [ebp - 0x250]
xor eax, eax
mov dword [ebp - 0x21c], 7
cmp dword [ebp - 0x24c], 8
lea ecx, [ebp - 0x2a8]
mov word [ebp - 0x230], ax
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push 0
push eax
mov dword [ebp - 0x220], 0
call fcn.0043b15d
mov ebx, dword [ebp - 0x2ac]
cmp eax, 0xffffffff
je 0x4be4ad
mov eax, dword [ebx*4 + 0x59ea30]
xor edx, edx
mov ecx, 7
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], ecx
mov word [ebp - 0x248], dx
mov dword [ebp - 0x2b0], eax
cmp word [eax], dx
jne 0x4be38b
xor esi, esi
jmp 0x4be39f
mov esi, eax
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4be390
sub esi, edx
sar esi, 1
cmp esi, 0x7ffffffe
ja 0x4be5ce
cmp esi, ecx
jbe 0x4be3c5
push 0
push esi
lea ecx, [ebp - 0x248]
call fcn.00407445
mov ecx, dword [ebp - 0x234]
jmp 0x4be3d8
test esi, esi
jne 0x4be3da
xor eax, eax
mov dword [ebp - 0x238], esi
mov word [ebp - 0x248], ax
test esi, esi
setne al
test al, al
je 0x4be434
mov edx, dword [ebp - 0x248]
lea ebx, [ebp - 0x248]
cmp ecx, 8
cmovae ebx, edx
test esi, esi
je 0x4be416
lea eax, [esi + esi]
push eax
push dword [ebp - 0x2b0]
push ebx
call fcn.005382c0
mov ecx, dword [ebp - 0x234]
add esp, 0xc
mov edx, dword [ebp - 0x248]
mov ebx, dword [ebp - 0x2ac]
lea eax, [ebp - 0x248]
cmp ecx, 8
mov dword [ebp - 0x238], esi
cmovae eax, edx
xor ecx, ecx
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x2b4]
lea eax, [ebp - 0x290]
push 0
push ebx
push eax
mov byte [ebp - 4], 6
call fcn.004bd6e0
push eax
lea edx, [ebp - 0x248]
mov byte [ebp - 4], 7
mov ecx, edi
call fcn.004be960
add esp, 4
cmp dword [ebp - 0x27c], 8
jb 0x4be479
push dword [ebp - 0x290]
call fcn.005363a4
add esp, 4
xor eax, eax
mov dword [ebp - 0x27c], 7
cmp dword [ebp - 0x234], 8
mov dword [ebp - 0x280], 0
mov word [ebp - 0x290], ax
jb 0x4be4ad
push dword [ebp - 0x248]
call fcn.005363a4
add esp, 4
cmp dword [ebp - 0x24c], 8
jb 0x4be4c4
push dword [ebp - 0x260]
call fcn.005363a4
add esp, 4
xor eax, eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x264], 8
mov dword [ebp - 0x24c], 7
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
jb 0x4be4fc
push dword [ebp - 0x278]
call fcn.005363a4
add esp, 4
inc ebx
mov dword [ebp - 0x2ac], ebx
cmp ebx, 0x15
jl 0x4be1c0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00538910
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x4be534
mov eax, dword [edi]
jmp 0x4be536
mov eax, edi
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp word [ebp - 0x218], 0
jne 0x4be557
xor esi, esi
jmp 0x4be56f
lea esi, [ebp - 0x218]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4be560
sub esi, ecx
sar esi, 1
mov ecx, dword [edi + 0x14]
cmp ecx, 8
jb 0x4be57b
mov eax, dword [edi]
jmp 0x4be57d
mov eax, edi
lea edx, [ebp - 0x218]
cmp edx, eax
jb 0x4be5c6
cmp ecx, 8
jb 0x4be590
mov edx, dword [edi]
jmp 0x4be592
mov edx, edi
mov eax, dword [edi + 0x10]
lea eax, [edx + eax*2]
lea edx, [ebp - 0x218]
cmp eax, edx
jbe 0x4be5c6
cmp ecx, 8
jb 0x4be5ab
mov ecx, dword [edi]
jmp 0x4be5ad
mov ecx, edi
lea eax, [ebp - 0x218]
sub eax, ecx
mov ecx, edi
push esi
sar eax, 1
push eax
push edi
call fcn.0040759d
jmp 0x4be642
cmp esi, 0x7ffffffe
jbe 0x4be5d8
push str.string_too_long
call fcn.0051b664
cmp ecx, esi
jae 0x4be5f5
push dword [edi + 0x10]
mov ecx, edi
push esi
call fcn.00407445
test esi, esi
je 0x4be642
cmp dword [edi + 0x14], 8
jb 0x4be613
mov ecx, dword [edi]
jmp 0x4be615
test esi, esi
jne 0x4be5eb
mov dword [edi + 0x10], esi
cmp ecx, 8
jb 0x4be60a
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
jmp 0x4be642
mov eax, edi
xor ecx, ecx
mov word [eax], cx
jmp 0x4be642
mov ecx, edi
test esi, esi
je 0x4be62d
lea eax, [esi + esi]
push eax
lea eax, [ebp - 0x218]
push eax
push ecx
call fcn.005382c0
add esp, 0xc
cmp dword [edi + 0x14], 8
mov dword [edi + 0x10], esi
jb 0x4be63a
mov eax, dword [edi]
jmp 0x4be63c
mov eax, edi
xor ecx, ecx
mov word [eax + esi*2], cx
cmp dword [ebp + 0x10], 0
je 0x4be651
mov dl, 1
mov ecx, edi
call fcn.0043ec18
cmp dword [ebp - 0x294], 8
jb 0x4be668
push dword [ebp - 0x2a8]
call fcn.005363a4
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053bd6c
mov esp, ebp
pop ebp
ret 0xc