Function at 0x406a20
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x447f34
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [sym.imp.MSVCR71.dll_fseek]
push edi
mov edi, dword [esp + 0x30]
push 2
push 0
push edi
call esi
push edi
call dword [sym.imp.MSVCR71.dll_ftell]
push 0
push 0
push edi
mov ebp, eax
call esi
lea eax, [ebp + 0xc]
push eax
mov dword [esp + 0x3c], eax
call sub.MFC71.DLL_operator_new_1
mov ebx, eax
mov eax, dword [esp + 0x54]
add esp, 0x20
xor esi, esi
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x18], esi
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_2]
push 0x2e
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], esi
call dword [sym.imp.MFC71.DLL_ATL::CStringT::ReverseFind]
lea ecx, [esp + 0x30]
mov esi, eax
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::GetLength]
sub eax, esi
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x38]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Right]
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 1
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 0
call dword [0x45017c]
lea ecx, [esp + 0x30]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::MakeLower]
lea ecx, [esp + 0x30]
mov esi, str..dds
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
lea ebx, [ebx]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406b14
test cl, cl
je 0x406b10
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406b14
add eax, 2
add esi, 2
test cl, cl
jne 0x406af0
xor eax, eax
jmp 0x406b19
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406b26
mov dword [esp + 0x14], eax
jmp 0x406bb5
lea ecx, [esp + 0x30]
mov esi, str..tga
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406b59
test cl, cl
je 0x406b55
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406b59
add eax, 2
add esi, 2
test cl, cl
jne 0x406b35
xor eax, eax
jmp 0x406b5e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406b6c
mov dword [esp + 0x14], 1
jmp 0x406bb5
lea ecx, [esp + 0x30]
mov esi, str..bmp
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
jmp 0x406b80
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406ba4
test cl, cl
je 0x406ba0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406ba4
add eax, 2
add esi, 2
test cl, cl
jne 0x406b80
xor eax, eax
jmp 0x406ba9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406bb5
mov dword [esp + 0x14], 2
mov eax, dword [esp + 0x14]
push edi
push ebp
lea esi, [ebx + 0xc]
push 1
push esi
mov dword [ebx], 0x100
mov dword [ebx + 4], ebp
mov dword [ebx + 8], eax
call dword [sym.imp.MSVCR71.dll_fread]
push edi
mov edi, dword [sym.imp.MSVCR71.dll_fclose]
call edi
add esp, 0x14
test ebp, ebp
jle 0x406bf5
mov eax, esi
mov ecx, ebp
mov dl, byte [eax]
xor dl, 0x32
sub dl, 8
mov byte [eax], dl
inc eax
dec ecx
jne 0x406be7
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_2]
push 0x2e
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 2
call dword [sym.imp.MFC71.DLL_ATL::CStringT::ReverseFind]
push eax
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::Left]
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 3
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
lea ecx, [esp + 0x34]
mov byte [esp + 0x28], 2
call dword [0x45017c]
push str..mtf
lea ecx, [esp + 0x14]
call dword [0x4501a0]
push 0x450c30
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
call dword [sym.imp.MSVCR71.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x406ca6
push ebx
call sub.MFC71.DLL_operator_delete
add esp, 4
lea ecx, [esp + 0x10]
call dword [0x45017c]
lea ecx, [esp + 0x30]
call dword [0x45017c]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 8
mov edx, dword [esp + 0x1c]
push esi
push edx
push 1
push ebx
call dword [sym.imp.MSVCR71.dll_fwrite]
push esi
call edi
push ebx
call sub.MFC71.DLL_operator_delete
add esp, 0x18
lea ecx, [esp + 0x10]
call dword [0x45017c]
lea ecx, [esp + 0x30]
call dword [0x45017c]
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 8