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

Disassembly:
push 0xffffffffffffffff
push 0x447fc4
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 fcn.004275f0
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_3]
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 [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
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 0x406b64
test cl, cl
je 0x406b60
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406b64
add eax, 2
add esi, 2
test cl, cl
jne 0x406b40
xor eax, eax
jmp 0x406b69
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406b76
mov dword [esp + 0x14], eax
jmp 0x406c05
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 0x406ba9
test cl, cl
je 0x406ba5
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406ba9
add eax, 2
add esi, 2
test cl, cl
jne 0x406b85
xor eax, eax
jmp 0x406bae
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406bbc
mov dword [esp + 0x14], 1
jmp 0x406c05
lea ecx, [esp + 0x30]
mov esi, str..bmp
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
jmp 0x406bd0
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406bf4
test cl, cl
je 0x406bf0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406bf4
add eax, 2
add esi, 2
test cl, cl
jne 0x406bd0
xor eax, eax
jmp 0x406bf9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x406c05
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], 0x190
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 0x406c45
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 0x406c37
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_3]
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 [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
push str..mtf
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_2]
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 0x406cf6
push ebx
call sub.MFC71.DLL_operator_delete_1
add esp, 4
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x30]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
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_1
add esp, 0x18
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
lea ecx, [esp + 0x30]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT]
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