Function at 0x50bd80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x639f8d
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x6ad950
call fcn.00409430
mov eax, dword [0x6ad954]
lea ecx, [ebp - 0x10]
xor edi, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], edi
mov eax, dword [0x6ad968]
test al, 1
je 0x50bddb
lea esi, [edi + 2]
jmp 0x50c034
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], 0
test al, 2
jne 0x50be5a
mov ecx, esi
xor eax, eax
mov edx, 7
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50bdf2
div dword [0x6ad960]
mov eax, dword [0x6ad964]
mov ecx, dword [eax + edx*4]
lea eax, [eax + edx*4]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x50be5a
mov edx, dword [esi + 8]
nop dword [eax + eax]
cmp dword [ecx + 0xc], edx
jne 0x50be54
mov eax, dword [ecx + 0x10]
cmp eax, dword [esi + 0xc]
jne 0x50be54
mov eax, dword [ecx + 0x14]
cmp eax, dword [esi + 0x10]
jne 0x50be54
mov eax, dword [ecx + 0x18]
cmp eax, dword [esi + 0x14]
jne 0x50be54
mov eax, dword [ecx + 0x1c]
cmp eax, dword [esi + 0x18]
jne 0x50be54
mov eax, dword [ecx + 4]
cmp eax, dword [esi]
jne 0x50be54
mov eax, dword [ecx + 8]
cmp eax, dword [esi + 4]
je 0x50be8c
mov ecx, dword [ecx]
test ecx, ecx
jne 0x50be20
mov edx, dword [0x6ad95c]
mov eax, dword [0x6ad958]
cmp edx, eax
jb 0x50bfbe
cmp eax, 2
mov dword [ebp - 0x1c], 2
lea ecx, [eax + eax]
cmovb ecx, dword [ebp - 0x1c]
cmp ecx, edx
jae 0x50be96
mov esi, 3
jmp 0x50c034
mov esi, 1
jmp 0x50c034
push dword [0x6ad968]
mov eax, dword [0x6ad950]
push 0x6ad950
push ecx
mov ecx, 0x6ad950
mov eax, dword [eax + 8]
call eax
mov edi, eax
test edi, edi
je 0x50bfdd
mov al, byte [edi + 0x18]
not al
test al, 1
je 0x50bfdd
mov ecx, dword [0x6ad964]
test ecx, ecx
je 0x50bf7a
xor edx, edx
mov dword [ebp - 0x14], edx
cmp dword [0x6ad960], edx
jbe 0x50bf7a
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
nop
mov esi, dword [eax + ecx]
test esi, esi
je 0x50bf4a
nop word [eax + eax]
mov eax, dword [esi]
lea ecx, [esi + 4]
dec dword [0x6ad95c]
mov edx, 7
mov dword [ebp - 0x20], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x50bf15
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [ecx], esi
mov esi, eax
inc dword [edi + 0xc]
test eax, eax
jne 0x50bf00
mov ecx, dword [0x6ad964]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x1c]
inc edx
add eax, 4
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], eax
mov dword [esi + ecx], 0
add esi, 4
mov dword [ebp - 0x1c], esi
cmp edx, dword [0x6ad960]
jae 0x50bf77
mov ecx, dword [0x6ad964]
jmp 0x50bef0
mov esi, dword [ebp + 8]
mov eax, dword [0x6ad950]
mov ecx, 0x6ad950
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov ecx, esi
xor eax, eax
mov edx, 7
nop word [eax + eax]
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x50bfa0
div dword [0x6ad960]
mov eax, dword [0x6ad964]
lea eax, [eax + edx*4]
mov dword [ebp - 0x14], eax
push ecx
mov ecx, dword [0x6ad954]
push 0x6ad954
call fcn.0050c950
mov edi, eax
mov dword [ebp - 0x10], edi
test edi, edi
jne 0x50bfe7
lea esi, [eax + 2]
jmp 0x50c034
mov edi, dword [ebp - 0x10]
mov esi, 2
jmp 0x50c034
mov eax, dword [esi]
mov edx, dword [ebp - 0x14]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
mov dword [edi + 8], eax
mov eax, dword [esi + 8]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 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 [0x6ad95c]
xor esi, esi
mov dword [ebp - 0x10], edi
test edi, edi
je 0x50c046
push ecx
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x28]
push eax
push edi
call fcn.0050a020
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc