Function at 0x4094e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 2
mov eax, dword [ebp + 8]
cmp dword [eax + 0x20], 0
je 0x409867
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
shl edx, 5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp + 8]
xor ebx, ebx
mov bl, byte [eax + ecx + 0x1efc2]
xor edx, ebx
and edx, 0x3fff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + eax*2 + 0x3efc0]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
and ecx, 0x7fff
mov edx, dword [ebp + 8]
mov ax, word [ebp - 4]
mov word [edx + ecx*2 + 0x2efc0], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov cx, word [ecx + 0x14]
mov word [eax + edx*2 + 0x3efc0], cx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x10], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], 2
cmp dword [ebp - 4], 0
je 0x4095fe
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov edx, dword [eax + 0x10]
cmp edx, dword [ecx + 0x28]
jae 0x4095fe
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
sub ecx, dword [ebp - 4]
cmp ecx, 0x7efa
ja 0x4095fe
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004098e0
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x20]
jbe 0x4095db
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 3
jne 0x4095fe
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 0x18]
cmp ecx, 0x1000
jbe 0x4095fe
mov edx, dword [ebp - 0x14]
sub edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 3
jb 0x40977b
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0x10]
ja 0x40977b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
sub ecx, 3
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
sub eax, 1
sub eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040b120
add esp, 0xc
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
sub eax, 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x20]
sub edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
sub edx, 2
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
shl edx, 5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp + 8]
xor ebx, ebx
mov bl, byte [eax + ecx + 0x1efc2]
xor edx, ebx
and edx, 0x3fff
mov ecx, dword [ebp + 8]
mov dword [ecx + 0xc], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + eax*2 + 0x3efc0]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
and ecx, 0x7fff
mov edx, dword [ebp + 8]
mov ax, word [ebp - 4]
mov word [edx + ecx*2 + 0x2efc0], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov cx, word [ecx + 0x14]
mov word [eax + edx*2 + 0x3efc0], cx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
sub eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x10], eax
mov edx, dword [ebp + 8]
cmp dword [edx + 0x10], 0
jne 0x409666
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 2
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], ecx
cmp dword [ebp - 0xc], 0
je 0x409776
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jl 0x409744
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1efc0]
mov dword [ebp - 0x18], ecx
jmp 0x40974b
mov dword [ebp - 0x18], 0
push 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a0d0
add esp, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
mov dword [ecx + 8], eax
jmp 0x40983f
cmp dword [ebp - 0x10], 0
je 0x40981a
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + edx + 0x1efbf]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0040b120
add esp, 0xc
test eax, eax
je 0x4097fa
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jl 0x4097c8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1efc0]
mov dword [ebp - 0x1c], ecx
jmp 0x4097cf
mov dword [ebp - 0x1c], 0
push 0
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a0d0
add esp, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
mov dword [ecx + 8], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x20]
sub edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], edx
jmp 0x40983f
mov dword [ebp - 0x10], 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x20]
sub edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], edx
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x20], 0x106
jae 0x409862
mov edx, dword [ebp + 8]
cmp dword [edx + 0x1c], 0
jne 0x409862
mov eax, dword [ebp + 8]
push eax
call fcn.00409320
add esp, 4
jmp 0x40983f
jmp 0x4094f7
cmp dword [ebp - 0x10], 0
je 0x40988e
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [eax + edx + 0x1efbf]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0040b120
add esp, 0xc
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jl 0x4098ac
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
mov eax, dword [ebp + 8]
lea ecx, [eax + edx + 0x1efc0]
mov dword [ebp - 0x20], ecx
jmp 0x4098b3
mov dword [ebp - 0x20], 0
push 1
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x14]
sub ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a0d0
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret