Function at 0x421780
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1c
call fcn.0047f270
mov edx, dword [esp + 0x2c]
xor ecx, ecx
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x170]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x174]
mov dword [esp + 0xc], eax
mov eax, edx
add eax, dword [edi + 0x38]
adc ecx, dword [edi + 0x3c]
cmp ecx, 0xf
ja 0x421a73
jb 0x4217c5
cmp eax, 0xffffffe0
ja 0x421a73
cmp dword [edi + 0x16c], 0
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
je 0x4217f2
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.00422430
mov edx, dword [esp + 0x38]
add esp, 8
mov dword [edi + 0x16c], 0
movzx eax, byte [edi + 0xd]
push ebx
movzx ebx, byte [edi + 0xc]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 0xe]
shl ebx, 8
or ebx, eax
movzx eax, byte [edi + 0xf]
shl ebx, 8
push ebp
mov ebp, dword [esp + 0x30]
or ebx, eax
mov eax, dword [edi + 0x168]
mov dword [esp + 0x10], eax
push esi
mov esi, dword [esp + 0x38]
test eax, eax
je 0x421870
nop word [eax + eax]
test edx, edx
je 0x421858
mov cl, byte [eax + edi + 0x10]
dec edx
xor cl, byte [ebp]
inc ebp
mov byte [esi], cl
inc esi
xor byte [eax + edi + 0x40], cl
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x3c], edx
and eax, 0xf
mov dword [esp + 0x14], eax
jne 0x421830
jmp 0x421860
test eax, eax
jne 0x421a4f
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.00422430
add esp, 8
mov edx, dword [esp + 0x3c]
cmp edx, 0xc00
jb 0x421933
mov eax, 0xaaaaaaab
lea ecx, [edi + 0x10]
mul edx
shr edx, 0xb
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], 0xc0
nop dword [eax]
push dword [esp + 0x18]
push ecx
push edi
call dword [esp + 0x28]
inc ebx
add esp, 0xc
mov eax, ebx
mov dword [esp + 0x10], ebx
shr eax, 0x18
mov byte [edi + 0xc], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 0xd], al
mov eax, ebx
shr eax, 8
mov byte [edi + 0xf], bl
mov ebx, ebp
mov byte [edi + 0xe], al
xor eax, eax
sub ebx, esi
lea edx, [eax + esi]
mov ecx, dword [ebx + edx]
xor ecx, dword [edi + eax + 0x10]
add eax, 4
mov dword [edx], ecx
cmp eax, 0x10
jb 0x4218d3
mov ebx, dword [esp + 0x10]
lea ecx, [edi + 0x10]
add esi, 0x10
add ebp, 0x10
sub dword [esp + 0x20], 1
jne 0x4218a0
push 0xc00
lea eax, [esi - 0xc00]
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.004221f0
mov edx, dword [esp + 0x4c]
lea ecx, [edi + 0x10]
sub edx, 0xc00
add esp, 0x10
sub dword [esp + 0x24], 1
mov dword [esp + 0x3c], edx
jne 0x421891
mov ecx, edx
and ecx, 0xfffffff0
mov dword [esp + 0x28], ecx
je 0x4219de
cmp edx, 0x10
jb 0x4219c4
lea eax, [edi + 0x10]
shr edx, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
push dword [esp + 0x18]
push eax
push edi
call dword [esp + 0x28]
inc ebx
add esp, 0xc
mov eax, ebx
mov byte [edi + 0xf], bl
shr eax, 0x18
xor edx, edx
mov byte [edi + 0xc], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 0xd], al
mov eax, ebx
shr eax, 8
mov byte [edi + 0xe], al
mov edi, ebp
mov dword [esp + 0x10], ebx
sub edi, esi
mov ebx, dword [esp + 0x20]
nop dword [eax]
lea ecx, [edx + esi]
mov eax, dword [edi + ecx]
xor eax, dword [ebx + edx]
add edx, 4
mov dword [ecx], eax
cmp edx, 0x10
jb 0x421990
mov edi, dword [esp + 0x30]
add esi, 0x10
sub dword [esp + 0x3c], 0x10
add ebp, 0x10
sub dword [esp + 0x24], 1
mov ebx, dword [esp + 0x10]
lea eax, [edi + 0x10]
jne 0x421955
mov ecx, dword [esp + 0x28]
push ecx
mov eax, esi
sub eax, ecx
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.004221f0
mov edx, dword [esp + 0x4c]
add esp, 0x10
test edx, edx
je 0x421a5f
push dword [esp + 0x18]
lea eax, [edi + 0x10]
push eax
push edi
call dword [esp + 0x28]
mov edx, dword [esp + 0x20]
inc ebx
mov eax, ebx
mov byte [edi + 0xf], bl
shr eax, 0x18
add edx, esi
mov byte [edi + 0xc], al
add esp, 0xc
mov eax, ebx
shr eax, 0x10
mov byte [edi + 0xd], al
mov eax, ebx
mov ebx, dword [esp + 0x3c]
shr eax, 8
sub ebp, esi
mov esi, dword [esp + 0x14]
mov byte [edi + 0xe], al
movzx eax, byte [edx + ebp]
lea edx, [edx + 1]
movzx ecx, byte [edi + esi + 0x10]
xor ecx, eax
lea eax, [edi + esi]
mov byte [edx - 1], cl
inc esi
xor byte [eax + 0x40], cl
sub ebx, 1
jne 0x421a22
mov dword [edi + 0x168], esi
xor eax, eax
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x1c
ret
pop esi
pop ebp
mov dword [edi + 0x168], eax
xor eax, eax
pop ebx
pop edi
add esp, 0x1c
ret
mov esi, dword [esp + 0x14]
xor eax, eax
mov dword [edi + 0x168], esi
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x1c
ret
or eax, 0xffffffff
pop edi
add esp, 0x1c
ret