Function at 0x4212d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push edi
mov edi, ecx
mov ecx, dword [ebx]
mov dword [ebp - 0xc], eax
mov eax, dword [edx]
mov dword [ebp - 8], ecx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ecx
mov dword [edi + 0x54], 0xffffffff
mov edx, dword [esi]
mov eax, dword [edi + 0x20]
imul edx, edx, 0x38
mov ecx, dword [eax + edx]
add eax, edx
cmp ecx, 1
jne 0x42133a
mov ecx, dword [edi]
push eax
call fcn.0042b120
test eax, eax
jl 0x42133a
cmp eax, 1
jle 0x4214c6
cmp eax, 2
jne 0x42133a
mov ecx, dword [esi]
mov edx, dword [edi + 0x20]
imul ecx, ecx, 0x38
mov dword [ecx + edx], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebx]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
sub eax, ecx
cmp edx, eax
jb 0x421439
test eax, eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi + 0x54]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
jbe 0x4213de
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
xor eax, eax
test ecx, 0xfffffffc
je 0x4213c0
shr ecx, 2
jmp 0x421380
xor edx, dword [esi]
add esi, 4
mov al, dl
mov ebx, dword [eax*4 + 0x4cf408]
mov al, dh
shr edx, 0x10
xor ebx, dword [eax*4 + 0x4cf008]
mov al, dl
xor ebx, dword [eax*4 + 0x4cec08]
mov al, dh
xor ebx, dword [eax*4 + 0x4ce408]
mov edx, ebx
dec ecx
jne 0x421380
mov ecx, dword [ebp - 0x18]
and ecx, 3
je 0x4213d0
lea esp, [esp]
lodsb al, byte [esi]
xor al, dl
shr edx, 8
xor edx, dword [eax*4 + 0x4ce408]
dec ecx
jne 0x4213c0
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
jmp 0x4213e0
mov eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [edi + 0x54], eax
mov eax, dword [ecx]
mov edx, dword [ebx]
sub edx, eax
add dword [ebp - 4], edx
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [edi + 0x18]
jne 0x4213ff
mov dword [esi], 0
mov eax, dword [esi]
cmp eax, dword [edi + 0x50]
je 0x4214e0
mov ecx, dword [edi + 0x20]
imul eax, eax, 0x38
mov eax, dword [eax + ecx + 0x2c]
mov dword [ebx], eax
mov edx, dword [esi]
mov ecx, dword [edi + 0x20]
imul edx, edx, 0x38
mov edx, dword [edx + ecx + 0x10]
add edx, eax
mov eax, dword [ebp + 0x10]
mov dword [eax], edx
mov eax, dword [ebp - 4]
test eax, eax
ja 0x421303
jmp 0x421568
test edx, edx
mov ecx, dword [ebx]
mov eax, dword [edi + 0x54]
mov dword [ebp + 8], ecx
mov dword [ebp + 0x10], eax
jbe 0x4214b9
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
xor eax, eax
test ecx, 0xfffffffc
je 0x4214a0
shr ecx, 2
mov edi, edi
xor edx, dword [esi]
add esi, 4
mov al, dl
mov ebx, dword [eax*4 + 0x4cf408]
mov al, dh
shr edx, 0x10
xor ebx, dword [eax*4 + 0x4cf008]
mov al, dl
xor ebx, dword [eax*4 + 0x4cec08]
mov al, dh
xor ebx, dword [eax*4 + 0x4ce408]
mov edx, ebx
dec ecx
jne 0x421460
mov ecx, dword [ebp - 4]
and ecx, 3
je 0x4214b0
lea esp, [esp]
lodsb al, byte [esi]
xor al, dl
shr edx, 8
xor edx, dword [eax*4 + 0x4ce408]
dec ecx
jne 0x4214a0
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
mov dword [edi + 0x54], eax
add dword [ebx], edx
jmp 0x421568
mov eax, dword [esi]
mov ecx, dword [edi + 0x20]
imul eax, eax, 0x38
pop edi
pop esi
mov dword [eax + ecx], 0
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 4]
test eax, eax
mov dword [ebx], 0
mov dword [ecx], 0
jbe 0x421568
mov edx, dword [edi + 0x54]
mov dword [ebp + 0x10], edx
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
xor eax, eax
test ecx, 0xfffffffc
je 0x421550
shr ecx, 2
lea esp, [esp]
mov al, dl
mov ebx, dword [eax*4 + 0x4cf408]
mov al, dh
shr edx, 0x10
xor ebx, dword [eax*4 + 0x4cf008]
mov al, dl
xor ebx, dword [eax*4 + 0x4cec08]
mov al, dh
xor ebx, dword [eax*4 + 0x4ce408]
mov edx, ebx
dec ecx
jne 0x421510
mov ecx, dword [ebp - 4]
and ecx, 3
je 0x42155f
jmp 0x421550
mov al, dl
shr edx, 8
xor edx, dword [eax*4 + 0x4ce408]
dec ecx
jne 0x421550
mov dword [ebp + 0xc], edx
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x54], eax
mov eax, dword [edi + 0x54]
mov ecx, dword [edi + 0x120]
not eax
cmp eax, ecx
mov dword [edi + 0x54], eax
jne 0x421667
mov edx, dword [edi + 8]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
sub eax, esi
cmp edx, eax
mov byte [ebp + 0x13], 0
jb 0x421611
mov dword [ebp + 0xc], eax
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 8]
repe scasb al, byte es:[edi]
sete byte [ebp + 0x13]
mov al, byte [ebp + 0x13]
test al, al
je 0x421649
mov ecx, dword [ebp - 0x10]
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 0x14]
mov esi, dword [ecx + 0x18]
add edx, eax
mov eax, dword [ebp - 0xc]
inc eax
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x4215d5
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ecx + 0x50]
je 0x42162c
mov esi, dword [ecx + 0x20]
imul eax, eax, 0x38
add eax, esi
mov esi, dword [eax + 0x2c]
mov eax, dword [eax + 0x10]
add eax, esi
test edx, edx
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], eax
ja 0x421581
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
pop edi
pop esi
mov dword [ecx + 0x138], eax
mov dword [ecx + 0x13c], edx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp + 0xc], edx
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 8]
repe scasb al, byte es:[edi]
sete byte [ebp + 0x13]
mov al, byte [ebp + 0x13]
test al, al
je 0x421649
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 0xc]
pop edi
pop esi
mov dword [ecx + 0x138], eax
mov dword [ecx + 0x13c], edx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x14]
xor eax, eax
pop edi
xor edx, edx
pop esi
mov dword [ecx + 0x138], eax
mov dword [ecx + 0x13c], edx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov dword [edi + 0x138], eax
mov dword [edi + 0x13c], eax
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc