Function at 0x46abf0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x814
mov eax, dword [0x5c04b4]
xor eax, esp
mov dword [esp + 0x810], eax
push ebx
push esi
mov esi, ecx
mov dword [esp + 8], 0x19
push edi
lea edi, [esi + 0x94cc]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x94c4], 0
je 0x46b005
mov ebx, dword [esi + 0x94c4]
push edi
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test byte [ebx + 4], 2
je 0x46af37
cmp byte [esi + 0x223e], 0
je 0x46af37
mov eax, dword [esp + 0x10]
mov ebx, dword [esi + 0x224d]
mov eax, dword [eax]
dec eax
je 0x46ac79
dec eax
je 0x46ac72
mov eax, 0xf000002
jmp 0x46ac7e
mov eax, 0xf000004
jmp 0x46ac7e
mov eax, 0xf000003
lea ecx, [esp + 0x14]
push ecx
push 0x100
lea ecx, [esp + 0x620]
push ecx
push eax
call fcn.0046f310
push 0
mov edx, 0x100
lea ecx, [esp + 0x61c]
call fcn.0050c7b0
mov edi, dword [esi + 0x2245]
lea eax, [esp + 0x21c]
add esp, 4
push 0x100
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x100
jbe 0x46ad21
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46acd2
sub ecx, edx
lea eax, [esp + 0x218]
sar ecx, 1
cmp ecx, 0x100
jae 0x46ad02
push edi
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x46ad21
push 0xff
push edi
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [esp + 0x416], ax
mov edi, dword [esi + 0x2249]
lea eax, [esp + 0x418]
push 0x100
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x100
jbe 0x46ad98
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46ad47
sub ecx, edx
lea eax, [esp + 0x418]
sar ecx, 1
cmp ecx, 0x100
jae 0x46ad79
push edi
mov edi, dword [sym.imp.MSVCR120.dll_wcscpy_s]
push 0x100
push eax
call edi
add esp, 0xc
jmp 0x46ad9e
push 0xff
push edi
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [esp + 0x616], ax
mov edi, dword [sym.imp.MSVCR120.dll_wcscpy_s]
push 0x100
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x100
jbe 0x46ae08
mov ecx, ebx
lea edx, [ecx + 2]
jmp 0x46adc0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46adc0
sub ecx, edx
lea eax, [esp + 0x18]
sar ecx, 1
cmp ecx, 0x100
jae 0x46ade9
push ebx
push 0x100
push eax
call edi
add esp, 0xc
jmp 0x46ae08
push 0xff
push ebx
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [esp + 0x216], ax
lea ebx, [esp + 0x218]
mov eax, ebx
push 0x5b
push eax
call dword [sym.imp.MSVCR120.dll_wcschr]
mov edi, eax
mov eax, ebx
push 0x5d
push eax
call dword [sym.imp.MSVCR120.dll_wcschr]
add esp, 0x10
test eax, eax
je 0x46ae43
test edi, edi
je 0x46ae43
cmp edi, eax
jae 0x46ae43
xor ecx, ecx
lea ebx, [edi + 2]
mov word [eax], cx
lea edi, [eax + 2]
jmp 0x46ae6c
lea eax, [esp + 0x218]
push 0x3a
push eax
call dword [sym.imp.MSVCR120.dll_wcschr]
mov edi, eax
lea eax, [esp + 0x220]
push 0x3a
push eax
call dword [sym.imp.MSVCR120.dll_wcsrchr]
add esp, 0x10
cmp edi, eax
jne 0x46ae99
test edi, edi
je 0x46ae99
lea eax, [edi + 2]
push eax
call dword [sym.imp.MSVCR120.dll__wtoi]
mov edx, eax
add esp, 4
mov dword [esp + 0xc], edx
test edx, edx
jne 0x46ae92
mov edx, 0x19
mov dword [esp + 0xc], edx
jmp 0x46ae9d
xor eax, eax
mov word [edi], ax
jmp 0x46ae9d
mov edx, dword [esp + 0xc]
xor ecx, ecx
cmp byte [esi + 0x2259], cl
je 0x46aeac
mov ecx, 1
xor eax, eax
cmp byte [esi + 0x223f], al
je 0x46aebb
mov eax, 1
cmp byte [esi + 0x2243], 0
je 0x46aec7
or eax, 0x10
cmp byte [esi + 0x2241], 0
je 0x46aed3
or eax, 4
cmp byte [esi + 0x2242], 0
je 0x46aedf
or eax, 8
cmp byte [esi + 0x2240], 0
je 0x46aeeb
or eax, 2
cmp byte [esi + 0x2244], 0
je 0x46aef7
or eax, 0x20
push ecx
push edx
push dword [esi + 0x2255]
lea edx, [esp + 0x424]
push dword [esi + 0x2251]
push ecx
push eax
mov eax, dword [esp + 0x28]
mov ecx, ebx
add eax, 0xc
push eax
lea eax, [esp + 0x634]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0050fe30
mov ebx, dword [esp + 0x34]
lea edi, [esi + 0x94cc]
add esp, 0x24
test byte [ebx + 4], 1
je 0x46afde
cmp byte [esi + 0x225a], 0
je 0x46afde
mov edi, dword [esi + 0x225b]
lea eax, [esp + 0x18]
push 0x100
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x100
jbe 0x46afbd
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46af71
sub ecx, edx
lea eax, [esp + 0x18]
sar ecx, 1
cmp ecx, 0x100
jae 0x46af9e
push edi
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
jmp 0x46afbd
push 0xff
push edi
push 0x100
push eax
call dword [sym.imp.MSVCR120.dll_wcsncpy_s]
add esp, 0x10
xor eax, eax
mov word [esp + 0x216], ax
mov eax, dword [esi + 0x94f0]
lea edx, [ebx + 0xc]
not eax
lea ecx, [esp + 0x18]
and eax, 1
push eax
call fcn.005113b0
add esp, 4
lea edi, [esi + 0x94cc]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 8]
push ebx
mov dword [esi + 0x94c4], eax
call dword [sym.imp.MSVCR120.dll_free]
add esp, 4
cmp dword [esi + 0x94c4], 0
jne 0x46ac31
push dword [esi + 0x94c8]
call dword [0x5c001c]
push edi
mov dword [esi + 0x94c8], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x81c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00553510
mov esp, ebp
pop ebp
ret