Function at 0x421740
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x2c]
push edi
test eax, eax
mov dword [esp + 0x10], ebx
je 0x421763
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x24
ret 0xc
mov ecx, dword [ebx + 0x30]
cmp ecx, 2
je 0x421781
mov eax, dword [ebx + 0x34]
test eax, eax
jne 0x421781
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x24
ret 0xc
mov edi, dword [esp + 0x38]
test edi, edi
je 0x421a84
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x421a84
cdq
and edx, 0x7f
add eax, edx
mov esi, eax
mov eax, ecx
sar esi, 7
sub eax, 0
mov dword [esp + 0x3c], esi
je 0x421a4f
dec eax
je 0x4219a2
dec eax
je 0x4217ca
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret 0xc
mov eax, dword [ebx + 0x38]
mov ecx, dword [ebx + 0x3c]
mov edx, dword [ebx + 0x40]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x44]
mov dword [esp + 0x18], ecx
test esi, esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
jle 0x421a75
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], esi
xor esi, esi
jmp 0x421806
mov ebx, dword [esp + 0x10]
xor esi, esi
jmp 0x421806
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
lea edx, [esp + 0x24]
lea eax, [esp + 0x24]
mov dword [esp + 0x30], ecx
push edx
push eax
mov ecx, ebx
call fcn.00421f80
mov al, byte [esp + 0x15]
mov dl, byte [esp + 0x14]
mov cl, al
shr cl, 7
shl dl, 1
or cl, dl
mov byte [esp + 0x14], cl
mov cl, byte [esp + 0x16]
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x17]
mov byte [esp + 0x15], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x18]
mov byte [esp + 0x16], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x19]
mov byte [esp + 0x17], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1a]
mov byte [esp + 0x18], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1b]
mov byte [esp + 0x19], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1c]
mov byte [esp + 0x1a], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1d]
mov byte [esp + 0x1b], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1e]
mov byte [esp + 0x1c], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1f]
mov byte [esp + 0x1d], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov byte [esp + 0x1e], dl
mov cl, byte [esp + 0x20]
mov ebx, esi
mov dl, cl
and ebx, 7
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x22]
mov byte [esp + 0x20], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x23]
shr al, 7
shl cl, 1
or al, cl
mov byte [esp + 0x21], dl
mov byte [esp + 0x22], al
mov eax, esi
cdq
and edx, 7
mov cl, 7
add eax, edx
sub cl, bl
sar eax, 3
mov dl, byte [eax + edi]
shr dl, cl
mov cl, byte [esp + 0x23]
shl cl, 1
and dl, 1
or dl, cl
mov cl, bl
mov byte [esp + 0x23], dl
mov dl, byte [esp + 0x24]
mov bl, byte [eax + ebp]
and dl, 0x80
shr dl, cl
xor bl, dl
inc esi
cmp esi, 0x80
mov byte [eax + ebp], bl
jl 0x421802
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x4217fa
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x24
ret 0xc
mov eax, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
mov edx, dword [ebx + 0x44]
mov ebp, dword [ebx + 0x38]
test esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jle 0x421a75
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
push edi
call fcn.00422430
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
xor eax, ebp
mov ebp, dword [esp + 0x1c]
xor ecx, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
xor edx, ebp
mov ebp, dword [esp + 0x20]
xor dword [esp + 0x30], ebp
mov ebp, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x28], ecx
mov dword [esi + 4], ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
mov dword [esi + 8], edx
mov edx, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x38]
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x38], eax
jne 0x4219ca
mov esi, dword [esp + 0x3c]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x24
ret 0xc
test esi, esi
jle 0x421a75
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x38], esi
push ebp
push edi
mov ecx, ebx
call fcn.00422430
mov eax, dword [esp + 0x38]
add edi, 0x10
add ebp, 0x10
dec eax
mov dword [esp + 0x38], eax
jne 0x421a5b
mov eax, esi
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x24
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0xc