Function at 0x5002d0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x14
call fcn.005b2630
push esi
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x174]
mov eax, dword [esi + 0x170]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0xc], eax
xor eax, eax
mov edx, ecx
add edx, dword [esi + 0x38]
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x50062b
jb 0x500315
cmp edx, 0xffffffe0
ja 0x50062b
mov dword [esi + 0x38], edx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x168]
xor edx, edx
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x16c], edx
je 0x500396
cmp ecx, edx
jne 0x500354
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call fcn.004ff890
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop esi
add esp, 0x14
ret
mov eax, dword [esi + 0x40]
mov dword [esi + 0x178], eax
mov eax, dword [esi + 0x44]
mov dword [esi + 0x17c], eax
mov eax, dword [esi + 0x48]
mov dword [esi + 0x180], eax
mov eax, dword [esi + 0x4c]
mov dword [esp + 0x1c], 0x10
mov dword [esi + 0x184], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x40], edx
mov dword [esi + 0x44], edx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], edx
mov dword [esi + 0x16c], edx
movzx edx, byte [esi + 0xd]
push ebx
movzx ebx, byte [esi + 0xc]
shl ebx, 8
or ebx, edx
movzx edx, byte [esi + 0xe]
shl ebx, 8
or ebx, edx
movzx edx, byte [esi + 0xf]
shl ebx, 8
or ebx, edx
push ebp
mov ebp, dword [esp + 0x2c]
mov edx, eax
and edx, 0xf
push edi
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x10], edx
je 0x500435
jmp 0x5003d4
mov edx, dword [esp + 0x10]
test ecx, ecx
je 0x500406
mov cl, byte [edi]
mov byte [eax + esi + 0x178], cl
mov dl, byte [edx + esi + 0x10]
xor dl, cl
mov ecx, dword [esp + 0x34]
mov byte [ebp], dl
mov edx, dword [esp + 0x10]
dec ecx
inc edx
inc ebp
inc eax
inc edi
and edx, 0xf
mov dword [esp + 0x34], ecx
mov dword [esp + 0x10], edx
jne 0x5003d0
jmp 0x50040e
test edx, edx
jne 0x50061b
push eax
lea eax, [esi + 0x60]
push eax
lea edx, [esi + 0x40]
lea ecx, [esi + 0x178]
push edx
call fcn.004ffa00
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp ecx, 0x10
jb 0x500465
test eax, eax
je 0x500465
push eax
lea eax, [esi + 0x60]
push eax
lea edx, [esi + 0x40]
lea ecx, [esi + 0x178]
push edx
call fcn.004ffa00
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x34]
add esp, 0xc
cmp ecx, 0xc00
jb 0x500516
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [esp + 0x20], edx
nop
push 0xc00
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
mov ecx, edi
call fcn.004ffa00
add esp, 0xc
mov dword [esp + 0x1c], 0xc0
nop
mov eax, dword [esp + 0x14]
push eax
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
inc ebx
mov byte [esi + 0xf], bl
mov ecx, ebx
shr ecx, 0x18
mov byte [esi + 0xc], cl
mov edx, ebx
shr edx, 0x10
mov byte [esi + 0xd], dl
mov eax, ebx
shr eax, 8
mov byte [esi + 0xe], al
mov ecx, dword [edi]
xor ecx, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp], ecx
mov edx, dword [edi + 4]
xor edx, dword [esi + 0x14]
add ebp, 0x10
mov dword [ebp - 0xc], edx
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
add edi, 0x10
mov dword [ebp - 8], eax
mov ecx, dword [edi - 4]
xor ecx, dword [esi + 0x1c]
dec dword [esp + 0x1c]
mov dword [ebp - 4], ecx
jne 0x5004a0
sub dword [esp + 0x34], 0xc00
dec dword [esp + 0x20]
jne 0x500480
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
mov edx, ecx
and edx, 0xfffffff0
je 0x5005af
push edx
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
mov ecx, edi
call fcn.004ffa00
add esp, 0xc
cmp dword [esp + 0x34], 0x10
jb 0x5005a7
mov eax, dword [esp + 0x34]
shr eax, 4
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x14]
push ecx
lea eax, [esi + 0x10]
push eax
push esi
call dword [esp + 0x24]
inc ebx
mov byte [esi + 0xf], bl
sub dword [esp + 0x40], 0x10
mov edx, ebx
shr edx, 0x18
mov byte [esi + 0xc], dl
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xd], al
mov ecx, ebx
shr ecx, 8
mov byte [esi + 0xe], cl
mov edx, dword [edi]
xor edx, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp], edx
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
add ebp, 0x10
mov dword [ebp - 0xc], eax
mov ecx, dword [edi + 8]
xor ecx, dword [esi + 0x18]
add edi, 0x10
mov dword [ebp - 8], ecx
mov edx, dword [edi - 4]
xor edx, dword [esi + 0x1c]
dec dword [esp + 0x20]
mov dword [ebp - 4], edx
jne 0x500546
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
test ecx, ecx
je 0x50061b
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call dword [esp + 0x24]
inc ebx
mov edx, ebx
shr edx, 0x18
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xc], dl
mov edx, dword [esp + 0x1c]
mov ecx, ebx
shr ecx, 8
mov byte [esi + 0xd], al
add esp, 0xc
lea eax, [edx + ebp]
mov byte [esi + 0xe], cl
mov byte [esi + 0xf], bl
lea edx, [edx + esi + 0x10]
sub edi, ebp
lea ecx, [ecx]
mov cl, byte [edi + eax]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x34]
inc dword [esp + 0x28]
mov byte [esi + ebx + 0x178], cl
mov bl, byte [edx]
xor bl, cl
dec ebp
mov byte [eax], bl
inc edx
inc eax
mov dword [esp + 0x34], ebp
test ebp, ebp
jne 0x5005f0
mov eax, dword [esp + 0x28]
pop edi
pop ebp
mov dword [esi + 0x168], eax
pop ebx
xor eax, eax
pop esi
add esp, 0x14
ret
or eax, 0xffffffff
pop esi
add esp, 0x14
ret