Function at 0x420420
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
mov eax, dword [eax + 8]
cmp eax, 5
jl 0x420879
cmp eax, 0x11
jg 0x420772
mov eax, dword [ebp + 0x10]
test byte [eax + 0x165], 0x20
je 0x4204cf
cmp dword [ebp + 0xc], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
je 0x420888
mov eax, dword [ebp + 0xc]
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
test edx, edx
mov dword [ebp - 0x14], edx
jle 0x420763
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ecx
xor edx, edx
lea eax, [esi + ebx]
mov dword [ebp - 0x18], eax
lea edi, [esi + ecx]
xor esi, esi
xor eax, eax
mov dword [ebp - 0x1c], edi
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x10], esi
movzx esi, byte [edx + edi]
mov edi, dword [ebp - 0x1c]
movzx ebx, byte [eax + edi - 1]
mov byte [edx + ecx], bl
movzx ecx, byte [eax + edi - 1]
xor esi, ebx
mov ebx, dword [ebp - 0x18]
xor ecx, esi
mov esi, dword [ebp - 0x10]
mov byte [esi + ebx - 1], cl
dec esi
dec eax
inc edx
cmp edx, dword [ebp - 0x14]
jl 0x420497
jmp 0x420763
cmp dword [ebp + 0xc], 1
je 0x420892
cmp dword [ebp + 0xc], 2
je 0x4206e1
cmp dword [ebp + 0xc], 4
jne 0x420572
mov eax, dword [ebp + 8]
mov esi, dword [eax]
mov edx, esi
and edx, 3
jne 0x4204fd
mov eax, dword [esi]
jmp 0x42051f
and esi, 0xfffffffc
test edx, edx
je 0x420512
mov eax, dword [esi + 4]
mov ecx, edx
neg ecx
shl ecx, 3
shl eax, cl
jmp 0x420514
xor eax, eax
mov esi, dword [esi]
shl edx, 3
mov ecx, edx
shr esi, cl
or eax, esi
mov edx, ebx
and edx, 3
jne 0x42052d
mov dword [ebx], eax
jmp 0x420763
and ebx, 0xfffffffc
lea edi, [edx*8]
mov ecx, edi
mov esi, 0xffffffff
shl esi, cl
test edx, edx
je 0x420561
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x24], esi
and ecx, esi
neg edx
shl edx, 3
mov esi, ecx
mov ecx, edx
mov edx, eax
shr edx, cl
or esi, edx
mov dword [ebx + 4], esi
mov esi, dword [ebp - 0x24]
not esi
and esi, dword [ebx]
mov ecx, edi
shl eax, cl
or esi, eax
mov dword [ebx], esi
jmp 0x420763
cmp dword [ebp + 0xc], 8
jne 0x4206cb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
test al, 3
jne 0x420592
mov edx, dword [eax]
mov esi, dword [eax + 4]
mov dword [ebp - 0x10], edx
jmp 0x42061b
mov edx, eax
and edx, 0xfffffff8
mov dword [ebp - 0x20], edx
and eax, 7
je 0x4205d3
mov esi, dword [edx + 8]
mov dword [ebp - 0x24], esi
mov esi, dword [edx + 0xc]
mov edi, eax
neg edi
lea ecx, [edi*8 + 0x40]
cmp ecx, 0x1f
ja 0x4205c5
mov edx, dword [ebp - 0x24]
shld esi, edx, cl
shl edx, cl
mov dword [ebp - 0x10], edx
jmp 0x4205d8
mov esi, dword [ebp - 0x24]
shl esi, cl
mov dword [ebp - 0x10], 0
jmp 0x4205d8
xor esi, esi
mov dword [ebp - 0x10], esi
mov edi, dword [ebp - 0x20]
mov edx, dword [edi]
mov dword [ebp - 0x24], edx
mov edx, dword [edi + 4]
shl eax, 3
cmp eax, 0x1f
ja 0x4205ff
mov edi, dword [ebp - 0x24]
mov ecx, eax
shrd edi, edx, cl
mov eax, edx
shr eax, cl
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
jmp 0x42060f
mov dword [ebp - 0x20], 0
mov ecx, eax
mov eax, edx
shr eax, cl
mov dword [ebp - 0x24], eax
or esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
or eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
test bl, 3
jne 0x42062d
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
mov dword [ebx + 4], esi
jmp 0x420763
mov edx, ebx
and edx, 0xfffffff8
and ebx, 7
lea ecx, [ebx*8]
mov eax, 0xffffffff
shl eax, cl
mov dword [ebp - 0x14], ecx
test ebx, ebx
je 0x42069e
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x1c], esi
mov esi, dword [edx + 8]
mov dword [ebp - 0x24], ecx
and esi, eax
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x1c]
neg ebx
lea ecx, [ebx*8 + 0x40]
cmp ecx, 0x1f
ja 0x42067e
mov ebx, dword [ebp - 0x10]
shrd ebx, esi, cl
mov dword [ebp - 0x18], ebx
mov edi, esi
shr edi, cl
mov dword [ebp - 0x1c], edi
jmp 0x42068c
mov dword [ebp - 0x1c], 0
mov ebx, esi
shr ebx, cl
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x20]
or ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x24]
or ebx, dword [ebp - 0x1c]
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ebx
not eax
and eax, dword [edx]
cmp dword [ebp - 0x14], 0x1f
ja 0x4206b5
mov ecx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x10]
shld esi, ebx, cl
shl ebx, cl
jmp 0x4206bf
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x10]
shl esi, cl
xor ebx, ebx
or eax, ebx
mov dword [edx], eax
mov dword [edx + 4], esi
jmp 0x420763
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax]
push ebx
call fcn.004ae9a0
add esp, 0xc
jmp 0x420763
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov esi, edx
and esi, 0xfffffffe
and edx, 1
je 0x420703
movsx eax, word [esi + 2]
mov edi, edx
neg edi
lea ecx, [edi*8 + 0x10]
shl eax, cl
jmp 0x420705
xor eax, eax
movzx esi, word [esi]
shl edx, 3
mov ecx, edx
shr esi, cl
mov edi, 0xffffffff
or eax, esi
mov esi, ebx
and esi, 0xfffffffe
and ebx, 1
lea edx, [ebx*8]
mov ecx, edx
shl edi, cl
test ebx, ebx
je 0x420753
movzx ecx, word [esi + 2]
mov dword [ebp - 0x24], edi
and ecx, edi
mov dword [ebp - 0x20], ecx
movzx edi, ax
neg ebx
lea ecx, [ebx*8 + 0x10]
shr edi, cl
mov ebx, dword [ebp - 0x20]
or ebx, edi
mov edi, dword [ebp - 0x24]
mov word [esi + 2], bx
movzx ebx, word [esi]
not edi
and ebx, edi
mov ecx, edx
shl eax, cl
or ebx, eax
mov word [esi], bx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp eax, 0x19
jl 0x420879
cmp eax, 0x1f
jle 0x4207a1
cmp eax, 0x32
jl 0x42078f
cmp eax, 0x34
jle 0x4207a1
jmp 0x420879
cmp eax, 0x28
jl 0x420879
cmp eax, 0x30
jg 0x420879
mov edx, dword [eax*4 + 0x4d041c]
mov eax, dword [ebp + 0x10]
movsx esi, byte [eax + 0x150]
cmp edx, 0xffffffff
je 0x4207e3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [esi*4]
mov edi, esi
shl edi, 5
sub edi, ecx
mov edx, dword [edi + edx*4 + 0x4d05e0]
test edx, edx
je 0x4207f5
push ebx
push 0
push eax
call edx
add esp, 0xc
cmp eax, 1
je 0x420817
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, 0x5f
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], 4
mov edx, dword [eax]
mov dword [ebx], edx
je 0x420817
cmp dword [ebp + 0xc], 8
mov edx, dword [eax + 4]
mov dword [ebx + 4], edx
je 0x420817
mov edx, dword [eax + 8]
mov dword [ebx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x10]
test byte [eax + 0x165], 0x20
je 0x420879
test esi, esi
je 0x420837
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
cmp eax, 0x34
je 0x420837
cmp eax, 0x32
jne 0x420879
mov edx, dword [ebp + 0xc]
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
test eax, eax
jle 0x420879
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
xor esi, esi
add edx, ebx
xor ecx, ecx
mov dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x20]
movzx edx, byte [ebx]
movzx eax, byte [ecx + edi - 1]
xor edx, eax
mov dword [ebp - 0x1c], edx
mov byte [ebx], al
mov al, byte [ebp - 0x1c]
mov edx, edi
inc ebx
xor byte [ecx + edx - 1], al
dec ecx
inc esi
cmp esi, dword [ebp - 0x24]
jl 0x420856
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
xor eax, eax
mov esp, ebp
pop ebp
ret
movzx eax, byte [ecx]
mov byte [ebx], al
jmp 0x420763
mov esi, dword [ebp + 8]
mov edi, dword [esi]
movzx eax, byte [edi]
mov byte [ebx], al
jmp 0x420763