Function at 0x409660
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9a4
mov eax, dword [0x48f400]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x483f30
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 0x20c], eax
cmp dword [ebp - 0x20c], 0
je 0x40969b
mov eax, dword [ebp - 0x20c]
jmp 0x409b6b
movsx eax, byte [0x48e6e4]
test eax, eax
je 0x40970c
mov dword [ebp - 0x20c], 0x48e6e4
mov ecx, dword [ebp - 0x20c]
push ecx
call fcn.0040d2a0
add esp, 4
test eax, eax
jne 0x409701
mov edx, dword [ebp - 0x20c]
push edx
call fcn.0040d430
add esp, 4
test eax, eax
je 0x409701
mov eax, dword [ebp - 0x20c]
push eax
push 0x483f3c
lea ecx, [ebp - 0x798]
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x798]
push edx
call fcn.0040c4a0
add esp, 4
mov eax, dword [ebp - 0x20c]
jmp 0x409b6b
push 0x200
lea eax, [ebp - 0x208]
push eax
push str._WNCZONE_workzone.num
call fcn.00406650
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x409741
push str.WNCZONE_is_not_defined_n
call fcn.0040c4a0
add esp, 4
lea ecx, [ebp - 0x208]
push ecx
call fcn.0040d190
add esp, 4
test eax, eax
jne 0x40975e
mov dword [ebp - 0x214], 0xffffffeb
cmp dword [ebp - 0x214], 0
jne 0x409899
push 0x483f80
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
mov dword [ebp - 0x79c], eax
cmp dword [ebp - 0x79c], 0
jne 0x4097ba
lea eax, [ebp - 0x208]
push eax
push str.Error_opening_file__s_for_read_access_n
lea ecx, [ebp - 0x398]
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x398]
push edx
call fcn.0040c4a0
add esp, 4
mov eax, dword [ebp - 0x79c]
push eax
push 0x50
lea ecx, [ebp - 0x398]
push ecx
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x409812
mov edx, dword [ebp - 0x79c]
push edx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea eax, [ebp - 0x208]
push eax
push str.Error_reading_file__s_n
lea ecx, [ebp - 0x398]
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x398]
push edx
call fcn.0040c4a0
add esp, 4
mov eax, dword [ebp - 0x79c]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea ecx, [ebp - 0x398]
push ecx
call sub.MSVCR90.dll_strlen
add esp, 4
lea edx, [ebp + eax - 0x399]
mov dword [ebp - 0x210], edx
jmp 0x40984f
mov eax, dword [ebp - 0x210]
sub eax, 1
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp - 0x210]
lea edx, [ebp - 0x398]
cmp ecx, edx
jb 0x40987c
mov eax, dword [ebp - 0x210]
movsx ecx, byte [eax]
cmp ecx, 0x20
jg 0x40987c
mov edx, dword [ebp - 0x210]
movsx eax, byte [edx]
test eax, eax
jl 0x40987c
jmp 0x409840
mov ecx, dword [ebp - 0x210]
add ecx, 1
mov dword [ebp - 0x210], ecx
mov edx, dword [ebp - 0x210]
mov byte [edx], 0
jmp 0x409adc
push 0x200
lea eax, [ebp - 0x9a0]
push eax
push str._WNCCONF_workzone.num
call fcn.00406650
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x409928
mov ecx, dword [ebp - 0x214]
push ecx
lea edx, [ebp - 0x9a0]
push edx
push str._s_expansion_error_:__d
lea eax, [ebp - 0x398]
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x398]
push ecx
call fcn.0040c460
add esp, 4
push 0x200
lea edx, [ebp - 0x9a0]
push edx
push str._WNCHOME_client_wncconf_workzone.num
call fcn.00406650
add esp, 0xc
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x409928
push str.WNCHOME_is_not_defined_n
call fcn.0040c4a0
add esp, 4
push 0x48403c
lea eax, [ebp - 0x9a0]
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
mov dword [ebp - 0x7a0], eax
cmp dword [ebp - 0x7a0], 0
jne 0x409977
lea ecx, [ebp - 0x9a0]
push ecx
push str.Error_opening__s_file_n
lea edx, [ebp - 0x398]
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x398]
push eax
call fcn.0040c4a0
add esp, 4
mov ecx, dword [ebp - 0x7a0]
push ecx
push 0x50
lea edx, [ebp - 0x398]
push edx
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x4099cf
mov eax, dword [ebp - 0x7a0]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea ecx, [ebp - 0x9a0]
push ecx
push str.Error_reading__s_file_n
lea edx, [ebp - 0x398]
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x398]
push eax
call fcn.0040c4a0
add esp, 4
lea ecx, [ebp - 0x9a4]
push ecx
push 0x484078
lea edx, [ebp - 0x398]
push edx
call dword [sym.imp.MSVCR90.dll_sscanf]
add esp, 0xc
cmp eax, 1
je 0x4099fa
mov dword [ebp - 0x9a4], 0
mov eax, dword [ebp - 0x9a4]
add eax, 1
mov dword [ebp - 0x9a4], eax
mov ecx, dword [ebp - 0x9a4]
push ecx
push str._08x
lea edx, [ebp - 0x398]
push edx
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
mov eax, dword [ebp - 0x7a0]
push eax
call dword [sym.imp.MSVCR90.dll_rewind]
add esp, 4
lea ecx, [ebp - 0x398]
push ecx
push 0x484084
mov edx, dword [ebp - 0x7a0]
push edx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
mov eax, dword [ebp - 0x7a0]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
push 0x484088
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
mov dword [ebp - 0x7a0], eax
cmp dword [ebp - 0x7a0], 0
jne 0x409ab0
lea edx, [ebp - 0x208]
push edx
push str.Error_creating__s_file_n
lea eax, [ebp - 0x398]
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x398]
push ecx
call fcn.0040c4a0
add esp, 4
lea edx, [ebp - 0x398]
push edx
push 0x4840a8
mov eax, dword [ebp - 0x7a0]
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
mov ecx, dword [ebp - 0x7a0]
push ecx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea edx, [ebp - 0x398]
push edx
push str._WNCTMP__s
push 0x48e6e4
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
push 0x18c
push 0x48e6e4
call fcn.00406690
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
je 0x409b1b
xor eax, eax
jmp 0x409b6b
push 0x48e6e4
call fcn.0040d2a0
add esp, 4
test eax, eax
jne 0x409b66
push 0x48e6e4
call fcn.0040d430
add esp, 4
test eax, eax
je 0x409b66
push 0x48e6e4
push str.Could_not_create_temporary_directory__s
lea eax, [ebp - 0x398]
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x398]
push ecx
call fcn.0040c4a0
add esp, 4
mov eax, 0x48e6e4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042809b
mov esp, ebp
pop ebp
ret