Function at 0x401000
Capabilities:
Delete file
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c023
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x334
push ebx
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x340]
rep stosd dword es:[edi], eax
mov eax, dword [str.ilm_nk]
mov ecx, dword [0x41104c]
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x12c], ecx
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x128]
mov dword [ebp - 0x10], esp
rep stosd dword es:[edi], eax
mov dword [ebp - 4], eax
xor edx, edx
lea edi, [ebp - 0x130]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jae 0x401086
mov cl, byte [ebp + edx - 0x130]
xor cl, 0xa
mov byte [ebp + edx - 0x130], cl
inc edx
jmp 0x40105e
lea edx, [ebp - 0x130]
lea eax, [ebp - 0x340]
push edx
push str.__temp___s
push 0x104
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [ebp - 0x130]
lea edx, [ebp - 0x340]
push 0x104
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::CFile_1
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 1
mov dword [ebp - 0x23c], 0x40d2d0
call fcn.0040ba30
push 3
push str.init
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 2
call fcn.0040ba60
lea eax, [ebp - 0x130]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
cmp eax, 0xffffffff
push 0
jne 0x401179
lea ecx, [ebp - 0x130]
push 0x3002
push ecx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Open
mov dx, word [0x411030]
mov ecx, dword [ebp + 8]
mov esi, dword [sym.imp.MSVCRT.dll_strtok]
lea eax, [ebp - 0x12]
push eax
mov word [ebp - 0x12], dx
push ecx
call esi
mov edx, eax
add esp, 8
test edx, edx
je 0x4012e4
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
push 1
push 0x41102c
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
lea edx, [ebp - 0x12]
push edx
push 0
jmp 0x40113d
lea eax, [ebp - 0x130]
push 0x2002
push eax
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Open
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::GetLength
mov esi, eax
mov dword [ebp - 0x2c], esi
lea edi, [esi + 1]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
push ebx
rep stosb byte es:[edi], al
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Read
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Close
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
lea ecx, [ebp - 0x130]
push 0x1002
push ecx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Open
xor esi, esi
cmp esi, dword [ebp - 0x2c]
jge 0x40120e
lea ecx, [ebp - 0x23c]
call fcn.0040bae0
mov cl, byte [ebx + esi]
xor cl, al
mov byte [ebx + esi], cl
inc esi
jmp 0x4011f3
mov dx, word [0x41102c]
lea eax, [ebp - 0x12]
push eax
mov word [ebp - 0x12], dx
push ebx
call dword [sym.imp.MSVCRT.dll_strtok]
mov esi, eax
add esp, 8
test esi, esi
je 0x40126e
mov ecx, dword [ebp + 8]
push 8
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x401266
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
push 1
push 0x41102c
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
lea edx, [ebp - 0x12]
push edx
push 0
jmp 0x40121e
push ebx
call sub.MFC42.DLL_operatordelete
mov edi, 0x411030
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x12]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_strtok]
lea ecx, [ebp - 0x12]
push ecx
push edx
call esi
add esp, 0xc
mov edx, eax
test edx, edx
je 0x4012e4
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
push 1
push 0x41102c
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
lea eax, [ebp - 0x12]
push eax
push 0
call esi
add esp, 8
jmp 0x4012ac
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Close
push 0
lea ecx, [ebp - 0x130]
push 2
push ecx
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Open
test eax, eax
jne 0x401318
lea edx, [ebp - 0x28]
push 0x40f208
push edx
mov dword [ebp - 0x28], 1
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
push 0
push 0
lea ecx, [ebp - 0x24]
call dword [eax + 0x30]
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::GetLength
mov ebx, eax
push ebx
call sub.MFC42.DLL_operatornew
add esp, 4
mov edi, eax
lea ecx, [ebp - 0x24]
push ebx
push edi
call sub.MFC42.DLL_CFile::Read
push 3
push str.init
lea ecx, [ebp - 0x23c]
call fcn.0040ba60
xor esi, esi
cmp esi, ebx
jge 0x401372
lea ecx, [ebp - 0x23c]
call fcn.0040bae0
mov cl, byte [edi + esi]
xor cl, al
mov byte [edi + esi], cl
inc esi
jmp 0x401358
mov edx, dword [ebp - 0x24]
push 0
push 0
lea ecx, [ebp - 0x24]
call dword [edx + 0x30]
push ebx
push edi
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Write
lea ecx, [ebp - 0x24]
call sub.MFC42.DLL_CFile::Close
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x23c], 0x40d2d0
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CFile::CFile
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret