Function at 0x402248
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
xor edi, edi
cmp dword [0x49dd60], edi
jne 0x402266
call fcn.00402566
mov dword [0x49dd60], 1
mov ebx, dword [ebp + 0x10]
cmp ebx, 0x10
je 0x40227c
cmp ebx, 0x18
je 0x40227c
cmp ebx, 0x20
jne 0x40252c
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [esi], ebx
mov eax, dword [ecx]
mov dword [esi + 4], eax
mov eax, dword [ecx + 4]
mov dword [esi + 8], eax
mov eax, dword [ecx + 8]
mov dword [esi + 0xc], eax
mov edx, dword [ecx + 0xc]
mov dword [esi + 0x10], edx
cmp ebx, 0x10
je 0x402409
cmp ebx, 0x18
je 0x40238b
cmp ebx, 0x20
jne 0x402470
mov eax, dword [ecx + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [ecx + 0x14]
mov dword [esi + 0x18], eax
mov eax, dword [ecx + 0x18]
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x24]
mov ebx, dword [ecx + 0x1c]
mov dword [esi + 0x20], ebx
mov esi, eax
ror ebx, 8
mov ecx, ebx
mov eax, ebx
shr eax, 0x10
movzx eax, al
shr ecx, 0x18
mov edx, dword [ecx*4 + 0x4a0d90]
xor edx, dword [eax*4 + 0x4a0990]
mov eax, ebx
shr eax, 8
movzx eax, al
xor edx, dword [eax*4 + 0x4a0590]
movzx eax, bl
xor edx, dword [eax*4 + 0x4a0190]
xor edx, dword [edi + 0x49e168]
add edi, 4
xor edx, dword [esi - 0x20]
mov dword [esi], edx
lea esi, [esi + 0x20]
xor edx, dword [esi - 0x3c]
mov dword [esi - 0x1c], edx
xor edx, dword [esi - 0x38]
mov dword [esi - 0x18], edx
xor edx, dword [esi - 0x34]
mov ecx, edx
mov dword [esi - 0x14], edx
mov eax, edx
shr ecx, 0x18
shr eax, 0x10
movzx eax, al
mov ebx, dword [ecx*4 + 0x4a0d90]
xor ebx, dword [eax*4 + 0x4a0990]
mov eax, edx
shr eax, 8
movzx eax, al
xor ebx, dword [eax*4 + 0x4a0590]
movzx eax, dl
xor ebx, dword [eax*4 + 0x4a0190]
xor ebx, dword [esi - 0x30]
mov dword [esi - 0x10], ebx
xor ebx, dword [esi - 0x2c]
mov dword [esi - 0xc], ebx
xor ebx, dword [esi - 0x28]
mov dword [esi - 8], ebx
xor ebx, dword [esi - 0x24]
mov dword [esi - 4], ebx
cmp edi, 0x1c
jb 0x4022d4
mov esi, dword [ebp + 8]
jmp 0x40246d
mov eax, dword [ecx + 0x10]
lea ebx, [esi + 0x1c]
mov dword [esi + 0x14], eax
mov edx, dword [ecx + 0x14]
mov dword [esi + 0x18], edx
ror edx, 8
mov ecx, edx
mov eax, edx
shr ecx, 0x18
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x4a0d90]
xor ecx, dword [eax*4 + 0x4a0990]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4a0590]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4a0190]
xor ecx, dword [edi + 0x49e168]
add edi, 4
xor ecx, dword [ebx - 0x18]
mov edx, ecx
mov dword [ebx], edx
lea ebx, [ebx + 0x18]
xor edx, dword [ebx - 0x2c]
mov dword [ebx - 0x14], edx
xor edx, dword [ebx - 0x28]
mov dword [ebx - 0x10], edx
xor edx, dword [ebx - 0x24]
mov dword [ebx - 0xc], edx
xor edx, dword [ebx - 0x20]
mov dword [ebx - 8], edx
xor edx, dword [ebx - 0x1c]
mov dword [ebx - 4], edx
cmp edi, 0x20
jb 0x40239a
jmp 0x40246d
lea ebx, [esi + 0x14]
ror edx, 8
mov ecx, edx
mov eax, edx
shr ecx, 0x18
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x4a0d90]
xor ecx, dword [eax*4 + 0x4a0990]
mov eax, edx
shr eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4a0590]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4a0190]
xor ecx, dword [edi + 0x49e168]
add edi, 4
xor ecx, dword [ebx - 0x10]
mov edx, ecx
mov dword [ebx], edx
lea ebx, [ebx + 0x10]
xor edx, dword [ebx - 0x1c]
mov dword [ebx - 0xc], edx
xor edx, dword [ebx - 0x18]
mov dword [ebx - 8], edx
xor edx, dword [ebx - 0x14]
mov dword [ebx - 4], edx
cmp edi, 0x28
jb 0x40240c
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi + 4]
add ebx, 0x18
mov dword [esi + 0xf4], eax
mov eax, dword [esi + 8]
mov dword [esi + 0xf8], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0xfc], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x100], eax
cmp ebx, 4
jbe 0x402528
lea eax, [esi + 0x14]
add ebx, 0xfffffffc
mov dword [ebp + 0x10], eax
mov ecx, 0x1010101
mov dword [ebp + 8], ebx
mov ebx, dword [eax]
mov eax, ebx
shr eax, 7
and eax, ecx
imul edi, eax, 0x1b
mov eax, ebx
and eax, 0xff7f7f7f
add eax, eax
xor edi, eax
mov eax, edi
shr eax, 7
and eax, ecx
imul esi, eax, 0x1b
mov eax, edi
and eax, 0xff7f7f7f
add eax, eax
xor esi, eax
mov eax, esi
shr eax, 7
and eax, ecx
mov ecx, esi
imul edx, eax, 0x1b
mov eax, esi
and eax, 0xff7f7f7f
add eax, eax
xor edx, eax
mov eax, edi
xor ebx, edx
xor ecx, ebx
xor eax, ebx
ror ecx, 0x10
ror eax, 8
xor ecx, eax
ror ebx, 0x18
mov eax, dword [ebp + 0x10]
xor ecx, ebx
xor ecx, edx
xor ecx, esi
xor ecx, edi
mov dword [eax + 0xf0], ecx
add eax, 4
dec dword [ebp + 8]
mov ecx, 0x1010101
mov dword [ebp + 0x10], eax
jne 0x4024b1
xor edi, edi
inc edi
pop esi
mov eax, edi
pop edi
pop ebx
pop ebp
ret 0xc