Function at 0x401ed0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov edx, dword [ecx]
push ebx
push edi
mov dword [esp + 8], ecx
test edx, edx
je 0x4021e8
mov ebx, dword [esp + 0x30]
test ebx, ebx
je 0x4021e8
mov edi, dword [esp + 0x34]
test edi, edi
je 0x4021e8
mov eax, dword [ecx + 4]
push esi
mov esi, ebx
cmp edi, 0x24
jbe 0x4021bf
neg ebx
and ebx, 3
sub edi, ebx
push ebp
mov dword [esp + 0x3c], edi
test ebx, ebx
je 0x401f37
lea ebx, [ebx]
movzx ebp, byte [esi]
xor ebp, eax
and ebp, 0xff
shr eax, 8
xor eax, dword [edx + ebp*4]
dec ebx
inc esi
test ebx, ebx
jne 0x401f20
cmp edi, 0x20
jb 0x4021be
shr edi, 5
mov dword [esp + 0x38], edi
mov edi, dword [esi]
add esi, 4
mov ebx, dword [esi + 4]
add esi, 4
mov ecx, dword [esi + 4]
mov dword [esp + 0x20], ecx
xor edi, eax
mov eax, dword [esi - 4]
add esi, 4
mov ecx, dword [esi + 4]
mov dword [esp + 0x24], ecx
add esi, 4
mov ecx, dword [esi + 4]
mov dword [esp + 0x28], ecx
add esi, 4
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], ecx
add esi, 4
mov ecx, dword [esi + 4]
mov dword [esp + 0x30], ecx
add esi, 4
mov ecx, edi
shr ecx, 8
and ecx, 0xff
mov ecx, dword [edx + ecx*4 + 0x7800]
mov ebp, eax
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x6800]
mov ebp, ebx
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x5800]
mov ebp, dword [esp + 0x20]
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x4800]
mov ebp, dword [esp + 0x24]
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x3800]
mov ebp, dword [esp + 0x28]
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x2800]
mov ebp, dword [esp + 0x2c]
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x1800]
mov ebp, dword [esp + 0x30]
shr ebp, 8
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x800]
mov ebp, edi
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x7400]
mov ebp, eax
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x6400]
mov ebp, ebx
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x5400]
mov ebp, dword [esp + 0x20]
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x4400]
mov ebp, dword [esp + 0x24]
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x3400]
mov ebp, dword [esp + 0x28]
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x2400]
mov ebp, dword [esp + 0x2c]
shr ebp, 0x10
add esi, 4
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x1400]
mov ebp, dword [esp + 0x30]
shr ebp, 0x10
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x400]
mov ebp, edi
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x7c00]
mov ebp, eax
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x6c00]
mov ebp, ebx
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x5c00]
mov ebp, dword [esp + 0x20]
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x4c00]
mov ebp, dword [esp + 0x24]
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x3c00]
mov ebp, dword [esp + 0x28]
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x2c00]
mov ebp, dword [esp + 0x2c]
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0x1c00]
mov ebp, dword [esp + 0x30]
shr eax, 0x18
and ebp, 0xff
xor ecx, dword [edx + ebp*4 + 0xc00]
shr edi, 0x18
xor ecx, dword [edx + edi*4 + 0x7000]
mov edi, dword [esp + 0x3c]
xor ecx, dword [edx + eax*4 + 0x6000]
mov eax, dword [esp + 0x20]
shr eax, 0x18
shr ebx, 0x18
xor ecx, dword [edx + ebx*4 + 0x5000]
sub edi, 0x20
xor ecx, dword [edx + eax*4 + 0x4000]
mov eax, dword [esp + 0x24]
shr eax, 0x18
xor ecx, dword [edx + eax*4 + 0x3000]
mov eax, dword [esp + 0x28]
shr eax, 0x18
xor ecx, dword [edx + eax*4 + 0x2000]
mov eax, dword [esp + 0x2c]
shr eax, 0x18
xor ecx, dword [edx + eax*4 + 0x1000]
mov eax, dword [esp + 0x30]
shr eax, 0x18
xor ecx, dword [edx + eax*4]
sub dword [esp + 0x38], 1
mov eax, ecx
mov dword [esp + 0x3c], edi
jne 0x401f47
mov ecx, dword [esp + 0x10]
pop ebp
test edi, edi
je 0x4021da
movzx ebx, byte [esi]
xor ebx, eax
and ebx, 0xff
shr eax, 8
xor eax, dword [edx + ebx*4]
dec edi
inc esi
test edi, edi
jne 0x4021c3
pop esi
pop edi
mov dword [ecx + 4], eax
not eax
pop ebx
add esp, 0x24
ret 8
mov eax, dword [ecx + 4]
pop edi
not eax
pop ebx
add esp, 0x24
ret 8