Function at 0x50b480
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x639f2d
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00409430
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], ebx
mov edx, dword [esi + 0x18]
test dl, 1
je 0x50b4d6
lea esi, [ebx + 2]
jmp 0x50b6c7
xor edi, edi
test dl, 2
jne 0x50b52b
mov ecx, dword [ebp + 8]
xor eax, eax
mov edx, 9
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x50b4e7
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edi, [eax + edx*4]
mov dword [ebp - 0x14], edi
mov edi, dword [edi]
test edi, edi
je 0x50b525
nop word [eax + eax]
push dword [ebp + 8]
lea ecx, [edi + 4]
call fcn.004f9520
test al, al
jne 0x50b551
mov edi, dword [edi]
test edi, edi
jne 0x50b510
mov edx, dword [esi + 0x18]
mov edi, dword [ebp - 0x14]
mov eax, dword [esi + 8]
cmp dword [esi + 0xc], eax
jb 0x50b646
mov edi, 2
lea ecx, [eax + eax]
cmp eax, edi
cmovb ecx, edi
cmp ecx, dword [esi + 0xc]
jae 0x50b55b
lea esi, [edi + 1]
jmp 0x50b6c7
mov esi, 1
jmp 0x50b6c7
mov eax, dword [esi]
push edx
push esi
push ecx
mov ecx, esi
call dword [eax + 8]
mov ebx, eax
test ebx, ebx
je 0x50b660
mov al, byte [ebx + 0x18]
not al
test al, 1
je 0x50b660
cmp dword [esi + 0x14], 0
je 0x50b613
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x14], 0
jbe 0x50b613
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], edx
mov eax, dword [esi + 0x14]
mov edi, dword [ecx + eax]
test edi, edi
je 0x50b5f1
nop dword [eax + eax]
mov eax, dword [edi]
lea ecx, [edi + 4]
dec dword [esi + 0xc]
mov edx, 9
mov dword [ebp - 0x20], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50b5c2
div dword [ebx + 0x10]
mov eax, dword [ebx + 0x14]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
mov dword [edi], eax
mov eax, dword [ebp - 0x20]
mov dword [ecx], edi
mov edi, eax
inc dword [ebx + 0xc]
test eax, eax
jne 0x50b5b0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x14]
add ecx, 4
mov dword [ebp - 0x18], ecx
mov dword [edx + eax], 0
add edx, 4
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x14], eax
cmp eax, dword [esi + 0x10]
jb 0x50b5a1
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 4]
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax + 0xc]
mov ecx, dword [ebp + 8]
xor eax, eax
mov edx, 9
nop
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x50b630
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edi, [eax + edx*4]
push ecx
lea ecx, [esi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.0050ce10
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x50b667
lea esi, [eax + 2]
jmp 0x50b6c7
mov ebx, dword [ebp - 0x10]
mov esi, edi
jmp 0x50b6c7
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ebx + 4], eax
mov eax, dword [edx + 4]
mov dword [ebx + 8], eax
mov eax, dword [edx + 8]
mov dword [ebx + 0xc], eax
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 0x10]
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], ecx
mov eax, dword [edx + 0x14]
mov ecx, dword [edx + 0x18]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], ecx
mov eax, dword [edx + 0x1c]
mov dword [ebx + 0x20], eax
mov eax, dword [edx + 0x20]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0xc]
movq xmm0, qword [eax]
movq qword [ebx + 0x28], xmm0
mov eax, dword [eax + 8]
mov dword [ebx + 0x30], eax
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
mov dword [edi], eax
inc dword [esi + 0xc]
xor esi, esi
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x50b6d9
push ecx
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x28]
push eax
push ebx
call fcn.0050cd00
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc