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

Disassembly:
push ebx
push esi
push edi
push 0x800
call fcn.0040a2f2
mov ebx, eax
mov ecx, 0x165
mov esi, 0x5c9540
mov edi, ebx
add esp, 4
mov dword [ebx], 0
mov eax, dword [0x5c9558]
add eax, dword [0x5c955c]
add eax, dword [0x5c9554]
add eax, dword [0x5c9550]
add eax, dword [0x5c954c]
add eax, dword [0x5c9548]
cdq
mov dword [0x5c9544], edx
xor edx, edx
mov dword [0x5c9540], eax
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
movsw word es:[edi], word [esi]
mov esi, 0x157a
mov al, byte [edx + str._9j_4AAQSkZJRgABAQAAAQABAAD_2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH_9j_4AAQSkZJRgABAQAAAQABAAD_2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQE_t_t_t_t_t_2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH_wAARCAGAAYADASIAAhEBAxEB_8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL_8QAtRAAAgEDAwIEAwUFBA_t_t_t_t_tQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJy_t_t_t_t_ttLT1NXW19jZ2uHi4Tl5ufo6erx8vP09fb3Pn6_8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL_8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEI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asIxt2rGygbeBgjA]
xor byte [ecx + ebx], al
lea eax, [edx + 1]
cdq
inc ecx
idiv esi
cmp ecx, 0x596
jb 0x408270
push 0x5a270c
push str.C:_Game_res_SaveFile_GameData.Dat
call fcn.0054b0b6
mov esi, eax
push esi
push 0x596
push 1
push ebx
call fcn.0054cb97
push esi
call fcn.0054b25b
push esi
call fcn.0054b32a
push ebx
call fcn.0040a2fb
add esp, 0x24
mov al, 1
pop edi
pop esi
pop ebx
ret