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

Disassembly:
push 0xffffffffffffffff
push 0x4d7ab4
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 [0x4e416c]
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 0x409a34
test cl, cl
je 0x409a30
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409a34
add eax, 2
add esi, 2
test cl, cl
jne 0x409a10
xor eax, eax
jmp 0x409a39
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409a46
mov dword [esp + 0x14], eax
jmp 0x409ad5
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 0x409a79
test cl, cl
je 0x409a75
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409a79
add eax, 2
add esi, 2
test cl, cl
jne 0x409a55
xor eax, eax
jmp 0x409a7e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409a8c
mov dword [esp + 0x14], 1
jmp 0x409ad5
lea ecx, [esp + 0x30]
mov esi, str..bmp
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
jmp 0x409aa0
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409ac4
test cl, cl
je 0x409ac0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409ac4
add eax, 2
add esi, 2
test cl, cl
jne 0x409aa0
xor eax, eax
jmp 0x409ac9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409ad5
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 0x409b15
mov eax, esi
mov ecx, ebp
mov dl, byte [eax]
xor dl, 0x26
sub dl, 9
mov byte [eax], dl
inc eax
dec ecx
jne 0x409b07
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 [0x4e416c]
push str..mtf
lea ecx, [esp + 0x14]
call dword [0x4e4190]
push 0x4e4cd4
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 0x409bc6
push ebx
call sub.MFC71.DLL_operator_delete
add esp, 4
lea ecx, [esp + 0x10]
call dword [0x4e416c]
lea ecx, [esp + 0x30]
call dword [0x4e416c]
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 [0x4e416c]
lea ecx, [esp + 0x30]
call dword [0x4e416c]
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