Function at 0x40a210
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1158
call fcn.00457ef0
mov eax, dword [0x4a3300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
mov dword [ebp - 0x1114], ecx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebx + 0xf]
mov dword [ebp - 0x1154], ebx
cdq
and edx, 0xf
mov dword [ebp - 0x1158], edi
lea esi, [edx + eax]
sar esi, 4
lea eax, [ebx - 1]
mov dword [ebp - 0x1148], esi
cmp eax, 0xfff
ja 0x40a852
push 0xfff
lea eax, [ebp - 0x110b]
mov byte [ebp - 0x110c], 0
push 0
push eax
call fcn.00453200
add esp, 0xc
test esi, esi
jle 0x40a78c
mov eax, 1
lea ecx, [ebp - 0x110c]
mov dword [ebp - 0x114c], eax
mov dword [ebp - 0x1150], ecx
mov edi, edi
movdqu xmm0, xmmword [edi]
movdqu xmmword [ebp - 0x14], xmm0
test eax, eax
jle 0x40a30d
xor ecx, ecx
mov edx, 0xf
mov byte [ebp - 0x15], cl
mov byte [ebp - 0x15], al
sar eax, 8
mov word [ebp - 0x17], cx
mov byte [ebp - 0x16], al
sar eax, 8
mov byte [ebp - 0x17], al
sar eax, 8
mov dword [ebp - 0x1b], ecx
mov byte [ebp - 0x18], al
sar eax, 8
mov byte [ebp - 0x19], al
sar eax, 8
mov byte [ebp - 0x1a], al
sar eax, 8
mov byte [ebp - 0x1b], al
sar eax, 8
mov byte [ebp - 0x1c], al
jmp 0x40a2f0
cmp edx, 8
jle 0x40a2fc
movzx eax, byte [ebp + edx - 0x24]
add ecx, eax
movzx eax, byte [ebp + edx - 0x14]
add ecx, eax
mov byte [ebp + edx - 0x14], cl
sar ecx, 8
dec edx
jns 0x40a2f0
push 0xef
lea eax, [ebp - 0x10b]
mov byte [ebp - 0x10c], 0
push 0
push eax
call fcn.00453200
add esp, 0xc
test edi, edi
je 0x40a511
xor cl, cl
mov dword [ebp - 0x1138], 0x10eb3d60
mov dword [ebp - 0x1134], 0xbe71ca15
xor edx, edx
mov dword [ebp - 0x1130], 0xf0ae732b
mov dword [ebp - 0x112c], 0x81777d85
mov dword [ebp - 0x1128], 0x72c351f
mov dword [ebp - 0x1124], 0xd708613b
mov dword [ebp - 0x1120], 0xa310982d
mov dword [ebp - 0x111c], 0xf4df1409
mov al, byte [ebp + edx*4 - 0x1138]
add cl, 1
mov byte [ebp + edx*4 - 0x10c], al
mov al, byte [ebp + edx*4 - 0x1137]
mov byte [ebp + edx*4 - 0x10b], al
mov al, byte [ebp + edx*4 - 0x1136]
mov byte [ebp + edx*4 - 0x10a], al
mov al, byte [ebp + edx*4 - 0x1135]
mov byte [ebp + edx*4 - 0x109], al
movzx edx, cl
cmp edx, 8
jb 0x40a386
movzx esi, cl
mov byte [ebp - 0x110f], cl
mov dword [ebp - 0x1144], 0x402018d
mov dword [ebp - 0x1140], 0x40201008
mov word [ebp - 0x113c], 0x1b80
mov byte [ebp - 0x113a], 0x36
cmp esi, 0x3c
jae 0x40a511
nop
mov al, byte [ebp + esi*4 - 0x10e]
xor edx, edx
mov byte [ebp - 0x110d], al
mov edi, 8
mov eax, esi
mov bl, byte [ebp + esi*4 - 0x10d]
div edi
mov bh, byte [ebp + esi*4 - 0x110]
mov ch, byte [ebp + esi*4 - 0x10f]
mov edi, edx
mov byte [ebp - 0x110e], bl
mov dword [ebp - 0x1118], eax
test edi, edi
jne 0x40a48e
movzx ecx, ch
mov bl, bh
movzx eax, bl
mov bh, byte [ecx + 0x4823c0]
movzx ecx, byte [ebp - 0x110d]
mov bl, byte [eax + 0x4823c0]
mov eax, dword [ebp - 0x1118]
mov cl, byte [ecx + 0x4823c0]
mov byte [ebp - 0x110d], cl
movzx ecx, byte [ebp - 0x110e]
xor bh, byte [ebp + eax - 0x1144]
mov dl, byte [ecx + 0x4823c0]
mov cl, byte [ebp - 0x110f]
mov ch, byte [ebp - 0x110d]
jmp 0x40a494
mov dl, byte [ebp - 0x110d]
cmp edi, 4
jne 0x40a4bd
movzx eax, bh
mov bh, byte [eax + 0x4823c0]
movzx eax, ch
mov ch, byte [eax + 0x4823c0]
movzx eax, dl
mov dl, byte [eax + 0x4823c0]
movzx eax, bl
mov bl, byte [eax + 0x4823c0]
mov al, byte [ebp + esi*4 - 0x12c]
inc cl
xor al, bh
mov byte [ebp - 0x110f], cl
mov byte [ebp + esi*4 - 0x10c], al
mov al, byte [ebp + esi*4 - 0x12b]
xor al, ch
mov byte [ebp + esi*4 - 0x10b], al
mov al, byte [ebp + esi*4 - 0x12a]
xor al, dl
mov byte [ebp + esi*4 - 0x10a], al
mov al, byte [ebp + esi*4 - 0x129]
xor al, bl
mov byte [ebp + esi*4 - 0x109], al
movzx esi, cl
cmp esi, 0x3c
jb 0x40a400
xor ecx, ecx
lea esi, [ecx + 4]
jmp 0x40a520
mov edx, 4
jmp 0x40a530
mov al, byte [ebp + ecx - 0x10c]
xor byte [ebp + ecx - 0x14], al
inc ecx
dec edx
jne 0x40a530
dec esi
jne 0x40a520
mov al, 1
mov dword [ebp - 0x1118], 1
mov byte [ebp - 0x110d], al
test al, al
je 0x40a692
lea esi, [ebp - 0x14]
mov edi, 4
mov ecx, esi
mov edx, 4
jmp 0x40a570
movzx eax, byte [ecx]
lea ecx, [ecx + 4]
mov al, byte [eax + 0x4823c0]
mov byte [ecx - 4], al
dec edx
jne 0x40a570
inc esi
dec edi
jne 0x40a564
mov al, byte [ebp - 0xf]
lea esi, [ebp - 0x13]
mov cl, byte [ebp - 0x13]
lea edi, [edx + 4]
mov byte [ebp - 0x13], al
mov al, byte [ebp - 0xb]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 7]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 0xa]
mov byte [ebp - 7], cl
mov cl, byte [ebp - 0x12]
mov byte [ebp - 0x12], al
mov al, byte [ebp - 6]
mov byte [ebp - 0xa], cl
mov cl, byte [ebp - 0xe]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 5]
mov byte [ebp - 6], cl
mov cl, byte [ebp - 0x11]
mov byte [ebp - 0x11], al
mov al, byte [ebp - 9]
mov byte [ebp - 5], al
mov al, byte [ebp - 0xd]
mov byte [ebp - 9], al
mov byte [ebp - 0xd], cl
mov dh, byte [esi - 1]
lea esi, [esi + 4]
mov dl, byte [esi - 4]
mov cl, dh
mov al, byte [esi - 2]
xor cl, dl
mov ch, byte [esi - 3]
mov bl, al
mov byte [ebp - 0x110e], al
mov ah, 0x1b
mov al, cl
xor bl, ch
shr al, 7
add cl, cl
imul ah
mov bh, bl
mov ah, 0x1b
xor al, cl
xor bh, dh
xor al, dh
xor bh, dl
xor al, bh
mov cl, ch
mov byte [esi - 5], al
xor cl, dl
mov al, cl
add cl, cl
shr al, 7
imul ah
xor al, cl
mov cl, 0x1b
xor al, dl
xor al, bh
mov byte [esi - 4], al
mov al, bl
shr al, 7
add bl, bl
imul cl
mov cl, byte [ebp - 0x110e]
xor al, bl
xor cl, dh
xor al, ch
mov bl, 0x1b
xor al, bh
mov byte [esi - 3], al
mov al, cl
shr al, 7
add cl, cl
imul bl
xor al, cl
xor al, byte [ebp - 0x110e]
xor al, bh
mov byte [esi - 2], al
dec edi
jne 0x40a5d4
mov ecx, dword [ebp - 0x1118]
lea edx, [ebp - 0x10c]
shl ecx, 4
lea eax, [ebp - 0x14]
add edx, ecx
mov edi, 4
mov esi, 4
lea esp, [esp]
mov cl, byte [edx]
inc edx
xor byte [eax], cl
inc eax
dec esi
jne 0x40a680
dec edi
jne 0x40a677
mov al, byte [ebp - 0x110d]
inc al
mov byte [ebp - 0x110d], al
movzx eax, al
mov dword [ebp - 0x1118], eax
cmp eax, 0xe
mov al, byte [ebp - 0x110d]
jb 0x40a554
lea esi, [ebp - 0x14]
mov edi, 4
lea ebx, [ebx]
mov ecx, esi
mov edx, 4
jmp 0x40a6d0
movzx eax, byte [ecx]
lea ecx, [ecx + 4]
mov al, byte [eax + 0x4823c0]
mov byte [ecx - 4], al
dec edx
jne 0x40a6d0
inc esi
dec edi
jne 0x40a6c0
mov cl, byte [ebp - 0x13]
lea esi, [edx + 4]
mov al, byte [ebp - 0xf]
mov byte [ebp - 0x13], al
mov al, byte [ebp - 0xb]
mov byte [ebp - 0xf], al
mov al, byte [ebp - 7]
mov byte [ebp - 0xb], al
mov al, byte [ebp - 0xa]
mov byte [ebp - 7], cl
mov cl, byte [ebp - 0x12]
mov byte [ebp - 0x12], al
mov al, byte [ebp - 6]
mov byte [ebp - 0xa], cl
mov cl, byte [ebp - 0xe]
mov byte [ebp - 0xe], al
mov al, byte [ebp - 5]
mov byte [ebp - 6], cl
mov cl, byte [ebp - 0x11]
mov byte [ebp - 0x11], al
mov al, byte [ebp - 9]
mov byte [ebp - 5], al
mov al, byte [ebp - 0xd]
mov byte [ebp - 0xd], cl
xor ecx, ecx
mov byte [ebp - 9], al
mov edx, 4
jmp 0x40a740
mov al, byte [ebp + ecx - 0x2c]
xor byte [ebp + ecx - 0x14], al
inc ecx
dec edx
jne 0x40a740
dec esi
jne 0x40a733
mov ecx, dword [ebp - 0x1150]
movdqu xmm0, xmmword [ebp - 0x14]
mov eax, dword [ebp - 0x114c]
mov edi, dword [ebp - 0x1158]
inc eax
movdqu xmmword [ecx], xmm0
add ecx, 0x10
mov dword [ebp - 0x114c], eax
dec dword [ebp - 0x1148]
mov dword [ebp - 0x1150], ecx
jne 0x40a2a0
mov ebx, dword [ebp - 0x1154]
xor edx, edx
test ebx, ebx
jle 0x40a83c
mov edi, dword [ebp - 0x1114]
cmp ebx, 0x20
jb 0x40a81a
lea ecx, [edi - 1]
lea eax, [ebp + ebx - 0x110d]
add ecx, ebx
cmp edi, eax
ja 0x40a7bf
lea eax, [ebp - 0x110c]
cmp ecx, eax
jae 0x40a81a
mov eax, ebx
and eax, 0x8000001f
jns 0x40a7cd
dec eax
or eax, 0xffffffe0
inc eax
mov ecx, ebx
lea esi, [ebp - 0x110c]
sub ecx, eax
sub esi, edi
mov eax, edi
lea edi, [ebp - 0x10fc]
sub edi, eax
movdqu xmm0, xmmword [eax]
add edx, 0x20
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [esi + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x20], xmm1
movdqu xmm0, xmmword [eax - 0x10]
movdqu xmm1, xmmword [edi + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x10], xmm1
cmp edx, ecx
jl 0x40a7e3
mov edi, dword [ebp - 0x1114]
cmp edx, ebx
jge 0x40a83c
lea esi, [ebp - 0x110c]
sub esi, edi
lea ecx, [edi + edx]
sub ebx, edx
jmp 0x40a830
mov al, byte [ecx + esi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
dec ebx
jne 0x40a830
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004524fc
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004524fc
mov esp, ebp
pop ebp
ret