Function at 0x50b910
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x639f5d
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 eax, dword [esi + 0x18]
test al, 1
jne 0x50bb17
xor edi, edi
test al, 2
jne 0x50b9a8
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 0x50b971
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 0x50b9a5
push dword [ebp + 8]
lea ecx, [edi + 4]
call fcn.004f9520
test al, al
jne 0x50b9cf
mov edi, dword [edi]
test edi, edi
jne 0x50b990
mov edi, dword [ebp - 0x14]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
cmp edx, eax
jb 0x50bad6
mov edi, 2
lea ecx, [eax + eax]
cmp eax, edi
cmovb ecx, edi
cmp ecx, edx
jae 0x50b9e4
lea esi, [edi + 1]
jmp 0x50bb1c
push dword [ebp + 0xc]
lea ecx, [edi + 0x28]
call fcn.00509ba0
mov ebx, dword [ebp - 0x10]
xor esi, esi
jmp 0x50bb1c
push dword [esi + 0x18]
mov eax, dword [esi]
push esi
push ecx
mov ecx, esi
call dword [eax + 8]
mov edx, eax
mov dword [ebp - 0x14], edx
test edx, edx
je 0x50bb10
mov cl, byte [edx + 0x18]
not cl
test cl, 1
je 0x50bb10
cmp dword [esi + 0x14], 0
je 0x50baa4
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x18], 0
jbe 0x50baa4
xor ecx, ecx
xor ebx, ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], ebx
mov eax, dword [esi + 0x14]
mov edi, dword [ecx + eax]
test edi, edi
je 0x50ba82
nop word [eax + eax]
mov ebx, dword [edi]
lea ecx, [edi + 4]
dec dword [esi + 0xc]
mov edx, 9
xor eax, eax
nop
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50ba50
mov ecx, dword [ebp - 0x14]
div dword [ecx + 0x10]
mov eax, dword [ecx + 0x14]
lea ecx, [eax + edx*4]
mov edx, dword [ebp - 0x14]
mov eax, dword [ecx]
mov dword [edi], eax
mov dword [ecx], edi
mov edi, ebx
inc dword [edx + 0xc]
test ebx, ebx
jne 0x50ba40
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov eax, dword [esi + 0x14]
add ecx, 4
mov dword [ebp - 0x1c], ecx
mov dword [ebx + eax], 0
add ebx, 4
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], eax
cmp eax, dword [esi + 0x10]
jb 0x50ba30
mov eax, dword [esi]
mov ecx, esi
push edx
call dword [eax + 4]
mov ecx, dword [ebp - 0x14]
push 1
mov eax, dword [ecx]
call dword [eax + 0xc]
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 0x50bac0
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.0050caa0
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x50bb17
push dword [ebp + 0xc]
mov ecx, ebx
push dword [ebp + 8]
call fcn.0050cc80
mov eax, dword [ebp - 0x10]
xor ebx, ebx
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
jmp 0x50bb1c
mov ebx, dword [ebp - 0x10]
mov esi, edi
jmp 0x50bb1c
mov esi, 2
test ebx, ebx
je 0x50bb2e
push ecx
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x28]
push eax
push ebx
call fcn.0050a2d0
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