Function at 0x46b900
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ad471
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x4dc6e0]
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 eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x44c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x448], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x454], eax
mov eax, dword [0x4ea1e8]
mov dword [ebp - 0x43c], ebx
mov dword [ebp - 0x444], ecx
test eax, eax
je 0x46bb56
push ecx
push 8
call eax
mov ebx, eax
mov dword [ebp - 0x43c], ebx
cmp ebx, 0xffffffff
je 0x46bb0f
lea eax, [ebp - 0x438]
mov dword [ebp - 0x438], 0x428
push eax
push ebx
call dword [0x4ea1fc]
test eax, eax
je 0x46bb08
mov edi, edi
push 4
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0x4b0030
push eax
call fcn.00491219
add esp, 0xc
test eax, eax
jne 0x46b9cc
lea eax, [ebp - 0x210]
jmp 0x46ba56
push 0xc
lea eax, [ebp - 0x218]
push 0x4c07b4
push eax
call fcn.004917b4
add esp, 0xc
test eax, eax
jne 0x46ba50
lea esi, [ebp - 0x218]
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x46b9f0
push 0
push 0
sub esi, ecx
push 0x4c07d0
sar esi, 1
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
inc eax
add esi, eax
mov dword [ebp - 0x440], esi
lea eax, [esi + esi]
push eax
call fcn.0048fb2f
add esp, 4
mov edi, eax
mov dword [ebp - 0x450], edi
push esi
push edi
push 0x4c07d0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x202]
push eax
push dword [ebp - 0x440]
push edi
call fcn.00493457
add esp, 0xc
jmp 0x46ba67
lea eax, [ebp - 0x218]
push eax
call fcn.0048faa4
mov edi, eax
add esp, 4
mov dword [ebp - 0x450], edi
mov eax, dword [0x4ea0a0]
test eax, eax
je 0x46bac1
push 0
push 0
push edi
call eax
mov ebx, eax
test ebx, ebx
je 0x46babb
lea ecx, [ebx*2 + 2]
push ecx
call fcn.0048fb2f
mov esi, eax
add esp, 4
mov dword [ebp - 0x458], esi
lea eax, [ebx + 1]
mov byte [ebp - 4], 1
push eax
push esi
push edi
call dword [0x4ea0a0]
push edi
call fcn.0048faf7
push 0
mov edi, esi
mov byte [ebp - 4], 0
call fcn.0048f453
add esp, 8
mov ebx, dword [ebp - 0x43c]
mov eax, dword [ebp - 0x444]
cmp dword [ebp - 0x430], eax
jne 0x46bae2
push edi
push dword [ebp - 0x44c]
call fcn.00491646
add esp, 8
test eax, eax
je 0x46bb2d
push edi
mov dword [ebp - 4], 0xffffffff
call fcn.0048f453
add esp, 4
lea eax, [ebp - 0x438]
push eax
push ebx
call dword [0x4ea200]
test eax, eax
jne 0x46b9a0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
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.0048fc6c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x448]
mov eax, dword [ebp - 0x424]
push edi
mov dword [ecx], eax
mov ecx, dword [ebp - 0x454]
mov eax, dword [ebp - 0x420]
mov dword [ecx], eax
call fcn.0048f453
add esp, 4
mov al, 1
jmp 0x46bb11
push 0x1c
lea eax, [ebp - 0x474]
mov dword [ebp - 0x474], 0
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x46bb0f
jmp 0x46bb80
cmp dword [ebp - 0x45c], 0x40000
jne 0x46bc53
lea eax, [ebp - 0x440]
push eax
push 0
push 0
push 2
push dword [ebp - 0x474]
push ebx
call dword [0x4ea06c]
cmp eax, 0xc0000004
jne 0x46bc53
mov edi, dword [ebp - 0x440]
push edi
call fcn.0048fb2f
mov esi, eax
add esp, 4
mov dword [ebp - 0x458], esi
lea eax, [ebp - 0x440]
mov dword [ebp - 4], 2
push eax
push edi
push esi
push 2
push dword [ebp - 0x474]
push ebx
call dword [0x4ea06c]
test eax, eax
jne 0x46bc43
movzx ebx, word [esi]
mov edi, dword [esi + 4]
shr ebx, 1
call fcn.004377a0
push eax
push ebx
push edi
lea ecx, [ebp - 0x444]
call fcn.00438a70
push dword [ebp - 0x44c]
mov edi, dword [ebp - 0x444]
push edi
call fcn.00491646
add esp, 8
add edi, 0xfffffff0
test eax, eax
je 0x46bc83
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x46bc3d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x43c]
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.0048f453
add esp, 4
mov eax, dword [ebp - 0x474]
lea ecx, [ebp - 0x474]
add eax, dword [ebp - 0x468]
push 0x1c
push ecx
push eax
push ebx
mov dword [ebp - 0x474], eax
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
jne 0x46bb80
jmp 0x46bb0f
mov ecx, dword [ebp - 0x448]
mov eax, dword [ebp - 0x474]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x454]
mov eax, dword [ebp - 0x468]
mov dword [ecx], eax
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x46bcb6
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
push esi
call fcn.0048f453
add esp, 4
mov al, 1
jmp 0x46bb11