Function at 0x505520
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x1a74
call fcn.004aa000
mov edi, dword [ebp + 0x10]
mov eax, dword [0x557008]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x17f8]
push 0x17e8
push 0xff
push eax
call fcn.004acae0
add esp, 0xc
mov eax, 0xcc
lea ecx, [ebp - 0x1990]
lea esi, [ecx + eax]
push eax
push 0
push ecx
call fcn.004acae0
add esp, 0xc
mov ebx, 0x44
push ebx
push edi
push esi
call fcn.004ac560
add esp, 0xc
lea eax, [edi + ebx]
lea ecx, [ebp - 0x1880]
push ebx
push eax
push ecx
call fcn.004ac560
add esp, 0xc
add edi, 0x88
lea eax, [ebp - 0x183c]
push ebx
push edi
push eax
call fcn.004ac560
add esp, 0xc
mov ebx, 2
mov eax, esi
jmp 0x5055ca
push eax
push esi
push edi
push dword [ebp + 8]
call fcn.005036a0
add esp, 0x10
inc ebx
mov eax, edi
cmp ebx, 0x20
je 0x5055f5
lea edi, [eax + 0xcc]
test bl, 1
jne 0x5055b4
mov eax, ebx
shr eax, 1
imul eax, eax, 0xcc
add eax, ebp
add eax, 0xffffe670
push eax
push edi
push dword [ebp + 8]
call fcn.00504190
add esp, 0xc
jmp 0x5055c2
mov esi, dword [ebp + 8]
lea eax, [esi + 0xe8]
push eax
call fcn.0043dcb0
add esp, 4
test eax, eax
je 0x505860
mov ebx, eax
dec eax
mov edx, 0x88
lea ecx, [ebp - 0x1a5c]
add ecx, edx
mov dword [ebp - 0x1a7c], ecx
mov ecx, dword [ebp + 0xc]
add edx, ecx
mov dword [ebp - 0x1a80], edx
add ecx, 0x44
mov dword [ebp - 0x1a78], ecx
xor edx, edx
inc edx
mov edi, ebx
mov dword [ebp - 0x1a6c], ebx
jmp 0x5057cb
mov esi, dword [ebp + 0x14]
mov esi, dword [esi + edx*4]
xor edx, edx
bt esi, ecx
setb dl
mov dword [ebp - 0x1a70], edx
lea ecx, [edi + 2]
mov edx, ecx
shr edx, 5
cmp edx, dword [ebp - 0x1a64]
jae 0x50567b
mov eax, dword [ebp + 0x14]
mov edx, dword [eax + edx*4]
xor eax, eax
bt edx, ecx
setb al
lea esi, [edi + 1]
mov edx, esi
shr edx, 5
xor ebx, ebx
mov ecx, 0
cmp edx, dword [ebp - 0x1a64]
jae 0x5056a0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + edx*4]
xor ecx, ecx
bt edx, esi
setb cl
mov edx, edi
shr edx, 5
cmp edx, dword [ebp - 0x1a64]
jae 0x5056bb
mov esi, dword [ebp + 0x14]
mov edx, dword [esi + edx*4]
xor ebx, ebx
bt edx, edi
setb bl
mov esi, dword [ebp - 0x1a60]
shr esi, 5
xor edi, edi
mov edx, 0
cmp esi, dword [ebp - 0x1a64]
jae 0x5056ff
mov edx, dword [ebp + 0x14]
mov edx, dword [edx + esi*4]
mov dword [ebp - 0x1a64], edx
xor edx, edx
mov esi, dword [ebp - 0x1a60]
mov dword [ebp - 0x1a74], eax
mov eax, dword [ebp - 0x1a64]
bt eax, esi
mov eax, dword [ebp - 0x1a74]
setb dl
mov esi, dword [ebp - 0x1a70]
shl esi, 4
shl eax, 3
or eax, esi
shl ecx, 2
or ecx, eax
add ebx, ebx
or ebx, edx
or ebx, ecx
push 0xcc
push 0
lea eax, [ebp - 0x1a5c]
push eax
call fcn.004acae0
add esp, 0xc
lea esi, [ebp - 0x1990]
mov eax, edi
xor eax, ebx
dec eax
sar eax, 0x1f
lea ecx, [ebp - 0x1a5c]
push ecx
push esi
push eax
push ecx
push dword [ebp + 8]
call fcn.00502e50
add esp, 0x14
inc edi
add esi, 0xcc
cmp edi, 0x20
jne 0x505734
cmp dword [ebp - 0x1a68], 0
je 0x50583f
mov esi, 0x44
push esi
lea eax, [ebp - 0x1a5c]
push eax
push dword [ebp + 0xc]
call fcn.004ac560
add esp, 0xc
push esi
lea eax, [ebp - 0x1a18]
push eax
push dword [ebp - 0x1a78]
call fcn.004ac560
add esp, 0xc
push esi
push dword [ebp - 0x1a7c]
push dword [ebp - 0x1a80]
call fcn.004ac560
add esp, 0xc
mov esi, dword [ebp + 8]
mov ebx, dword [ebp - 0x1a6c]
mov ecx, dword [ebp - 0x1a60]
xor edx, edx
lea eax, [ecx - 1]
mov edi, ecx
cmp eax, ebx
jae 0x50585c
mov ecx, eax
test edx, edx
je 0x505817
imul eax, ecx, 0xcccccccd
cmp eax, 0x33333333
ja 0x5057be
mov dword [ebp - 0x1a68], edx
mov dword [ebp - 0x1a60], ecx
mov esi, dword [esi + 0xec]
lea ecx, [edi + 3]
mov edx, ecx
shr edx, 5
xor eax, eax
mov dword [ebp - 0x1a70], 0
mov dword [ebp - 0x1a64], esi
cmp edx, esi
jae 0x50565d
jmp 0x505649
mov eax, dword [ebp + 0xc]
push eax
push eax
push esi
mov dword [ebp - 0x1a60], ecx
mov dword [ebp - 0x1a68], edx
call fcn.00504190
mov edx, dword [ebp - 0x1a68]
mov ecx, dword [ebp - 0x1a60]
add esp, 0xc
jmp 0x5057d1
lea eax, [ebp - 0x1a5c]
push eax
mov eax, dword [ebp + 0xc]
push eax
push eax
mov esi, dword [ebp + 8]
push esi
call fcn.005036a0
add esp, 0x10
jmp 0x5057b0
test edx, edx
je 0x505872
push 0xcc
push 0
push dword [ebp + 0xc]
call fcn.004acae0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a927c
add esp, 0x1a74
pop esi
pop edi
pop ebx
pop ebp
ret