Function at 0x509702
Capabilities:
Encode data using xor

Disassembly:
xor eax, eax
lea esp, [esp]
lea edx, [eax + 1]
imul edx, edx, 0x23f4
xor dx, word [eax*2 + 0x58d664]
inc eax
mov word [ebp + eax*2 - 0x20a], dx
cmp eax, 7
jl 0x4354b0
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.msvcrt.dll_strstr]
jmp 0x4edea2
add esp, 8
test eax, eax
je 0x48f771
push esi
lea ecx, [ebp - 0x108]
push 0x100
push ecx
call ebx
add esp, 0xc
xor eax, eax
mov edi, edi
lea edx, [eax + 1]
imul edx, edx, 0x39ca
xor dx, word [eax*2 + 0x58d6b8]
inc eax
mov word [ebp + eax*2 - 0x20a], dx
cmp eax, 2
jl 0x45b6b5
lea eax, [edi + 0x14]
push eax
lea ecx, [ebp - 0x208]
push ecx
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.msvcrt.dll_sscanf]
push 0x48f76e
ret
xor eax, eax
lea esp, [esp]
lea ecx, [eax + 1]
imul ecx, ecx, 0x6247
xor cx, word [eax*2 + 0x58d698]
inc eax
mov word [ebp + eax*2 - 0x20a], cx
cmp eax, 0xe
jl 0x46817d
lea edx, [ebp - 0x208]
push edx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.msvcrt.dll_strstr]
jmp 0x45b694
push esi
lea eax, [ebp - 0x108]
push 0x100
push eax
call ebx
add esp, 0xc
test eax, eax
jne 0x4e41e5
push esi
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 4
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004add86
mov esp, ebp
pop ebp
ret
xor eax, eax
lea esp, [esp]
lea edx, [eax + 1]
imul edx, edx, 0xb19
xor dx, word [eax*2 + str.vl_bc_rl_U_x]
inc eax
mov word [ebp + eax*2 - 0x20a], dx
cmp eax, 6
jl 0x4e20c3
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.msvcrt.dll_strstr]
add esp, 8
test eax, eax
je 0x4354aa
push 0x4ea64e
ret
test esi, esi
je 0x48f795
mov ebx, dword [sym.imp.msvcrt.dll_fgets]
push esi
lea eax, [ebp - 0x108]
push 0x100
push eax
call ebx
add esp, 0xc
test eax, eax
je 0x48f78b
jmp 0x4e41e5
xor eax, eax
lea ecx, [eax + 1]
imul ecx, ecx, 0x10d3
xor cx, word [eax*2 + 0x58d628]
jmp 0x555ab4
add esp, 8
test eax, eax
je 0x53f245
push esi
lea edx, [ebp - 0x108]
push 0x100
push edx
call ebx
add esp, 0xc
xor eax, eax
mov edi, edi
lea ecx, [eax + 1]
imul ecx, ecx, 0x1da0
xor cx, word [eax*2 + 0x58d674]
inc eax
mov word [ebp + eax*2 - 0x20a], cx
cmp eax, 2
jl 0x4edec3
lea edx, [edi + 8]
push edx
lea eax, [ebp - 0x208]
jmp 0x53f234
push ebp
mov ebp, esp
sub esp, 0x308
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
jmp 0x50ca4c
push ebx
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], eax
push esi
lea edx, [ebp - 0x308]
mov dword [edi + 0x18], eax
push edx
mov eax, 0x72
push ecx
mov dword [edi + 0xc], 0xbb8
mov word [ebp - 0x308], ax
call dword [sym.imp.msvcrt.dll_fopen]
mov esi, eax
add esp, 8
jmp 0x4e41b8
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.msvcrt.dll_sscanf]
add esp, 0xc
xor eax, eax
lea esp, [esp]
lea edx, [eax + 1]
imul edx, edx, 0x777d
xor dx, word [eax*2 + 0x58d67c]
inc eax
mov word [ebp + eax*2 - 0x20a], dx
cmp eax, 9
jl 0x53f24b
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x108]
push ecx
call dword [sym.imp.msvcrt.dll_strstr]
add esp, 8
test eax, eax
je 0x468177
jmp dword [0x53f295]
inc eax
mov word [ebp + eax*2 - 0x20a], cx
cmp eax, 0xc
jl 0x4e41e7
lea edx, [ebp - 0x208]
push edx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.msvcrt.dll_strstr]
add esp, 8
test eax, eax
je 0x4e20ba
push esi
lea ecx, [ebp - 0x108]
push 0x100
jmp dword [0x555af8]