Function at 0x46be80
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa24
mov eax, dword [0x4ee1f0]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x4b9120
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
mov dword [ebp - 0x20c], eax
cmp dword [ebp - 0x20c], 0
je 0x46bebb
mov eax, dword [ebp - 0x20c]
jmp 0x46c395
movsx eax, byte [0x4eaa9c]
test eax, eax
je 0x46bf2c
mov dword [ebp - 0x20c], 0x4eaa9c
mov ecx, dword [ebp - 0x20c]
push ecx
call fcn.004731b0
add esp, 4
test eax, eax
jne 0x46bf21
mov edx, dword [ebp - 0x20c]
push edx
call fcn.00473340
add esp, 4
test eax, eax
je 0x46bf21
mov eax, dword [ebp - 0x20c]
push eax
push 0x4b912c
lea ecx, [ebp - 0x818]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x818]
push edx
call fcn.004725e0
add esp, 4
mov eax, dword [ebp - 0x20c]
jmp 0x46c395
push 0x200
lea eax, [ebp - 0x208]
push eax
push str._WNCZONE_workzone.num
call fcn.00468c10
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x46bf61
push str.WNCZONE_is_not_defined_n
call fcn.004725e0
add esp, 4
lea ecx, [ebp - 0x208]
push ecx
call fcn.00473080
add esp, 4
test eax, eax
jne 0x46bf7e
mov dword [ebp - 0x214], 0xffffffeb
mov dword [ebp - 0x210], 0
cmp dword [ebp - 0x214], 0
jne 0x46c0c3
push 0x4b9170
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 0x81c], eax
cmp dword [ebp - 0x81c], 0
jne 0x46bfe4
lea eax, [ebp - 0x208]
push eax
push str.Error_opening_file__s_for_read_access_n
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x418]
push edx
call fcn.004725e0
add esp, 4
mov eax, dword [ebp - 0x81c]
push eax
push 0x50
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.MSVCR100.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x46c03c
mov edx, dword [ebp - 0x81c]
push edx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea eax, [ebp - 0x208]
push eax
push str.Error_reading_file__s_n
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x418]
push edx
call fcn.004725e0
add esp, 4
mov eax, dword [ebp - 0x81c]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea ecx, [ebp - 0x418]
push ecx
call sub.MSVCR100.dll_strlen
add esp, 4
lea edx, [ebp + eax - 0x419]
mov dword [ebp - 0x210], edx
jmp 0x46c079
mov eax, dword [ebp - 0x210]
sub eax, 1
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp - 0x210]
lea edx, [ebp - 0x418]
cmp ecx, edx
jb 0x46c0a6
mov eax, dword [ebp - 0x210]
movsx ecx, byte [eax]
cmp ecx, 0x20
jg 0x46c0a6
mov edx, dword [ebp - 0x210]
movsx eax, byte [edx]
test eax, eax
jl 0x46c0a6
jmp 0x46c06a
mov ecx, dword [ebp - 0x210]
add ecx, 1
mov dword [ebp - 0x210], ecx
mov edx, dword [ebp - 0x210]
mov byte [edx], 0
jmp 0x46c306
push 0x200
lea eax, [ebp - 0xa20]
push eax
push str._WNCCONF_workzone.num
call fcn.00468c10
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x46c152
mov ecx, dword [ebp - 0x214]
push ecx
lea edx, [ebp - 0xa20]
push edx
push str._s_expansion_error_:__d
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x418]
push ecx
call fcn.004725a0
add esp, 4
push 0x200
lea edx, [ebp - 0xa20]
push edx
push str._WNCHOME_client_wncconf_workzone.num
call fcn.00468c10
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x46c152
push str.WNCHOME_is_not_defined_n
call fcn.004725e0
add esp, 4
push 0x4b922c
lea eax, [ebp - 0xa20]
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 0x820], eax
cmp dword [ebp - 0x820], 0
jne 0x46c1a1
lea ecx, [ebp - 0xa20]
push ecx
push str.Error_opening__s_file_n
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
call fcn.004725e0
add esp, 4
mov ecx, dword [ebp - 0x820]
push ecx
push 0x50
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.MSVCR100.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x46c1f9
mov eax, dword [ebp - 0x820]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea ecx, [ebp - 0xa20]
push ecx
push str.Error_reading__s_file_n
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
call fcn.004725e0
add esp, 4
lea ecx, [ebp - 0xa24]
push ecx
push 0x4b9268
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.MSVCR100.dll_sscanf]
add esp, 0xc
cmp eax, 1
je 0x46c224
mov dword [ebp - 0xa24], 0
mov eax, dword [ebp - 0xa24]
add eax, 1
mov dword [ebp - 0xa24], eax
mov ecx, dword [ebp - 0xa24]
push ecx
push str._08x
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
mov eax, dword [ebp - 0x820]
push eax
call dword [sym.imp.MSVCR100.dll_rewind]
add esp, 4
lea ecx, [ebp - 0x418]
push ecx
push 0x4b9274
mov edx, dword [ebp - 0x820]
push edx
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
mov eax, dword [ebp - 0x820]
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
push 0x4b9278
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 0x820], eax
cmp dword [ebp - 0x820], 0
jne 0x46c2da
lea edx, [ebp - 0x208]
push edx
push str.Error_creating__s_file_n
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x418]
push ecx
call fcn.004725e0
add esp, 4
lea edx, [ebp - 0x418]
push edx
push 0x4b9298
mov eax, dword [ebp - 0x820]
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
mov ecx, dword [ebp - 0x820]
push ecx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
lea edx, [ebp - 0x418]
push edx
push str._WNCTMP__s
push 0x4eaa9c
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
push 0x20c
push 0x4eaa9c
call fcn.00468c50
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x46c345
xor eax, eax
jmp 0x46c395
push 0x4eaa9c
call fcn.004731b0
add esp, 4
test eax, eax
jne 0x46c390
push 0x4eaa9c
call fcn.00473340
add esp, 4
test eax, eax
je 0x46c390
push 0x4eaa9c
push str.Could_not_create_temporary_directory__s
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x418]
push ecx
call fcn.004725e0
add esp, 4
mov eax, 0x4eaa9c
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048ca5e
mov esp, ebp
pop ebp
ret