Function at 0x46de50
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x3028]
mov eax, 0x3028
call fcn.004f8350
push 0xffffffffffffffff
push 0x513a48
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x544354]
xor eax, ebp
mov dword [ebp + 0x3024], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x3034]
mov eax, dword [ebp + 0x3030]
mov dword [ebp - 0x4c], ecx
xor ecx, ecx
mov word [ebp + 0x2024], cx
test eax, eax
je 0x46deda
cmp byte [ebp + 0x3038], cl
je 0x46dec8
push ecx
push 1
push 0x800
lea ecx, [ebp + 0x2024]
push ecx
push eax
call fcn.0047cb30
jmp 0x46deda
push 0x800
push eax
lea eax, [ebp + 0x2024]
push eax
call fcn.004947d0
lea ecx, [ebp]
call fcn.0046b040
mov dword [ebp - 4], 0
cmp word [ebp + 0x2024], 0
je 0x46df40
mov bl, byte [ebp + 0x303c]
lea eax, [ebp + 0x2024]
lea ecx, [ebp]
test bl, bl
je 0x46df0e
push eax
call fcn.0046bd70
jmp 0x46df16
push 0
push eax
call fcn.0046b720
test al, al
jne 0x46df47
test bl, bl
je 0x46df2a
push 6
mov ecx, 0x57f41c
call fcn.00466620
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.0046b080
xor al, al
jmp 0x46e332
mov dword [ebp + 0xc], 1
xor esi, esi
mov byte [ebp - 0x14], 0
push 0x1000
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
call fcn.004087e0
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x24]
push 0x1000
push ecx
lea ecx, [ebp]
call fcn.0046b9b0
test eax, eax
je 0x46dfba
nop
push eax
lea ecx, [ebp - 0x24]
add esi, eax
call fcn.004087e0
mov eax, dword [ebp - 0x24]
lea ecx, [ebp]
add eax, esi
push 0x1000
push eax
call fcn.0046b9b0
test eax, eax
jne 0x46df80
cmp esi, dword [ebp - 0x1c]
jbe 0x46dfba
mov eax, esi
lea ecx, [ebp - 0x24]
sub eax, dword [ebp - 0x20]
push eax
call fcn.004087e0
mov edi, dword [ebp - 0x20]
jmp 0x46dfbf
mov edi, esi
mov dword [ebp - 0x20], edi
mov ecx, dword [ebp - 0x24]
cmp esi, 2
jb 0x46dfdb
cmp byte [ecx], 0xff
jne 0x46dfdb
cmp byte [ecx + 1], 0xfe
jne 0x46dfdb
mov dword [ebp - 0x28], 1
jmp 0x46dfe0
xor eax, eax
mov dword [ebp - 0x28], eax
cmp esi, 2
jb 0x46dff7
cmp byte [ecx], 0xfe
jne 0x46dff7
cmp byte [ecx + 1], 0xff
mov dword [ebp - 0x40], 1
je 0x46dffe
mov dword [ebp - 0x40], 0
cmp esi, 3
jb 0x46e018
cmp byte [ecx], 0xef
jne 0x46e018
cmp byte [ecx + 1], 0xbb
jne 0x46e018
cmp byte [ecx + 2], 0xbf
mov byte [ebp - 0xd], 1
je 0x46e01c
mov byte [ebp - 0xd], 0
mov ebx, dword [ebp + 0x3040]
test ebx, ebx
jne 0x46e02f
push esi
push ecx
call fcn.0046dda0
mov ebx, eax
mov dword [ebp - 0x3c], 0
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov byte [ebp - 0x2c], cl
mov byte [ebp - 4], 2
test ebx, ebx
je 0x46e058
cmp ebx, 2
je 0x46e058
cmp ebx, 1
jne 0x46e0a0
push 1
lea ecx, [ebp - 0x24]
call fcn.004087e0
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
mov byte [edi + eax - 1], 0
cmp ebx, 2
jne 0x46e07a
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
test edi, edi
je 0x46e08c
push edi
lea ecx, [ebp - 0x3c]
call fcn.0040e4c0
mov esi, dword [ebp - 0x38]
jmp 0x46e091
mov esi, edi
mov dword [ebp - 0x38], esi
push esi
push dword [ebp - 0x3c]
push dword [ebp - 0x24]
call fcn.00497720
mov ecx, dword [ebp - 0x34]
cmp ebx, 3
jne 0x46e154
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x44], 2
test ebx, ebx
jne 0x46e0c4
cmp dword [ebp - 0x40], ebx
jne 0x46e0c4
xor eax, eax
mov dword [ebp - 0x44], eax
lea ebx, [eax + 1]
mov eax, edi
shr eax, 1
inc eax
cmp eax, ecx
jbe 0x46e0da
sub eax, esi
lea ecx, [ebp - 0x3c]
push eax
call fcn.0040e4c0
jmp 0x46e0dd
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
and edi, 0xfffffffe
mov dword [ebp - 0x48], edi
cmp eax, edi
jae 0x46e145
mov esi, dword [ebp - 0x24]
mov edx, edi
sub ebx, dword [ebp - 0x40]
sub edx, eax
dec edx
mov dword [ebp - 0x28], ebx
add esi, eax
shr edx, 1
add esi, dword [ebp - 0x40]
inc edx
mov eax, 0x100
xor edi, edi
jmp 0x46e110
movzx ecx, byte [ebx + esi]
lea esi, [esi + 2]
mov ebx, dword [ebp - 0x3c]
movzx eax, ax
imul ecx, eax
movzx eax, byte [esi - 2]
add cx, ax
mov eax, edi
shr eax, 1
add edi, 2
mov word [ebx + eax*2], cx
mov eax, 0x100
mov ebx, dword [ebp - 0x28]
sub edx, 1
jne 0x46e110
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
mov esi, dword [ebp - 0x3c]
sub edi, eax
shr edi, 1
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x46e1a3
cmp ebx, 4
jne 0x46e1a0
push 1
lea ecx, [ebp - 0x24]
call fcn.004087e0
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov byte [eax + ebx - 1], 0
cmp eax, dword [ebp - 0x34]
jbe 0x46e183
sub eax, esi
lea ecx, [ebp - 0x3c]
push eax
call fcn.0040e4c0
mov eax, dword [ebp - 0x38]
jmp 0x46e186
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x3c]
push eax
movzx eax, byte [ebp - 0xd]
neg eax
push esi
sbb eax, eax
and eax, 3
add eax, ebx
push eax
call fcn.00497840
jmp 0x46e1a6
mov esi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x24]
cmp word [esi], 0
mov edi, esi
je 0x46e2e2
mov bh, byte [ebp + 0x3044]
mov bl, byte [ebp + 0x304c]
mov edi, edi
xor ecx, ecx
mov esi, edi
cmp word [edi], 0xd
je 0x46e1fc
mov dl, byte [ebp + 0x3048]
movzx eax, word [esi]
cmp eax, 0xa
je 0x46e1fc
test ax, ax
je 0x46e1fc
test dl, dl
je 0x46e1f3
cmp eax, 0x2f
jne 0x46e1f3
cmp word [esi + 2], ax
jne 0x46e1f3
xor eax, eax
mov ecx, esi
mov word [esi], ax
add esi, 2
cmp word [esi], 0xd
jne 0x46e1d0
movzx eax, word [esi]
mov dword [ebp - 0x48], eax
xor eax, eax
mov word [esi], ax
test ecx, ecx
jne 0x46e20d
mov ecx, esi
lea eax, [ecx - 2]
cmp eax, edi
jb 0x46e22d
movzx ecx, word [eax]
cmp ecx, 0x20
je 0x46e221
cmp ecx, 9
jne 0x46e22d
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, edi
jae 0x46e214
test bh, bh
je 0x46e261
cmp word [edi], 0x22
jne 0x46e261
mov ecx, edi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46e240
sub ecx, edx
sar ecx, 1
cmp word [edi + ecx*2 - 2], 0x22
jne 0x46e261
xor eax, eax
mov word [edi + ecx*2 - 2], ax
add edi, 2
test bl, bl
je 0x46e2a5
cmp word [edi], 0x25
jne 0x46e2a5
xor eax, eax
mov word [ebp + 0x1024], ax
lea eax, [ebp + 0x1024]
push 0x800
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x46e2a5
cmp eax, 0x800
jae 0x46e2a5
cmp word [ebp + 0x1024], 0
je 0x46e2b4
lea eax, [ebp + 0x1024]
push eax
jmp 0x46e2ac
cmp word [edi], 0
je 0x46e2b4
push edi
mov ecx, dword [ebp - 0x4c]
call fcn.004948c0
cmp word [ebp - 0x48], 0
je 0x46e2dc
lea edi, [esi + 2]
mov edi, edi
movzx eax, word [edi]
cmp eax, 0xd
je 0x46e2cd
cmp eax, 0xa
jne 0x46e2d2
add edi, 2
jmp 0x46e2c0
cmp word [edi], 0
jne 0x46e1c0
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x3c]
mov byte [ebp - 4], 1
cmp byte [ebp - 0x2c], 0
je 0x46e2f8
mov eax, dword [ebp - 0x34]
add eax, eax
push eax
push esi
call fcn.00491e00
push esi
call fcn.004fe8b9
add esp, 4
mov byte [ebp - 4], 0
test ebx, ebx
je 0x46e321
cmp byte [ebp - 0x14], 0
je 0x46e318
push dword [ebp - 0x1c]
push ebx
call fcn.00491e00
push ebx
call fcn.004fe8b9
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.0046b080
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x3024]
xor ecx, ebp
call fcn.004f833c
lea esp, [ebp + 0x3028]
pop ebp
ret 0x20