Function at 0x50dc20
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x530008
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
push ebx
mov ebx, dword [esp + 0x38]
push ebp
mov ebp, ecx
mov ecx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x34]
push ebx
push ecx
push edx
push eax
mov ecx, ebp
mov dword [esp + 0x1c], ebp
call fcn.0050d990
test eax, eax
jne 0x50dc77
pop ebp
pop ebx
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 0x14
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x50dd14
mov cl, byte [esp + 0x3c]
push eax
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
call fcn.00405cc0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x1c]
push ebp
call fcn.00408220
test al, al
je 0x50dcde
mov edi, dword [esp + 0x1c]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], ebp
mov byte [eax + ebp], 0
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x18]
add ecx, 0x14
push edx
push 1
mov dword [esp + 0x38], 0
mov eax, dword [ecx + 8]
push eax
call fcn.004b2130
push 1
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], 0xffffffff
call fcn.00405cc0
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x50dff5
mov esi, dword [ebx + 4]
mov ebp, dword [0x531160]
test esi, esi
je 0x50dd55
mov al, byte [esi - 1]
test al, al
je 0x50dd55
cmp al, 0xff
je 0x50dd55
push 1
mov ecx, ebx
call fcn.00405cc0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
mov ecx, ebx
call fcn.00408160
mov eax, dword [ebx + 8]
cmp eax, ebp
jae 0x50dd5e
mov ebp, eax
test ebp, ebp
jbe 0x50dd92
mov ecx, dword [ebx + 4]
sub eax, ebp
push eax
lea eax, [ecx + ebp]
push eax
push ecx
call fcn.00514bd0
mov esi, dword [ebx + 8]
add esp, 0xc
sub esi, ebp
mov ecx, ebx
push 0
push esi
call fcn.00408220
test al, al
je 0x50dd92
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], esi
mov byte [ecx + esi], 0
mov ebp, dword [esp + 0x3c]
shr ebp, 3
push ebp
mov dword [esp + 0x48], ebp
call fcn.00514b36
mov edi, eax
push ebp
mov dword [esp + 0x40], edi
call fcn.00514b36
mov ecx, ebp
mov edx, eax
mov esi, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
add esp, 8
and ecx, 3
mov dword [esp + 0x48], edx
rep stosb byte es:[edi], al
mov ecx, ebp
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x18]
mov esi, dword [ecx + 0x1c]
cmp eax, esi
mov dword [esp + 0x40], eax
je 0x50ded8
mov ecx, ebp
shr ecx, 1
mov dword [esp + 0x14], ecx
jmp 0x50de00
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 4]
mov dword [esp + 0x3c], 0
test eax, eax
jne 0x50de14
mov eax, 0x53115c
lea edx, [esp + 0x3c]
push edx
push 0x54eaa0
push eax
call fcn.00515e71
mov edx, dword [esp + 0x54]
mov ecx, ebp
mov eax, ecx
lea esi, [esp + 0x48]
mov edi, edx
add esp, 0xc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
test ecx, ecx
jbe 0x50de7a
lea ecx, [edx + ebp - 1]
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x48]
mov dl, byte [eax + edx]
inc eax
mov byte [esp + 0x3c], dl
mov dl, byte [ecx]
mov byte [eax + esi - 1], dl
mov dl, byte [esp + 0x3c]
mov byte [ecx], dl
mov edx, dword [esp + 0x14]
dec ecx
cmp eax, edx
jb 0x50de4f
mov ebp, dword [esp + 0x44]
mov edx, esi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
cmp ecx, dword [eax + 0x18]
jne 0x50de9f
mov edi, dword [esp + 0x38]
mov ecx, ebp
mov esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x50deba
test ebp, ebp
jbe 0x50deba
mov eax, dword [esp + 0x38]
mov esi, edx
sub esi, eax
mov edi, ebp
mov cl, byte [esi + eax]
mov dl, byte [eax]
xor dl, cl
mov byte [eax], dl
inc eax
dec edi
jne 0x50dead
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
add eax, 0x10
mov ecx, dword [edx + 0x1c]
mov dword [esp + 0x40], eax
cmp eax, ecx
jne 0x50ddfc
mov edx, dword [esp + 0x48]
xor esi, esi
test ebp, ebp
mov dword [esp + 0x40], esi
jbe 0x50df88
mov ecx, dword [esp + 0x38]
xor eax, eax
mov byte [esp + 0x3c], 0
mov al, byte [esi + ecx]
and eax, 0x800000ff
jns 0x50df02
dec eax
or eax, 0xffffff00
inc eax
and eax, 0xff
lea edx, [esp + 0x3c]
push eax
push str._.2x
push edx
call fcn.00514b75
lea edi, [esp + 0x48]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x531160]
mov edx, dword [ebx + 8]
not ecx
dec ecx
sub eax, edx
mov edi, ecx
cmp eax, edi
ja 0x50df3d
call fcn.00514140
test edi, edi
jbe 0x50df77
mov ebp, dword [ebx + 8]
add ebp, edi
cmp ebp, 0xfffffffd
jbe 0x50df50
call fcn.00514140
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x50dfa8
mov al, byte [ecx - 1]
test al, al
je 0x50dfa8
cmp al, 0xff
je 0x50dfa8
test ebp, ebp
jne 0x50dfbd
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call fcn.00405cc0
mov ebp, dword [esp + 0x44]
inc esi
cmp esi, ebp
mov dword [esp + 0x40], esi
jb 0x50dee6
mov edx, dword [esp + 0x48]
test edx, edx
je 0x50df95
push edx
call fcn.00514120
add esp, 4
mov eax, dword [esp + 0x38]
test eax, eax
je 0x50e001
push eax
call fcn.00514120
add esp, 4
jmp 0x50e001
test ebp, ebp
jne 0x50dfb8
test ecx, ecx
je 0x50df73
mov dword [ebx + 8], ebp
mov byte [ecx], 0
jmp 0x50df73
cmp dword [ebx + 0xc], ebp
jae 0x50dfc5
push ebp
mov ecx, ebx
call fcn.00405fa0
mov edx, dword [ebx + 4]
mov ecx, edi
mov edi, dword [ebx + 8]
lea esi, [esp + 0x3c]
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov esi, dword [esp + 0x40]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
mov ebp, dword [esp + 0x44]
jmp 0x50df77
mov edi, dword [ebp + 0xc]
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 0x14