Function at 0x4061f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [0x8aeda4]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
test esi, esi
push edi
jl 0x406216
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], 0xffffffff
jmp 0x406226
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x24], 1
mov esi, dword [esp + 0x40]
test esi, esi
jl 0x406240
mov dword [esp + 0x28], 0xfffffde0
mov dword [esp + 0x2c], 0xffffffff
jmp 0x406250
mov dword [esp + 0x28], 0x220
mov dword [esp + 0x2c], 1
mov esi, dword [esp + 0x38]
mov ebp, dword [0x8aef0c]
mov edi, esi
shl edi, 4
add edi, esi
shl edi, 3
mov esi, edi
mov edi, dword [0x8aef08]
mov ebx, edi
sub ebx, esi
lea esi, [ebp + ebx*4]
mov ebx, dword [0x8aef14]
add esi, edx
mov edx, ebx
shl edx, 4
add edx, ebx
mov ebx, dword [0x8aef10]
shl edx, 3
sub edi, edx
and esi, 0x3fffff
lea edx, [ebp + edi*4]
mov edi, ecx
add edx, ebx
mov ebx, ecx
sar edi, 8
sar ebx, 0xb
and edi, 7
and edx, 0x3fffff
and ebx, 1
cmp edi, 7
mov dword [esp + 0x30], edi
ja case.default.0x4062bd
jmp dword [edi*4 + 0x406b64]
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0xfffffde0
jmp case.default.0x4062bd
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], 0x220
jmp case.default.0x4062bd
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0xfffffde0
jmp case.default.0x4062bd
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x1c], 0x220
jmp case.default.0x4062bd
mov dword [esp + 0x18], 0xfffffde0
mov dword [esp + 0x1c], 1
jmp case.default.0x4062bd
mov dword [esp + 0x18], 0x220
mov dword [esp + 0x1c], 1
jmp case.default.0x4062bd
mov dword [esp + 0x18], 0xfffffde0
jmp 0x406342
mov dword [esp + 0x18], 0x220
mov dword [esp + 0x1c], 0xffffffff
mov edi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x40]
and ecx, 7
cmp ecx, 7
ja case.default.0x40635e
jmp dword [ecx*4 + 0x406b84]
test ebx, ebx
je 0x4063df
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
mov byte [edx + eax], bl
mov ebx, dword [esp + 0x40]
test ebx, ebx
mov ecx, edx
je 0x4063b3
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], bl
jne 0x40637d
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406369
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
mov byte [edx + eax], bl
mov ebx, dword [esp + 0x3c]
test ebx, ebx
mov ecx, edx
je 0x406429
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], bl
jne 0x4063f3
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4063df
test ebx, ebx
je 0x4064d1
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
or byte [edx + eax], bl
mov ebx, dword [esp + 0x40]
test ebx, ebx
mov ecx, edx
je 0x4064a5
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
or byte [ecx + eax], bl
test ebp, ebp
jne 0x40646d
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406459
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
or byte [edx + eax], bl
mov ebx, dword [esp + 0x3c]
test ebx, ebx
mov ecx, edx
je 0x40651d
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
or byte [ecx + eax], bl
test edi, edi
jne 0x4064e5
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4064d1
test ebx, ebx
je 0x4065c5
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
and byte [edx + eax], bl
mov ebx, dword [esp + 0x40]
test ebx, ebx
mov ecx, edx
je 0x406599
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
and byte [ecx + eax], bl
test ebp, ebp
jne 0x406561
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x40654d
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
and byte [edx + eax], bl
mov ebx, dword [esp + 0x3c]
test ebx, ebx
mov ecx, edx
je 0x406611
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
and byte [ecx + eax], bl
test edi, edi
jne 0x4065d9
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4065c5
test ebx, ebx
je 0x4066b9
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
xor byte [edx + eax], bl
mov ebx, dword [esp + 0x40]
test ebx, ebx
mov ecx, edx
je 0x40668d
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
xor byte [ecx + eax], bl
test ebp, ebp
jne 0x406655
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406641
mov bl, byte [esi + eax]
mov dword [esp + 0x10], esi
xor byte [edx + eax], bl
mov ebx, dword [esp + 0x3c]
test ebx, ebx
mov ecx, edx
je 0x406705
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov dword [esp + 0x10], ecx
mov bl, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
xor byte [ecx + eax], bl
test edi, edi
jne 0x4066cd
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4066b9
mov cl, byte [0x8aeebc]
and cl, 0xf
test ebx, ebx
mov byte [esp + 0x38], cl
je 0x4067bb
mov dword [esp + 0x10], esi
mov ecx, edx
mov bl, byte [esp + 0x38]
cmp byte [ecx + eax], bl
jne 0x40675b
mov ebx, dword [esp + 0x10]
mov bl, byte [ebx + eax]
mov byte [ecx + eax], bl
test ebp, ebp
je 0x40678f
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
and ecx, 0x3fffff
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x2c]
add ebp, ecx
mov ecx, dword [esp + 0x14]
jmp 0x406748
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406742
mov dword [esp + 0x10], esi
mov ecx, edx
mov bl, byte [esp + 0x38]
cmp byte [ecx + eax], bl
jne 0x4067d4
mov ebx, dword [esp + 0x10]
mov bl, byte [ebx + eax]
mov byte [ecx + eax], bl
test edi, edi
je 0x406808
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
and ecx, 0x3fffff
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x24]
add edi, ecx
mov ecx, dword [esp + 0x14]
jmp 0x4067c1
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4067bb
mov cl, byte [0x8aeebc]
and cl, 0xf
test ebx, ebx
mov byte [esp + 0x38], cl
je 0x4068be
mov dword [esp + 0x10], esi
mov ecx, edx
mov bl, byte [esp + 0x38]
cmp byte [ecx + eax], bl
je 0x40685e
mov ebx, dword [esp + 0x10]
mov bl, byte [ebx + eax]
mov byte [ecx + eax], bl
test ebp, ebp
je 0x406892
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x28]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
and ecx, 0x3fffff
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x2c]
add ebp, ecx
mov ecx, dword [esp + 0x14]
jmp 0x40684b
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406845
mov dword [esp + 0x10], esi
mov ecx, edx
mov bl, byte [esp + 0x38]
cmp byte [ecx + eax], bl
je 0x4068d7
mov ebx, dword [esp + 0x10]
mov bl, byte [ebx + eax]
mov byte [ecx + eax], bl
test edi, edi
je 0x40690b
mov ebx, dword [esp + 0x18]
add ecx, ebx
mov ebx, dword [esp + 0x20]
and ecx, 0x3fffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x10]
add ecx, ebx
and ecx, 0x3fffff
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x24]
add edi, ecx
mov ecx, dword [esp + 0x14]
jmp 0x4068c4
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4068be
test ebx, ebx
je 0x4069ae
mov ecx, esi
mov ebx, edx
mov dword [esp + 0x10], ecx
mov cl, byte [ecx + eax]
cmp byte [ebx + eax], cl
jae 0x40694e
mov byte [ebx + eax], cl
test ebp, ebp
je 0x406982
mov ecx, dword [esp + 0x18]
add ebx, ecx
mov ecx, dword [esp + 0x10]
and ebx, 0x3fffff
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x28]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
jmp 0x406943
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x40693b
mov ecx, esi
mov ebx, edx
mov dword [esp + 0x10], ecx
mov cl, byte [ecx + eax]
cmp byte [ebx + eax], cl
jae 0x4069c1
mov byte [ebx + eax], cl
test edi, edi
je 0x4069f5
mov ecx, dword [esp + 0x18]
add ebx, ecx
mov ecx, dword [esp + 0x10]
and ebx, 0x3fffff
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x20]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
jmp 0x4069b6
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x4069ae
test ebx, ebx
je 0x406a98
mov ecx, esi
mov ebx, edx
mov dword [esp + 0x10], ecx
mov cl, byte [ecx + eax]
cmp byte [ebx + eax], cl
jbe 0x406a38
mov byte [ebx + eax], cl
test ebp, ebp
je 0x406a6c
mov ecx, dword [esp + 0x18]
add ebx, ecx
mov ecx, dword [esp + 0x10]
and ebx, 0x3fffff
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x28]
add ecx, ebx
mov ebx, dword [esp + 0x2c]
and ecx, 0x3fffff
add ebp, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
jmp 0x406a2d
test edi, edi
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x40]
add edx, ecx
mov ecx, dword [esp + 0x20]
add esi, ecx
mov ecx, dword [esp + 0x24]
and edx, 0x3fffff
and esi, 0x3fffff
add edi, ecx
jmp 0x406a25
mov ecx, esi
mov ebx, edx
mov dword [esp + 0x10], ecx
mov cl, byte [ecx + eax]
cmp byte [ebx + eax], cl
jbe 0x406aab
mov byte [ebx + eax], cl
test edi, edi
je 0x406adf
mov ecx, dword [esp + 0x18]
add ebx, ecx
mov ecx, dword [esp + 0x10]
and ebx, 0x3fffff
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x20]
add ecx, ebx
mov ebx, dword [esp + 0x24]
and ecx, 0x3fffff
add edi, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], ecx
jmp 0x406aa0
test ebp, ebp
je case.default.0x40635e
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x3c]
add edx, ecx
mov ecx, dword [esp + 0x28]
add esi, ecx
mov ecx, dword [esp + 0x2c]
and edx, 0x3fffff
and esi, 0x3fffff
add ebp, ecx
jmp 0x406a98
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
test ecx, ecx
pop ebx
jge 0x406b15
neg ecx
mov eax, dword [esp + 0x30]
test eax, eax
jge 0x406b1f
neg eax
mov edx, dword [esp + 0x20]
inc ecx
inc eax
cmp edx, 7
ja case.default.0x406b2a
jmp dword [edx*4 + 0x406ba4]
add dword [0x8aef14], eax
add esp, 0x24
ret 0xc
sub dword [0x8aef14], eax
add esp, 0x24
ret 0xc
add dword [0x8aef10], ecx
add esp, 0x24
ret 0xc
sub dword [0x8aef10], ecx
add esp, 0x24
ret 0xc