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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x5befac]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0x800
lea eax, [ebp - 0x804]
push 0
push eax
call fcn.00545a70
push 0x5a2734
push str.C:_Game_res_SaveFile_GameData.Dat
call fcn.0054b0b6
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x4081f8
push esi
push edi
push 2
push 0
push ebx
call fcn.0054c3e2
push ebx
call fcn.0054c954
push 0
push 0
push ebx
mov esi, eax
call fcn.0054c3e2
push ebx
push esi
lea eax, [ebp - 0x804]
push 1
push eax
call fcn.0054cdbb
add esp, 0x2c
xor edx, edx
xor ecx, ecx
test esi, esi
je 0x4081c8
mov edi, 0x157a
nop dword [eax]
nop word [eax + eax]
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_ttLT1NXW19jZ2uHi4Tl5ufo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AYW_YHMF5oHwp8MaLomkFJrWW8voba5uGuZbW7gtZEuLu3M6uZ9pG185xkkg1_JZ_wQa8Nahp_gn_t_t_t_t_t40J_Kkj0LxJ4ku5dDY5EJtode1DasIxt2rGygbeBgjA]
xor byte [ebp + ecx - 0x804], al
lea eax, [edx + 1]
cdq
inc ecx
idiv edi
cmp ecx, esi
jb 0x4081b0
mov ecx, 0x165
lea esi, [ebp - 0x804]
mov edi, 0x5c9540
rep movsd dword es:[edi], dword [esi]
push ebx
movsw word es:[edi], word [esi]
call fcn.0054b32a
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005428fa
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
pop ebx
call fcn.005428fa
mov esp, ebp
pop ebp
ret