Function at 0x40a341
Capabilities:
Delete file
Encode data using xor

Disassembly:
mov eax, 0x4d71b1
call fcn.004c2f74
sub esp, 0x74
push ebx
push esi
push edi
mov esi, str.hiscores.dat
push esi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x4e33b4
push esi
call fcn.004c2ab9
mov esi, eax
test esi, esi
pop ecx
pop ecx
jne 0x40a3ba
push str.HIGH_SCORE_FILE_WRITE_ERROR
lea ecx, [ebp - 0x64]
call fcn.004028b0
mov ecx, dword [edi + 0x5c]
and dword [ebp - 4], esi
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.0046d7d0
mov edi, dword [edi + 0x5c]
mov edx, dword [edi]
xor ebx, ebx
inc ebx
push eax
mov ecx, edi
mov byte [ebp - 4], bl
call dword [edx + 0x5c]
push ebx
lea ecx, [ebp - 0x80]
call fcn.00401fcd
push ebx
lea ecx, [ebp - 0x64]
call fcn.00401fcd
jmp 0x40a56c
lea eax, [edi + 0xdc]
mov dword [ebp - 0x24], eax
lea eax, [edi + 0x1f0]
mov dword [ebp - 0x40], eax
lea eax, [edi + 0xd0]
mov dword [ebp - 0x28], eax
lea eax, [edi + 0x9c]
xor ebx, ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x44], 2
inc ebx
mov ecx, edi
call fcn.00409e60
push esi
push 4
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push ebx
push eax
call fcn.004c32d0
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov cx, word [eax + 0x10]
add esp, 0x10
cmp dword [eax + 0x14], 0x10
mov dword [ebp - 0x10], ecx
jb 0x40a416
mov eax, dword [eax]
push esi
push 2
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.004c32d0
movsx eax, word [ebp - 0x10]
push esi
push ebx
push eax
push dword [ebp - 0x20]
call fcn.004c32d0
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
push esi
push 4
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push ebx
push eax
call fcn.004c32d0
movsx ecx, word [ebp - 0x10]
mov eax, dword [ebp - 0x30]
and dword [ebp - 0x14], 0
xor eax, 0x42beef
add esp, 0x30
test ecx, ecx
mov dword [ebp - 0x34], eax
jle 0x40a482
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
movsx ecx, byte [edx + ecx]
imul ecx, ecx, 0x11
xor eax, ecx
movsx ecx, word [ebp - 0x10]
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], ecx
mov dword [ebp - 0x34], eax
jl 0x40a464
push esi
push 4
lea eax, [ebp - 0x34]
push ebx
push eax
call fcn.004c32d0
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x24]
add esp, 0x10
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x40], 5
jmp 0x40a4aa
mov eax, dword [ebp - 0x20]
xor ecx, ecx
cmp dword [eax + 0x14], 0x10
mov cx, word [eax + 0x10]
mov dword [ebp - 0x14], ecx
jb 0x40a4bb
mov eax, dword [eax]
push esi
push 2
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x14]
push ebx
push eax
call fcn.004c32d0
movsx eax, word [ebp - 0x14]
push esi
push ebx
push eax
push dword [ebp - 0x24]
call fcn.004c32d0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax]
push esi
push 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push ebx
push eax
call fcn.004c32d0
movsx ecx, word [ebp - 0x14]
mov eax, dword [ebp - 0x38]
and dword [ebp - 0x18], 0
xor eax, 0x42beef
add esp, 0x30
test ecx, ecx
mov dword [ebp - 0x3c], eax
jle 0x40a527
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
movsx ecx, byte [edx + ecx]
imul ecx, ecx, 0x11
xor eax, ecx
movsx ecx, word [ebp - 0x14]
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], ecx
mov dword [ebp - 0x3c], eax
jl 0x40a509
push esi
push 4
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.004c32d0
add dword [ebp - 0x20], 0x1c
add dword [ebp - 0x1c], 4
add esp, 0x10
dec dword [ebp - 0x40]
jne 0x40a4a7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x28], 4
add dword [ebp - 0x2c], 0x1c
dec dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jne 0x40a3e8
push esi
call fcn.004c2a0c
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret