Function at 0x421230
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x18
call fcn.0047f270
mov edx, dword [esp + 0x28]
xor ecx, ecx
push edi
mov edi, dword [esp + 0x20]
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 0x421502
jb 0x421275
cmp eax, 0xffffffe0
ja 0x421502
cmp dword [edi + 0x16c], 0
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
je 0x4212a2
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.00422430
mov edx, dword [esp + 0x34]
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 + 0x2c]
or ebx, eax
mov eax, dword [edi + 0x168]
mov dword [esp + 0x10], eax
push esi
mov esi, dword [esp + 0x34]
test eax, eax
je 0x421322
nop word [eax + eax]
test edx, edx
je 0x42130a
mov al, byte [eax + edi + 0x10]
dec edx
mov cl, byte [ebp]
inc ebp
xor al, cl
mov dword [esp + 0x38], edx
mov byte [esi], al
inc esi
mov eax, dword [esp + 0x14]
xor byte [eax + edi + 0x40], cl
inc eax
and eax, 0xf
mov dword [esp + 0x14], eax
jne 0x4212e0
jmp 0x421312
test eax, eax
jne 0x4214de
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.00422430
add esp, 8
mov ecx, dword [esp + 0x38]
cmp ecx, 0xc00
jb 0x4213d4
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [esp + 0x24], edx
push 0xc00
push ebp
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.004221f0
add esp, 0x10
mov dword [esp + 0x20], 0xc0
nop
push dword [esp + 0x18]
lea eax, [edi + 0x10]
push eax
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 0x421396
mov ebx, dword [esp + 0x10]
add esi, 0x10
add ebp, 0x10
sub dword [esp + 0x20], 1
jne 0x421360
mov ecx, dword [esp + 0x38]
sub ecx, 0xc00
sub dword [esp + 0x24], 1
mov dword [esp + 0x38], ecx
jne 0x421340
mov eax, ecx
and eax, 0xfffffff0
je 0x421476
push eax
push ebp
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call fcn.004221f0
mov ecx, dword [esp + 0x48]
add esp, 0x10
cmp ecx, 0x10
jb 0x421476
lea eax, [edi + 0x10]
shr ecx, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ecx
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
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 0x421440
mov ecx, dword [esp + 0x38]
add esi, 0x10
mov edi, dword [esp + 0x2c]
sub ecx, 0x10
mov ebx, dword [esp + 0x10]
add ebp, 0x10
sub dword [esp + 0x24], 1
mov dword [esp + 0x38], ecx
lea eax, [edi + 0x10]
jne 0x421408
test ecx, ecx
je 0x4214ee
push dword [esp + 0x18]
lea eax, [edi + 0x10]
push eax
push edi
call dword [esp + 0x28]
inc ebx
add esp, 0xc
mov eax, ebx
mov byte [edi + 0xf], bl
shr eax, 0x18
mov byte [edi + 0xc], al
mov eax, ebx
shr eax, 0x10
mov byte [edi + 0xd], al
mov eax, ebx
mov ebx, dword [esp + 0x14]
shr eax, 8
sub ebp, esi
mov byte [edi + 0xe], al
lea edx, [ebx + esi]
mov esi, dword [esp + 0x38]
mov cl, byte [edx + ebp]
lea eax, [edi + ebx]
xor byte [eax + 0x40], cl
lea edx, [edx + 1]
mov al, byte [edi + ebx + 0x10]
inc ebx
xor al, cl
mov byte [edx - 1], al
sub esi, 1
jne 0x4214b3
pop esi
pop ebp
mov dword [edi + 0x168], ebx
xor eax, eax
pop ebx
pop edi
add esp, 0x18
ret
pop esi
pop ebp
mov dword [edi + 0x168], eax
xor eax, eax
pop ebx
pop edi
add esp, 0x18
ret
mov ebx, dword [esp + 0x14]
xor eax, eax
pop esi
pop ebp
mov dword [edi + 0x168], ebx
pop ebx
pop edi
add esp, 0x18
ret
or eax, 0xffffffff
pop edi
add esp, 0x18
ret