Function at 0x50b510
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xb0
push ebx
push ebp
mov ebp, ecx
test eax, eax
je 0x50ba22
mov ebx, dword [0x54721c]
push eax
call ebx
test eax, eax
je 0x50ba22
push esi
mov esi, dword [esp + 0xc0]
movzx eax, word [esi + 0x1e]
movzx ecx, word [esi + 0x20]
imul eax, ecx
push edi
mov edi, dword [0x547224]
add eax, eax
add eax, eax
push eax
push 0
mov dword [esp + 0x40], eax
call edi
movzx edx, word [esi + 0x20]
mov dword [esp + 0x30], eax
movzx eax, word [esi + 0x1e]
imul eax, edx
push eax
push 0
mov dword [esp + 0x34], eax
call edi
mov dword [esp + 0x1c], eax
add esi, 0x38
push esi
lea eax, [esp + 0x44]
push eax
call dword [0x547218]
lea ecx, [esp + 0x40]
push ecx
call ebx
add eax, 4
and eax, 0xfffffffc
add esi, eax
xor eax, eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
jmp 0x50b5a8
mov eax, dword [esp + 0x20]
mov edx, dword [esi + eax*8]
lea ecx, [edx + esi + 0x20]
mov edx, dword [esi + eax*8 + 4]
push 0x7de
lea ebx, [edx + esi + 0x20]
push 0
push ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
call fcn.0052b220
mov edx, dword [esp + 0x38]
add esp, 0xc
xor edi, edi
mov eax, 0x7de
mov dword [esp + 0x10], 0x80
test edx, edx
jbe 0x50b68e
lea ebx, [ebx]
cmp dword [esp + 0x10], 0
jne 0x50b603
inc dword [esp + 0x14]
mov dword [esp + 0x10], 0x80
mov cl, byte [esp + 0x10]
mov edx, dword [esp + 0x14]
test byte [edx], cl
je 0x50b662
movzx ecx, word [ebx]
mov esi, ecx
shr ecx, 5
and esi, 0x1f
add esi, 3
mov dword [esp + 0x28], ecx
xor ecx, ecx
test esi, esi
jbe 0x50b659
jmp 0x50b630
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x1c]
add edx, ecx
and edx, 0x7ff
mov dl, byte [edx + ebp]
mov byte [edi + ebx], dl
mov byte [eax + ebp], dl
inc eax
inc ecx
and eax, 0x7ff
inc edi
cmp ecx, esi
jb 0x50b630
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
add ebx, 2
jmp 0x50b678
mov dl, byte [ebx]
mov ecx, dword [esp + 0x1c]
mov byte [edi + ecx], dl
mov cl, dl
mov byte [eax + ebp], cl
inc eax
inc ebx
and eax, 0x7ff
inc edi
shr dword [esp + 0x10], 1
mov dword [esp + 0x18], ebx
cmp edi, dword [esp + 0x2c]
jb 0x50b5f0
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + eax]
mov eax, dword [esp + 0x1c]
test edx, edx
jbe 0x50b6b0
mov edi, edx
mov dl, byte [eax]
mov byte [ecx], dl
inc eax
add ecx, 4
sub edi, 1
jne 0x50b6a3
inc ebx
mov dword [esp + 0x20], ebx
cmp ebx, 4
jb 0x50b5a4
mov edx, dword [esp + 0x2c]
test edx, edx
jbe 0x50b6e9
mov eax, dword [esp + 0x30]
add eax, 2
lea ecx, [ecx]
movzx ecx, byte [eax + 1]
xor byte [eax], cl
mov cl, byte [eax]
xor byte [eax - 1], cl
mov cl, byte [eax - 1]
xor byte [eax - 2], cl
add eax, 4
sub edx, 1
jne 0x50b6d0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50b6f8
push eax
call dword [0x547228]
mov edx, dword [esp + 0xcc]
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00406cd0
test eax, eax
jne 0x50ba04
mov eax, dword [esp + 0xc4]
cmp dword [eax + 8], 0
lea ebx, [eax + 0x34]
jbe 0x50b76e
mov esi, dword [ebx]
lea ecx, [ebx + 4]
push ecx
lea edx, [esp + 0x44]
push edx
call dword [0x547218]
lea eax, [esp + 0x40]
push eax
call dword [0x54721c]
mov ecx, dword [esp + 0xcc]
mov edi, eax
add edi, 4
push ecx
lea edx, [esp + 0x44]
and edi, 0xfffffffc
push edx
add edi, 4
call fcn.00406cd0
test eax, eax
jne 0x50b799
mov eax, dword [esp + 0xc4]
add ebx, esi
cmp dword [eax + 8], 0
ja 0x50b722
mov eax, dword [esp + 0xc8]
mov dword [eax], 0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x50b78a
push eax
call dword [0x547228]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xb0
ret 0xc
mov ecx, dword [ebx + edi + 8]
add ebx, edi
push ecx
push 0
mov dword [esp + 0x2c], ebx
call dword [0x547224]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx]
push 0x7de
lea edx, [ebx + 0x10]
lea esi, [eax + ebx + 0x10]
push 0
push ebp
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
call fcn.0052b220
xor edi, edi
add esp, 0xc
mov ecx, 0x80
mov eax, 0x7de
mov dword [esp + 0x10], ecx
cmp dword [ebx + 8], edi
jbe 0x50b882
lea ebx, [ebx]
test ecx, ecx
jne 0x50b801
inc dword [esp + 0x14]
mov ecx, 0x80
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x14]
test byte [edx], cl
je 0x50b855
movzx ecx, word [esi]
mov esi, ecx
shr ecx, 5
and esi, 0x1f
add esi, 3
mov dword [esp + 0x28], ecx
xor ecx, ecx
test esi, esi
jbe 0x50b84a
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x1c]
add edx, ecx
and edx, 0x7ff
mov dl, byte [edx + ebp]
mov byte [edi + ebx], dl
mov byte [eax + ebp], dl
inc eax
inc ecx
and eax, 0x7ff
inc edi
cmp ecx, esi
jb 0x50b821
mov ebx, dword [esp + 0x24]
add dword [esp + 0x18], 2
mov esi, dword [esp + 0x18]
jmp 0x50b86f
mov dl, byte [esi]
mov ecx, dword [esp + 0x1c]
mov byte [edi + ecx], dl
mov cl, dl
mov byte [eax + ebp], cl
inc eax
inc esi
and eax, 0x7ff
mov dword [esp + 0x18], esi
inc edi
mov ecx, dword [esp + 0x10]
shr ecx, 1
mov dword [esp + 0x10], ecx
cmp edi, dword [ebx + 8]
jb 0x50b7f0
mov esi, dword [esp + 0xc4]
movzx edx, word [esi + 0x1e]
movzx eax, word [esi + 0x20]
mov edi, dword [esp + 0x1c]
imul eax, edx
mov ecx, dword [edi]
add eax, eax
add eax, eax
mov ebp, edx
mov dword [esp + 0x38], eax
shr ebp, 3
and edx, 0x80000007
lea eax, [edi + 8]
mov dword [esp + 0x14], eax
lea ecx, [ecx + edi + 8]
mov dword [esp + 0x10], 0x80
mov dword [esp + 0x18], ebp
jns 0x50b8cb
dec edx
or edx, 0xfffffff8
inc edx
je 0x50b8d2
inc ebp
mov dword [esp + 0x18], ebp
movzx edx, word [esi + 0x20]
mov eax, edx
shr eax, 3
and edx, 0x80000007
jns 0x50b8e8
dec edx
or edx, 0xfffffff8
inc edx
je 0x50b8eb
inc eax
movzx ebx, word [esi + 0x1e]
add ebx, ebx
add ebx, ebx
xor edx, edx
mov dword [esp + 0x3c], ebx
cmp eax, edx
jbe 0x50b9fd
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x34], eax
jmp 0x50b912
xor edx, edx
xor edi, edi
mov dword [esp + 0x2c], edi
cmp ebp, edx
jbe 0x50b9e5
mov dword [esp + 0x24], edx
cmp dword [esp + 0x10], 0
jne 0x50b937
inc dword [esp + 0x14]
mov dword [esp + 0x10], 0x80
mov dl, byte [esp + 0x10]
mov eax, dword [esp + 0x14]
test byte [eax], dl
jne 0x50b9c7
mov edx, dword [esp + 0x28]
lea eax, [edx + edi*4]
movzx edi, word [esi + 0x1e]
sub edi, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
lea edx, [edx + eax*8]
cmp edi, 8
jbe 0x50b967
mov edi, 8
movzx eax, word [esi + 0x20]
sub eax, dword [esp + 0x20]
cmp eax, 8
jbe 0x50b97b
mov eax, 8
jmp 0x50b97f
test eax, eax
jbe 0x50b9c7
lea ebp, [edx + 2]
mov edx, eax
test edi, edi
jbe 0x50b9c0
mov eax, ebp
mov esi, edi
lea esp, [esp]
movzx ebx, byte [ecx]
mov byte [eax - 2], bl
movzx ebx, byte [ecx + 1]
mov byte [eax - 1], bl
movzx ebx, byte [ecx + 2]
mov byte [eax], bl
movzx ebx, byte [ecx + 3]
mov byte [eax + 1], bl
add eax, 4
add ecx, 4
sub esi, 1
jne 0x50b990
mov esi, dword [esp + 0xc4]
mov ebx, dword [esp + 0x3c]
add ebp, ebx
sub edx, 1
jne 0x50b984
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x18]
shr dword [esp + 0x10], 1
add dword [esp + 0x24], 8
inc edi
mov dword [esp + 0x2c], edi
cmp edi, ebp
jb 0x50b924
add dword [esp + 0x28], ebx
add dword [esp + 0x20], 8
sub dword [esp + 0x34], 1
jne 0x50b910
mov edi, dword [esp + 0x1c]
push edi
call dword [0x547228]
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
pop edi
pop esi
pop ebp
mov dword [ecx], edx
pop ebx
add esp, 0xb0
ret 0xc
pop ebp
xor eax, eax
pop ebx
add esp, 0xb0
ret 0xc