Function at 0x418120
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 2
cmp dword [0x4a8b14], 3
jg 0x4183d0
call fcn.00417eb2
jmp 0x41842c
mov edx, dword [0x4a8af4]
shl edx, 5
mov ecx, dword [0x4a8afc]
add ecx, 3
xor eax, eax
mov al, byte [ecx + 0x4c535f]
xor edx, eax
and edx, 0x7fff
mov dword [0x4a8af4], edx
mov edx, dword [0x4a8af4]
movzx ecx, word [edx*2 + 0x4e5360]
mov dword [ebp - 4], ecx
mov eax, dword [0x4a8afc]
and eax, 0x7fff
mov word [eax*2 + 0x4d5360], cx
mov edx, dword [0x4a8af4]
mov ax, word [0x4a8afc]
mov word [edx*2 + 0x4e5360], ax
mov edx, dword [ebp - 0x14]
mov dword [0x4a8af8], edx
mov ecx, dword [0x4a8b00]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], 2
cmp dword [ebp - 4], 0
je 0x418221
mov eax, dword [0x4a8af8]
cmp eax, dword [0x4a8b10]
jae 0x418221
mov edx, dword [0x4a8afc]
sub edx, dword [ebp - 4]
cmp edx, 0x7efa
ja 0x418221
push dword [ebp - 4]
call fcn.00417b7a
pop ecx
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [0x4a8b08]
jbe 0x418204
mov eax, dword [0x4a8b08]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 3
jne 0x418221
mov edx, dword [0x4a8afc]
sub edx, dword [0x4a8b00]
cmp edx, 0x1000
jbe 0x418221
dec dword [ebp - 0x14]
cmp dword [0x4a8af8], 3
jb 0x418336
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [0x4a8af8]
ja 0x418336
mov eax, dword [0x4a8af8]
sub eax, 3
push eax
mov edx, dword [0x4a8afc]
dec edx
sub edx, dword [ebp - 8]
push edx
call fcn.0041c5ab
add esp, 8
mov dword [ebp - 0xc], eax
mov ecx, dword [0x4a8af8]
dec ecx
sub dword [0x4a8b08], ecx
sub dword [0x4a8af8], 2
inc dword [0x4a8afc]
mov eax, dword [0x4a8af4]
shl eax, 5
mov edx, dword [0x4a8afc]
add edx, 3
xor ecx, ecx
mov cl, byte [edx + 0x4c535f]
xor eax, ecx
and eax, 0x7fff
mov dword [0x4a8af4], eax
mov eax, dword [0x4a8af4]
movzx edx, word [eax*2 + 0x4e5360]
mov dword [ebp - 4], edx
mov eax, dword [0x4a8afc]
and eax, 0x7fff
mov word [eax*2 + 0x4d5360], dx
mov ecx, dword [0x4a8af4]
mov ax, word [0x4a8afc]
mov word [ecx*2 + 0x4e5360], ax
dec dword [0x4a8af8]
jne 0x418270
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], 2
inc dword [0x4a8afc]
cmp dword [ebp - 0xc], 0
je 0x4183bb
push 0
mov ecx, dword [0x4a8afc]
sub ecx, dword [0x4a8af0]
push ecx
cmp dword [0x4a8af0], 0
jl 0x41831a
mov eax, 0x4c5360
add eax, dword [0x4a8af0]
jmp 0x41831c
xor eax, eax
push eax
call fcn.0041c3db
add esp, 0xc
mov edx, dword [0x4a8afc]
mov dword [0x4a8af0], edx
jmp 0x4183bb
cmp dword [ebp - 0x10], 0
je 0x4183a1
mov ecx, dword [0x4a8afc]
xor eax, eax
mov al, byte [ecx + 0x4c535f]
push eax
push 0
call fcn.0041c5ab
add esp, 8
test eax, eax
je 0x418393
push 0
mov edx, dword [0x4a8afc]
sub edx, dword [0x4a8af0]
push edx
cmp dword [0x4a8af0], 0
jl 0x41837e
mov ecx, 0x4c5360
add ecx, dword [0x4a8af0]
jmp 0x418380
xor ecx, ecx
push ecx
call fcn.0041c3db
add esp, 0xc
mov eax, dword [0x4a8afc]
mov dword [0x4a8af0], eax
inc dword [0x4a8afc]
dec dword [0x4a8b08]
jmp 0x4183bb
mov dword [ebp - 0x10], 1
inc dword [0x4a8afc]
dec dword [0x4a8b08]
jmp 0x4183bb
call fcn.00417d6e
cmp dword [0x4a8b08], 0x106
jae 0x4183d0
cmp dword [0x4a8b04], 0
je 0x4183b6
cmp dword [0x4a8b08], 0
jne 0x418149
cmp dword [ebp - 0x10], 0
je 0x4183fc
mov edx, dword [0x4a8afc]
xor eax, eax
mov al, byte [edx + 0x4c535f]
push eax
push 0
call fcn.0041c5ab
add esp, 8
push 1
mov edx, dword [0x4a8afc]
sub edx, dword [0x4a8af0]
push edx
cmp dword [0x4a8af0], 0
jl 0x418421
mov ecx, 0x4c5360
add ecx, dword [0x4a8af0]
jmp 0x418423
xor ecx, ecx
push ecx
call fcn.0041c3db
add esp, 0xc
mov esp, ebp
pop ebp
ret