Function at 0x401da0
Capabilities:
Set environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
mov eax, dword [0x420d40]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x8001
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x421688
push 0x4207f0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x421689
push str.LINK
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
cmp dword [ebp + 8], 1
jle case.0x401e43.1
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
movsx eax, byte [edx]
cmp eax, 0x2d
jne case.0x401e43.1
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
movsx ecx, byte [eax + 1]
mov dword [ebp - 0x13c], ecx
mov edx, dword [ebp - 0x13c]
sub edx, 0x4c
mov dword [ebp - 0x13c], edx
cmp dword [ebp - 0x13c], 0x27
ja case.0x401e43.1
mov eax, dword [ebp - 0x13c]
movzx ecx, byte [eax + 0x4022d8]
jmp dword [ecx*4 + 0x4022b8]
cmp dword [ebp + 8], 3
je 0x401eae
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.usage:__s__c__compiler_option__nTests_for_whether_cl.exe_supports_an_option_nexitcodes:_0__no__1__yes__2__error_n
push 0x12b
lea eax, [ebp - 0x130]
push eax
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0x130]
push eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
mov ecx, 4
shl ecx, 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
call section..text
add esp, 4
jmp 0x4022a9
cmp dword [ebp + 8], 3
jge 0x401f2d
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
push str.usage:__s__l__linker_option____mandatory_option__...__nTests_for_whether_link.exe_supports_an_option_nexitcodes:_0__no__1__yes__2__error_n
push 0x12b
lea edx, [ebp - 0x130]
push edx
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x134]
push ecx
lea edx, [ebp - 0x130]
push edx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
mov eax, dword [ebp + 8]
sub eax, 2
push eax
mov ecx, 4
shl ecx, 1
add ecx, dword [ebp + 0xc]
push ecx
call fcn.004013c0
add esp, 8
jmp 0x4022a9
cmp dword [ebp + 8], 2
jne 0x401fb2
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.usage:__s__f__string___substring__nFind_a_substring_within_another_nexitcodes:_0__no__1__yes__2__error_n
push 0x12b
lea eax, [ebp - 0x130]
push eax
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0x130]
push eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
cmp dword [ebp + 8], 3
jne 0x401fc1
xor eax, eax
jmp 0x4022a9
mov ecx, 4
imul edx, ecx, 3
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
mov edx, 4
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
call fcn.004017d0
add esp, 8
jmp 0x4022a9
cmp dword [ebp + 8], 2
jne 0x40204f
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.usage:__s__s__substitutions_file___file__nPerform_a_set_of_string_map_type_substutitions_on_a_file_nexitcodes:_0_n
push 0x12b
lea eax, [ebp - 0x130]
push eax
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0x130]
push eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
mov ecx, 4
imul edx, ecx, 3
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
mov edx, 4
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
call fcn.00401800
add esp, 8
jmp 0x4022a9
cmp dword [ebp + 8], 4
je 0x4020da
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.usage:__s__V_filename_matchstring_nExtract_a_version_from_a_file:_neg:_pkgIndex.tcl__package_ifneeded_http_
push 0x12b
lea eax, [ebp - 0x130]
push eax
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0x130]
push eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
jmp 0x4022a9
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
movsx ecx, byte [eax + 2]
sub ecx, 0x30
push ecx
mov edx, 4
imul eax, edx, 3
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
mov eax, 4
shl eax, 1
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.00401bd0
add esp, 0xc
mov dword [ebp - 0x140], eax
cmp dword [ebp - 0x140], 0
je 0x40214e
mov eax, dword [ebp - 0x140]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40214e
mov edx, dword [ebp - 0x140]
push edx
push 0x420a54
call fcn.004026c0
add esp, 8
xor eax, eax
jmp 0x4022a9
mov eax, 1
jmp 0x4022a9
cmp dword [ebp + 8], 3
je 0x4021bc
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
push str.usage:__s__Q_path_nEmit_the_fully_qualified_path_nexitcodes:_0__no__1__yes__2__error_n
push 0x12b
lea ecx, [ebp - 0x130]
push ecx
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea edx, [ebp - 0x138]
push edx
mov eax, dword [ebp - 0x134]
push eax
lea ecx, [ebp - 0x130]
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
mov edx, 4
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
call fcn.00401b30
add esp, 4
jmp 0x4022a9
cmp dword [ebp + 8], 3
je 0x402238
mov edx, 4
imul eax, edx, 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
push str.usage:__s__L_keypath_nEmit_the_fully_qualified_path_of_directory_containing_keypath_nexitcodes:_0__success__1__not_found__2__error_n
push 0x12b
lea eax, [ebp - 0x130]
push eax
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea ecx, [ebp - 0x138]
push ecx
mov edx, dword [ebp - 0x134]
push edx
lea eax, [ebp - 0x130]
push eax
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
jmp 0x4022a9
mov ecx, 4
shl ecx, 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
call fcn.00401b80
add esp, 4
jmp 0x4022a9
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
push str.usage:__s__c_f_l_Q_s_V_..._nThis_is_a_little_helper_app_to_equalize_shell_differences_between_WinNT_and_nWin9x_and_get_nmake.exe_to_accomplish_its_job._n
push 0x12b
lea edx, [ebp - 0x130]
push edx
call fcn.00402700
add esp, 0x10
mov dword [ebp - 0x134], eax
push 0
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp - 0x134]
push ecx
lea edx, [ebp - 0x130]
push edx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040298e
mov esp, ebp
pop ebp
ret