Function at 0x408ee8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffcdc
xor eax, eax
mov edx, dword [0x4a9094]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], eax
push edx
call fcn.0042576c
mov ebx, eax
mov eax, dword [ebp + 0xc]
add eax, 3
pop ecx
and eax, 0xfffffffc
xor edx, edx
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
cmp ecx, eax
jge 0x40905a
mov edx, dword [0x4a9094]
push edx
call fcn.00448c18
pop ecx
mov edx, dword [ebp - 0x10]
mov ecx, eax
and cl, 0xf
mov byte [ebp + edx - 0x318], cl
cmp cl, 0xc
ja 0x408f73
and eax, 0xff
mov edx, dword [ebp - 0x10]
sar eax, 4
mov byte [ebp + edx - 0x317], al
cmp al, 0xc
jbe 0x409048
push 0
push ebx
mov ecx, dword [0x4a9094]
push ecx
call fcn.00425620
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x10], eax
mov esi, edi
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jge 0x40903e
push 6
lea ecx, [ebp - 0x324]
push ecx
call fcn.004017b4
movzx eax, word [ebp - 0x324]
movzx edx, word [ebp - 0x320]
movzx ecx, word [ebp - 0x31c]
sar edx, 0xc
add esp, 8
sar eax, 0xc
shl eax, 8
shl edx, 4
or ax, dx
sar ecx, 0xc
or ax, cx
mov word [esi], ax
movzx eax, word [ebp - 0x322]
movzx edx, word [ebp - 0x31e]
movzx ecx, word [ebp - 0x31a]
sar edx, 0xc
sar eax, 0xc
shl edx, 4
shl eax, 8
or ax, dx
sar ecx, 0xc
or ax, cx
xor ebx, ebx
mov word [esi + 2], ax
lea eax, [ebp - 0x324]
mov cx, word [eax]
mov edx, dword [ebp - 0x10]
and cx, 0xfff
add edx, ebx
inc ebx
add eax, 2
mov word [edi + edx*2 + 4], cx
cmp ebx, 6
jl 0x40900e
add dword [ebp - 0x10], 8
add esi, 0x10
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jl 0x408f9a
mov eax, 1
jmp 0x409158
add dword [ebp - 0x10], 2
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
cmp edx, ecx
jl 0x408f38
mov eax, dword [ebp + 0xc]
and eax, 7
cmp eax, 4
jne 0x409097
mov edx, dword [0x4a9094]
push edx
call fcn.00448c18
shl eax, 8
pop ecx
cdq
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov ecx, dword [0x4a9094]
push ecx
call fcn.00448c18
pop ecx
cdq
add dword [ebp - 8], eax
adc dword [ebp - 4], edx
mov dword [ebp - 0xc], 0x10
xor eax, eax
mov dword [ebp - 0x10], eax
mov edx, edi
mov dword [ebp - 0x18], edx
lea ecx, [ebp - 0x318]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jge 0x409156
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
movzx esi, byte [ecx]
cmp esi, eax
jle 0x4090f5
xor ebx, ebx
mov eax, dword [0x4a9094]
push eax
call fcn.00448c18
pop ecx
cdq
mov ecx, ebx
xor ecx, 8
mov edi, dword [ebp - 0xc]
add ecx, edi
call fcn.0044d258
add dword [ebp - 8], eax
adc dword [ebp - 4], edx
add ebx, 8
cmp ebx, 0x20
jl 0x4090c7
add dword [ebp - 0xc], 0x20
mov ecx, 0x10
mov ebx, 0xffff
sub ecx, esi
mov eax, dword [ebp - 8]
sar ebx, cl
and ebx, eax
mov eax, dword [ebp - 8]
mov ecx, esi
mov edx, dword [ebp - 4]
call fcn.0044d274
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
sub dword [ebp - 0xc], esi
lea ecx, [esi - 1]
mov eax, 1
shl eax, cl
test eax, ebx
jne 0x409138
mov ecx, esi
mov eax, 1
shl eax, cl
dec eax
sub ebx, eax
mov edx, dword [ebp - 0x18]
mov word [edx], bx
inc dword [ebp - 0x10]
add dword [ebp - 0x18], 2
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jl 0x4090b8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret