Function at 0x50c280
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x639fbd
mov eax, dword fs:[0]
push eax
sub esp, 0x24
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 edi, edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], edi
mov eax, dword [esi + 0x18]
test al, 1
je 0x50c2d5
lea esi, [edi + 2]
jmp 0x50c4ea
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], 0
test al, 2
jne 0x50c34e
mov ecx, ebx
xor eax, eax
mov edx, 7
nop dword [eax]
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50c2f0
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + edx*4]
lea eax, [eax + edx*4]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x50c34e
mov edx, dword [ebx + 8]
cmp dword [ecx + 0xc], edx
jne 0x50c348
mov eax, dword [ecx + 0x10]
cmp eax, dword [ebx + 0xc]
jne 0x50c348
mov eax, dword [ecx + 0x14]
cmp eax, dword [ebx + 0x10]
jne 0x50c348
mov eax, dword [ecx + 0x18]
cmp eax, dword [ebx + 0x14]
jne 0x50c348
mov eax, dword [ecx + 0x1c]
cmp eax, dword [ebx + 0x18]
jne 0x50c348
mov eax, dword [ecx + 4]
cmp eax, dword [ebx]
jne 0x50c348
mov eax, dword [ecx + 8]
cmp eax, dword [ebx + 4]
je 0x50c37b
mov ecx, dword [ecx]
test ecx, ecx
jne 0x50c314
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
cmp edx, eax
jb 0x50c47c
cmp eax, 2
mov dword [ebp - 0x20], 2
lea ecx, [eax + eax]
cmovb ecx, dword [ebp - 0x20]
cmp ecx, edx
jae 0x50c385
mov esi, 3
jmp 0x50c4ea
mov esi, 1
jmp 0x50c4ea
push dword [esi + 0x18]
mov eax, dword [esi]
push esi
push ecx
mov ecx, esi
call dword [eax + 8]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x50c496
mov al, byte [edi + 0x18]
not al
test al, 1
je 0x50c496
cmp dword [esi + 0x14], 0
je 0x50c449
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x14], 0
jbe 0x50c449
xor ecx, ecx
mov ebx, edi
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 0x50c421
nop dword [eax]
mov eax, dword [edi]
lea ecx, [edi + 4]
dec dword [esi + 0xc]
mov edx, 7
mov dword [ebp - 0x24], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50c3f2
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 - 0x24]
mov dword [ecx], edi
mov edi, eax
inc dword [ebx + 0xc]
test eax, eax
jne 0x50c3e0
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 0x50c3d2
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x20]
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov ecx, ebx
xor eax, eax
mov edx, 7
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x50c463
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea eax, [eax + edx*4]
mov dword [ebp - 0x14], eax
push ecx
lea ecx, [esi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.0050c800
mov edi, eax
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x50c4a0
lea esi, [eax + 2]
jmp 0x50c4ea
mov edi, dword [ebp - 0x10]
mov esi, 2
jmp 0x50c4ea
mov eax, dword [ebx]
mov edx, dword [ebp - 0x14]
mov dword [edi + 4], eax
mov eax, dword [ebx + 4]
mov dword [edi + 8], eax
mov eax, dword [ebx + 8]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x1c], ecx
mov eax, dword [eax]
mov dword [edi + 0x20], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
inc dword [esi + 0xc]
xor esi, esi
mov dword [ebp - 0x10], edi
test edi, edi
je 0x50c4fc
push ecx
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.00509d70
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