Function at 0x50b05a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [esi + 0x50]
movzx ebx, byte [edi]
cmp ebx, 3
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x28], ebx
jne 0x50b12b
and dword [ebp - 0x14], 0
cmp dword [ebp + 0x14], 0
mov byte [edi], 1
jle 0x50b123
lea eax, [ebp - 0x10]
mov ebx, 0x80
push eax
lea eax, [edi + 1]
push ebx
push eax
push esi
push edi
call fcn.0050b05a
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
add esp, 0x14
and ecx, 7
mov dword [ebp + 8], ecx
push 8
sar ebx, cl
cdq
pop ecx
idiv ecx
mov ecx, dword [ebp + 0x10]
mov dl, byte [ebp - 0x10]
and dl, 0x80
mov dword [ebp + 0xc], eax
mov al, byte [eax + ecx]
mov cl, byte [ebp + 8]
shr dl, cl
mov ecx, dword [ebp + 0x18]
and al, bl
not bl
xor al, dl
mov edx, dword [ebp + 0xc]
add ecx, edx
and bl, byte [ecx]
or bl, al
mov byte [ecx], bl
mov cl, 7
sub cl, byte [ebp + 8]
or ebx, 0xffffffff
shr al, cl
lea ecx, [edi + 0x10]
sub ebx, edi
mov byte [ebp + 0xb], al
mov dl, byte [ecx]
mov al, dl
shl dl, 1
xor dl, byte [ebp + 0xb]
shr al, 7
mov byte [ecx], dl
dec ecx
mov byte [ebp + 0xf], al
mov byte [ebp + 0xb], al
lea eax, [ebx + ecx]
test eax, eax
jge 0x50b0f8
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0x14]
jl 0x50b092
mov byte [edi], 3
jmp 0x50ba03
cmp byte [esi], 0
je 0x50b13a
push 0
push esi
call fcn.0050a212
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
lea eax, [eax*8 + 0x20]
push eax
lea eax, [esi + 0x84]
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.005244d0
add esp, 0xc
cmp ebx, 2
jne 0x50b17a
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x18], eax
jmp 0x50b188
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jle 0x50b9e6
mov edx, dword [ebp + 0x10]
add eax, 0x7f
shr eax, 7
mov dword [ebp + 0xc], eax
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edi, dword [edx + 8]
mov edx, dword [edx + 0xc]
xor eax, dword [ebp - 0xc8]
xor edx, dword [ebp - 0xbc]
xor ecx, dword [ebp - 0xc4]
xor edi, dword [ebp - 0xc0]
xor eax, dword [ebp - 0x24]
xor edx, dword [ebp - 0x18]
xor ecx, dword [ebp - 0x20]
xor edi, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], edx
movzx edx, byte [ebp - 0xd]
movzx ebx, ah
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edi
mov edx, dword [esi + edx*8 + 0x928]
xor edx, dword [esi + ebx*8 + 0x128]
movzx ebx, byte [ebp - 0xe]
movzx ecx, cl
xor edx, dword [esi + ebx*8 + 0x924]
mov dword [ebp - 0x14], ecx
movzx ebx, al
xor edx, dword [esi + ebx*8 + 0x124]
movzx ebx, byte [ebp - 0xa]
mov ecx, dword [esi + ebx*8 + 0x928]
mov ebx, dword [ebp - 0x14]
xor ecx, dword [esi + ebx*8 + 0x128]
movzx ebx, byte [ebp - 0xb]
xor ecx, dword [esi + ebx*8 + 0x924]
movzx ebx, byte [ebp - 9]
xor ecx, dword [esi + ebx*8 + 0x124]
mov ebx, dword [ebp - 4]
rol ebx, 1
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x30]
add ebx, ecx
add ebx, edx
xor edi, ebx
mov ebx, dword [ebp - 0x2c]
lea ecx, [ebx + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror edi, 1
mov dword [ebp - 8], edi
movzx ecx, byte [ebp - 5]
movzx edi, byte [ebp - 7]
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + ecx*8 + 0x924]
movzx ecx, byte [ebp - 8]
xor edx, dword [esi + ecx*8 + 0x124]
movzx ecx, byte [ebp - 2]
mov ecx, dword [esi + ecx*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
movzx edi, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x924]
movzx edi, byte [ebp - 1]
xor ecx, dword [esi + edi*8 + 0x124]
mov edi, dword [ebp - 0xc]
rol edi, 1
mov ebx, edi
mov edi, dword [ebp - 0x38]
add edi, ecx
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x34]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x40]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x3c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x48]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x44]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x50]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x4c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x58]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x54]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x60]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x5c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
rol ebx, 1
mov eax, dword [ebp - 0x68]
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x64]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x70]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x6c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x78]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x74]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x80]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x7c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x88]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x84]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x90]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x8c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0x98]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x94]
lea ecx, [edi + ecx*2]
add ecx, edx
xor ebx, ecx
ror eax, 1
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ebx
movzx ecx, byte [ebp - 0xd]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 0xe]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, bl
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 0xa]
mov ecx, dword [esi + eax*8 + 0x928]
xor ecx, dword [esi + edi*8 + 0x128]
mov edi, dword [ebp - 4]
movzx eax, bh
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 9]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0xa0]
rol edi, 1
mov dword [ebp - 4], edi
lea edi, [eax + ecx]
mov eax, dword [ebp - 8]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0x9c]
lea ecx, [edi + ecx*2]
add ecx, edx
xor dword [ebp - 4], ecx
ror eax, 1
mov dword [ebp - 8], eax
movzx ecx, byte [ebp - 5]
movzx edi, ah
mov edx, dword [esi + ecx*8 + 0x928]
movzx ecx, byte [ebp - 6]
xor edx, dword [esi + edi*8 + 0x128]
movzx eax, al
xor edx, dword [esi + ecx*8 + 0x924]
movzx edi, byte [ebp - 4]
xor edx, dword [esi + eax*8 + 0x124]
movzx eax, byte [ebp - 2]
mov ecx, dword [esi + eax*8 + 0x928]
movzx eax, byte [ebp - 3]
xor ecx, dword [esi + edi*8 + 0x128]
xor ecx, dword [esi + eax*8 + 0x924]
movzx eax, byte [ebp - 1]
xor ecx, dword [esi + eax*8 + 0x124]
mov eax, dword [ebp - 0xa8]
rol ebx, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x10]
add edi, edx
xor eax, edi
mov edi, dword [ebp - 0xa4]
lea ecx, [edi + ecx*2]
add ecx, edx
mov edx, dword [ebp - 0xb8]
xor edx, dword [ebp - 8]
xor ebx, ecx
ror eax, 1
mov ecx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov edx, dword [ebp - 0xb4]
xor edx, dword [ebp - 4]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0xb0]
xor edx, ecx
mov ecx, dword [ebp - 0xac]
xor ecx, ebx
mov ebx, dword [ebp - 0x28]
cmp ebx, 2
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
jne 0x50b9cb
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
mov ecx, dword [eax + 4]
mov dword [ebp - 0x20], ecx
mov ecx, edx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0x10]
add eax, 0x10
add edx, 0x10
dec dword [ebp + 0xc]
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x18], eax
jne 0x50b19f
mov edi, dword [ebp + 8]
cmp ebx, 2
jne 0x50ba03
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x24], eax
mov eax, dword [ebp + 0x14]
pop edi
pop esi
pop ebx
leave
ret